diff options
| author | Jakub Konka <kubkon@jakubkonka.com> | 2023-08-28 21:39:25 +0200 |
|---|---|---|
| committer | Jakub Konka <kubkon@jakubkonka.com> | 2023-08-29 06:43:41 +0200 |
| commit | 3b2b9fcbc5e162063febf989883f29e55cc64c65 (patch) | |
| tree | c85bbce50c24a18df10e08889b1cb3cc3f69e335 /test/link/macho | |
| parent | c429bb5d2feb36f83e33ef95a25dd5bb7455f16c (diff) | |
| download | zig-3b2b9fcbc5e162063febf989883f29e55cc64c65.tar.gz zig-3b2b9fcbc5e162063febf989883f29e55cc64c65.zip | |
darwin: move inference of SDK version into the linker
`std.zig.system.darwin.getSdk` now pulls only the SDK path
so we execute a child process only once and not twice as it was
until now since we parse the SDK version directly from the pulled path.
This is actually how `ld64` does it too.
Diffstat (limited to 'test/link/macho')
| -rw-r--r-- | test/link/macho/bugs/13056/build.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/link/macho/bugs/13056/build.zig b/test/link/macho/bugs/13056/build.zig index 50eb990583..5b19daab3c 100644 --- a/test/link/macho/bugs/13056/build.zig +++ b/test/link/macho/bugs/13056/build.zig @@ -23,13 +23,13 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize .name = "test", .optimize = optimize, }); - exe.addSystemIncludePath(.{ .path = b.pathJoin(&.{ sdk.path, "/usr/include" }) }); - exe.addIncludePath(.{ .path = b.pathJoin(&.{ sdk.path, "/usr/include/c++/v1" }) }); + exe.addSystemIncludePath(.{ .path = b.pathJoin(&.{ sdk, "/usr/include" }) }); + exe.addIncludePath(.{ .path = b.pathJoin(&.{ sdk, "/usr/include/c++/v1" }) }); exe.addCSourceFile(.{ .file = .{ .path = "test.cpp" }, .flags = &.{ "-nostdlib++", "-nostdinc++", } }); - exe.addObjectFile(.{ .path = b.pathJoin(&.{ sdk.path, "/usr/lib/libc++.tbd" }) }); + exe.addObjectFile(.{ .path = b.pathJoin(&.{ sdk, "/usr/lib/libc++.tbd" }) }); const run_cmd = b.addRunArtifact(exe); run_cmd.expectStdErrEqual("x: 5\n"); |
