Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop LLVM #916

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ SHELL:=/bin/bash -O globstar
setup:
flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
# flatpak remote-add --user --if-not-exists flathub-beta https://flathub.org/beta-repo/flathub-beta.flatpakrepo
flatpak install --or-update --user --noninteractive flathub org.gnome.Sdk//46 org.flatpak.Builder org.freedesktop.Sdk.Extension.rust-stable//23.08 org.freedesktop.Sdk.Extension.vala//23.08 org.freedesktop.Sdk.Extension.llvm16//23.08
flatpak install --or-update --user --noninteractive flathub org.gnome.Sdk//46 org.flatpak.Builder org.freedesktop.Sdk.Extension.rust-stable//23.08 org.freedesktop.Sdk.Extension.vala//23.08
npm install
make build

Expand Down Expand Up @@ -58,7 +58,7 @@ ci: setup test
# make sure to test without the sdk extensions installed
sandbox: setup
flatpak-builder --ccache --user --install --force-clean flatpak build-aux/re.sonny.Workbench.Devel.json
# flatpak remove --noninteractive org.freedesktop.Sdk.Extension.rust-stable//23.08 org.freedesktop.Sdk.Extension.vala//23.08 org.freedesktop.Sdk.Extension.llvm16//23.08
# flatpak remove --noninteractive org.freedesktop.Sdk.Extension.rust-stable//23.08 org.freedesktop.Sdk.Extension.vala//23.08
flatpak run --command="bash" re.sonny.Workbench.Devel

flatpak:
Expand Down
3 changes: 1 addition & 2 deletions build-aux/re.sonny.Workbench.Devel.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"sdk": "org.gnome.Sdk",
"sdk-extensions": [
"org.freedesktop.Sdk.Extension.vala",
"org.freedesktop.Sdk.Extension.rust-stable",
"org.freedesktop.Sdk.Extension.llvm16"
"org.freedesktop.Sdk.Extension.rust-stable"
],
"build-options": {
"append-path": "/usr/lib/sdk/vala/bin:/usr/lib/sdk/rust-stable/bin",
Expand Down
3 changes: 1 addition & 2 deletions build-aux/re.sonny.Workbench.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"sdk": "org.gnome.Sdk",
"sdk-extensions": [
"org.freedesktop.Sdk.Extension.vala",
"org.freedesktop.Sdk.Extension.rust-stable",
"org.freedesktop.Sdk.Extension.llvm16"
"org.freedesktop.Sdk.Extension.rust-stable"
],
"build-options": {
"append-path": "/usr/lib/sdk/vala/bin:/usr/lib/sdk/rust-stable/bin",
Expand Down
5 changes: 3 additions & 2 deletions src/Extensions/Extensions.blp
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ Adw.Dialog dialog {

$Extension extension_rust {
title: _("Rust");
hint: _("Run the following command");
command: "flatpak install flathub org.freedesktop.Sdk.Extension.rust-stable//23.08 org.freedesktop.Sdk.Extension.llvm16//23.08";
hint: _("or run the following command");
command: "flatpak install flathub org.freedesktop.Sdk.Extension.rust-stable//23.08";
uri: "appstream://org.freedesktop.Sdk.Extension.rust-stable";
}

$Extension extension_vala {
Expand Down
6 changes: 3 additions & 3 deletions src/Extensions/Extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ export function Extensions({ window }) {

let rust_enabled;
export function isRustEnabled() {
rust_enabled ??=
Gio.File.new_for_path("/usr/lib/sdk/rust-stable").query_exists(null) &&
Gio.File.new_for_path("/usr/lib/sdk/llvm16").query_exists(null);
rust_enabled ??= Gio.File.new_for_path(
"/usr/lib/sdk/rust-stable",
).query_exists(null);
return rust_enabled;
}

Expand Down
7 changes: 0 additions & 7 deletions src/workbench
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ export PKG_CONFIG_PATH=/app/lib/pkgconfig/:$PKG_CONFIG_PATH

source /usr/lib/sdk/rust-stable/enable.sh 2> /dev/null
source /usr/lib/sdk/vala/enable.sh 2> /dev/null
source /usr/lib/sdk/llvm16/enable.sh 2> /dev/null

# TODO: Figure out how to use gcc with mold so we can drop llvm
export CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=clang
export CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS="-C link-arg=-fuse-ld=/usr/lib/sdk/rust-stable/bin/mold"
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=clang
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUSTFLAGS="-C link-arg=-fuse-ld=/usr/lib/sdk/rust-stable/bin/mold"

# We do not support translations but the AboutWindow is translated by default
LANG=en_US.UTF-8
Expand Down
Loading