From 43a6384e9c6ee6f3e250172f6f655782e808afed Mon Sep 17 00:00:00 2001 From: Jakub Konka Date: Sat, 1 Apr 2023 22:44:05 +0200 Subject: [PATCH] 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. --- test/link/macho/bugs/13056/build.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/link/macho/bugs/13056/build.zig b/test/link/macho/bugs/13056/build.zig index db7c129cbfd226748c02f3e32585b304f6405286..bcee22504f2e0cdb4227b637deadf4c7094fa713 100644 --- a/test/link/macho/bugs/13056/build.zig +++ b/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++", -- 2.54.0