Commit 43a6384e9c

Jakub Konka <kubkon@jakubkonka.com>
2023-04-01 22:44:05
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++`: https://github.com/llvm/llvm-project/commit/157bbe6aea22e87c822f6cda3cd404b8f657dce4 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.
1 parent ab44b45
Changed files (1)
test
link
macho
bugs
13056
test/link/macho/bugs/13056/build.zig
@@ -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++",