| ... | ... | @@ -344,20 +344,7 @@ fn addCmakeCfgOptionsToExe( |
| 344 | 344 | try addCxxKnownPath(b, cfg, exe, "libc++.a", null, need_cpp_includes); |
| 345 | 345 | try addCxxKnownPath(b, cfg, exe, "libc++abi.a", null, need_cpp_includes); |
| 346 | 346 | } else if (exe.target.isDarwin()) { |
| 347 | | if (addCxxKnownPath(b, cfg, exe, "libgcc_eh.a", "", need_cpp_includes)) { |
| 348 | | // Compiler is GCC. |
| 349 | | try addCxxKnownPath(b, cfg, exe, "libstdc++.a", null, need_cpp_includes); |
| 350 | | exe.linkSystemLibrary("pthread"); |
| 351 | | // TODO LLD cannot perform this link. |
| 352 | | // Set ZIG_SYSTEM_LINKER_HACK env var to use system linker ld instead. |
| 353 | | // See https://github.com/ziglang/zig/issues/1535 |
| 354 | | } else |err| switch (err) { |
| 355 | | error.RequiredLibraryNotFound => { |
| 356 | | // System compiler, not gcc. |
| 357 | | exe.linkSystemLibrary("c++"); |
| 358 | | }, |
| 359 | | else => |e| return e, |
| 360 | | } |
| 347 | exe.linkSystemLibrary("c++"); |
| 361 | 348 | } |
| 362 | 349 | |
| 363 | 350 | if (cfg.dia_guids_lib.len != 0) { |