diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-03-29 20:58:59 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-03-29 20:58:59 -0400 |
| commit | f9f7deaeda20b212ae4daea0009a904beccdf828 (patch) | |
| tree | 4e06b523803560af33682953a4dd63e8dcb0a0dc /src/main.cpp | |
| parent | 5aa281250723c159aa0429941c16b046bba6d316 (diff) | |
| download | zig-f9f7deaeda20b212ae4daea0009a904beccdf828.tar.gz zig-f9f7deaeda20b212ae4daea0009a904beccdf828.zip | |
linking against c++ does not trigger system library directories
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp index f5e7e03b37..05ba1ab40f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1371,15 +1371,17 @@ static int main0(int argc, char **argv) { return print_error_usage(arg0); } - bool any_non_c_link_libs = false; + bool any_system_lib_dependencies = false; for (size_t i = 0; i < link_libs.length; i += 1) { - if (!target_is_libc_lib_name(&target, link_libs.at(i))) { - any_non_c_link_libs = true; + if (!target_is_libc_lib_name(&target, link_libs.at(i)) && + !target_is_libcpp_lib_name(&target, link_libs.at(i))) + { + any_system_lib_dependencies = true; break; } } - if (target.is_native_os && any_non_c_link_libs) { + if (target.is_native_os && any_system_lib_dependencies) { Error err; Stage2NativePaths paths; if ((err = stage2_detect_native_paths(&paths))) { |
