diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-09-11 13:39:58 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-09-11 13:39:58 -0700 |
| commit | aec0e595f2a679f10e927ea4531b8f58ced7080a (patch) | |
| tree | e1ec39679ef8636cbac1ad541892fd59b8a92543 /src/Compilation.zig | |
| parent | 4fd4c733d4676ee50667ca895259b277966f15c6 (diff) | |
| download | zig-aec0e595f2a679f10e927ea4531b8f58ced7080a.tar.gz zig-aec0e595f2a679f10e927ea4531b8f58ced7080a.zip | |
stage2: no condition on system libs to link native libc
Before, Zig tried to use its own libc files (e.g. glibc) when there were
no system libs being linked. This prevented building against native
glibc on systems that have newer glibc than the ones Zig provides.
Closes #12797
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index 597f5cffff..f871c0f78c 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -1238,7 +1238,6 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation { options.target, options.is_native_abi, link_libc, - options.system_lib_names.len != 0 or options.frameworks.count() != 0, options.libc_installation, options.native_darwin_sdk != null, ); @@ -4522,7 +4521,6 @@ fn detectLibCIncludeDirs( target: Target, is_native_abi: bool, link_libc: bool, - link_system_libs: bool, libc_installation: ?*const LibCInstallation, has_macos_sdk: bool, ) !LibCDirs { @@ -4539,7 +4537,7 @@ fn detectLibCIncludeDirs( // If linking system libraries and targeting the native abi, default to // using the system libc installation. - if (link_system_libs and is_native_abi and !target.isMinGW()) { + if (is_native_abi and !target.isMinGW()) { if (target.isDarwin()) { return if (has_macos_sdk) // For Darwin/macOS, we are all set with getDarwinSDK found earlier. |
