authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-03-29 20:58:59-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-03-29 20:58:59-04:00
logf9f7deaeda20b212ae4daea0009a904beccdf828
tree4e06b523803560af33682953a4dd63e8dcb0a0dc
parent5aa281250723c159aa0429941c16b046bba6d316
signaturelock-open Commit is signed but in an unrecognized format.

linking against c++ does not trigger system library directories


1 files changed, 6 insertions(+), 4 deletions(-)

src/main.cpp+6-4
......@@ -1371,15 +1371,17 @@ static int main0(int argc, char **argv) {
13711371 return print_error_usage(arg0);
13721372 }
13731373
1374 bool any_non_c_link_libs = false;
1374 bool any_system_lib_dependencies = false;
13751375 for (size_t i = 0; i < link_libs.length; i += 1) {
1376 if (!target_is_libc_lib_name(&target, link_libs.at(i))) {
1377 any_non_c_link_libs = true;
1376 if (!target_is_libc_lib_name(&target, link_libs.at(i)) &&
1377 !target_is_libcpp_lib_name(&target, link_libs.at(i)))
1378 {
1379 any_system_lib_dependencies = true;
13781380 break;
13791381 }
13801382 }
13811383
1382 if (target.is_native_os && any_non_c_link_libs) {
1384 if (target.is_native_os && any_system_lib_dependencies) {
13831385 Error err;
13841386 Stage2NativePaths paths;
13851387 if ((err = stage2_detect_native_paths(&paths))) {