link-test: adjust test/link/bugs/macho/13056 to latest changes on macOS 13.3

Latest macOS 13.3 rolled out LLVM 15 and thus the way `nullptr_t` is
defined within the `libc++`:

157bbe6aea

This seems to require including `/usr/include` with `-isystem` directive
rather than `-I`. Otherwise we get clang miscompilation issues due to
missing `nullptr_t` declaration.
This commit is contained in:
Jakub Konka
2023-04-01 22:44:05 +02:00
parent ab44b454d0
commit 43a6384e9c

View File

@@ -23,7 +23,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize
.name = "test",
.optimize = optimize,
});
exe.addIncludePath(std.fs.path.join(b.allocator, &.{ sdk.path, "/usr/include" }) catch unreachable);
exe.addSystemIncludePath(std.fs.path.join(b.allocator, &.{ sdk.path, "/usr/include" }) catch unreachable);
exe.addIncludePath(std.fs.path.join(b.allocator, &.{ sdk.path, "/usr/include/c++/v1" }) catch unreachable);
exe.addCSourceFile("test.cpp", &.{
"-nostdlib++",