mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
f4a79cc138
Fixes the build on Ubuntu distributions with aggressive enabling of LTO for all builds. This build profile sets CFLAGS and CXXFLAGS in a way that prevents cargo tests from linking. This manifests as errors like: = note: make[5]: *** read jobs pipe: Bad file descriptor. Stop. make[5]: *** Waiting for unfinished jobs.... lto-wrapper: fatal error: make returned 2 exit status compilation terminated. /usr/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status
22 lines
630 B
Makefile
Executable file
22 lines
630 B
Makefile
Executable file
#!/usr/bin/make -f
|
|
# -*- makefile -*-
|
|
|
|
# Uncomment this to turn on verbose mode.
|
|
export DH_VERBOSE=1
|
|
# The LTO profile sets CFLAGS/CXXFLAGS which confuse the compilation process; disable it
|
|
# LTO is still performed by rustc based on Cargo.toml
|
|
export DEB_BUILD_MAINT_OPTIONS=optimize=-lto
|
|
|
|
%:
|
|
dh $@
|
|
|
|
# Setting the build system is still required, because otherwise the GNUmakefile gets picked up
|
|
override_dh_auto_configure:
|
|
ln -s cargo-vendor/vendor vendor
|
|
ln -s cargo-vendor/.cargo .cargo
|
|
dh_auto_configure --buildsystem=cmake -- -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
|
|
|
override_dh_clean:
|
|
dh_clean
|
|
-unlink .cargo
|
|
-unlink vendor
|