mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-10 07:04:29 +00:00
build: Forbid linking glibc statically again
Static linking against glibc has crashes depending on the name resolution setup (I think when it needs to dlopen). It is a fundamental glibc limitation that we cannot fix on our end. It will crash when doing `echo ~<TAB>`. This carves out a specific exception for "gnu", i.e. glibc, targets. Other targets, including musl and other operating systems, continue to allow static linking.
This commit is contained in:
parent
5278259312
commit
848921a391
1 changed files with 3 additions and 0 deletions
3
build.rs
3
build.rs
|
@ -50,6 +50,9 @@ fn main() {
|
|||
// Keep verbose mode on until we've ironed out rust build script stuff
|
||||
target.set_verbose(true);
|
||||
detect_cfgs(&mut target);
|
||||
|
||||
#[cfg(all(target_env = "gnu", target_feature = "crt-static"))]
|
||||
compile_error!("Statically linking against glibc has unavoidable crashes and is unsupported. Use dynamic linking or link statically against musl.");
|
||||
}
|
||||
|
||||
/// Check target system support for certain functionality dynamically when the build is invoked,
|
||||
|
|
Loading…
Reference in a new issue