mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 14:29:16 +08: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
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 New Issue
Block a user