chore: fix debian package builds

This commit is contained in:
Michael Aaron Murphy 2023-04-25 14:17:49 +02:00
parent c015ad9948
commit 61861b3f18
No known key found for this signature in database
GPG key ID: B2732D4240C9212C
3 changed files with 14 additions and 9 deletions

1
debian/rules vendored
View file

@ -1,6 +1,5 @@
#!/usr/bin/make -f #!/usr/bin/make -f
export DEB_LDFLAGS_MAINT_APPEND += -fuse-ld=lld -Wl,--build-id=sha1
export DESTDIR = debian/tmp export DESTDIR = debian/tmp
export VENDOR ?= 1 export VENDOR ?= 1

View file

@ -1,5 +1,4 @@
tar-ignore=.github tar-ignore=.github
tar-ignore=.vscode tar-ignore=.vscode
tar-ignore=vendor tar-ignore=vendor
tar-ignore=vendor.tar
tar-ignore=target tar-ignore=target

View file

@ -1,14 +1,20 @@
name := 'cosmic-settings' name := 'cosmic-settings'
appid := 'com.system76.CosmicSettings' appid := 'com.system76.CosmicSettings'
x86-64-target := 'x86-64-v2' # Use the lld linker if it is available.
ld-args := if `which lld || true` != '' {
linker := '-C link-arg=-fuse-ld=lld' '-C link-arg=-fuse-ld=lld -C link-arg=-Wl,--build-id=sha1'
export RUSTFLAGS := if arch() == 'x86_64' {
linker + ' -C target-cpu=' + x86-64-target
} else { } else {
linker ''
}
# Use the x86-64-v2 target by default on x86-64 systems.
target-cpu := if arch() == 'x86_64' { 'x86-64-v2' } else { '' }
export RUSTFLAGS := if target-cpu != '' {
ld-args + ' -C target-cpu=' + target-cpu + ' ' + env_var_or_default('RUSTFLAGS', '')
} else {
ld-args + ' ' + env_var_or_default('RUSTFLAGS', '')
} }
rootdir := '' rootdir := ''
@ -24,6 +30,7 @@ desktop-dest := clean(rootdir / prefix) / 'share' / 'applications' / desktop
[private] [private]
help: help:
echo $RUSTFLAGS
@just -l @just -l
# Remove Cargo build artifacts # Remove Cargo build artifacts