aboutsummaryrefslogtreecommitdiff
path: root/test/standalone.zig
diff options
context:
space:
mode:
authorJakub Konka <kubkon@jakubkonka.com>2021-08-02 10:04:54 +0200
committerAndrew Kelley <andrew@ziglang.org>2021-08-02 13:41:58 -0400
commit159cd528b164f77177e71309dee9fa79d2d5f4f4 (patch)
tree364c79201b35da2319f8225e0a8138ee70ba3c4c /test/standalone.zig
parent68e26a2ceea85a149cb23286504cbdcec1ae814e (diff)
downloadzig-159cd528b164f77177e71309dee9fa79d2d5f4f4.tar.gz
zig-159cd528b164f77177e71309dee9fa79d2d5f4f4.zip
Add -Denable-macos-sdk explicit flag to build.zig
This way, we can explicitly signal if a test requires the presence of macOS SDK to build. For instance, when testing our in-house MachO linker for correctly linking Objective-C, we require the presence of the SDK on the host system, and we can enforce this with `-Denable-macos-sdk` flag to `zig build test-standalone`.
Diffstat (limited to 'test/standalone.zig')
-rw-r--r--test/standalone.zig4
1 files changed, 1 insertions, 3 deletions
diff --git a/test/standalone.zig b/test/standalone.zig
index 52fba31828..9a32701ddd 100644
--- a/test/standalone.zig
+++ b/test/standalone.zig
@@ -38,9 +38,7 @@ pub fn addCases(cases: *tests.StandaloneContext) void {
cases.addBuildFile("test/standalone/pie/build.zig", .{});
}
// Try to build and run an Objective-C executable.
- if (std.Target.current.os.tag == .macos) {
- cases.addBuildFile("test/standalone/objc/build.zig", .{ .build_modes = true });
- }
+ cases.addBuildFile("test/standalone/objc/build.zig", .{ .build_modes = true, .requires_macos_sdk = true });
// Ensure the development tools are buildable.
cases.add("tools/gen_spirv_spec.zig");