aboutsummaryrefslogtreecommitdiff
path: root/lib/std/build/EmulatableRunStep.zig
diff options
context:
space:
mode:
authorLuuk de Gram <luuk@degram.dev>2022-07-10 16:25:16 +0200
committerLuuk de Gram <luuk@degram.dev>2022-07-23 10:03:51 +0200
commit4776065036f9878c86e54fa83341fe8cdbb175f0 (patch)
treeb45ef95236a0bdc2eaf80c98b2773c638dc39679 /lib/std/build/EmulatableRunStep.zig
parent735b6eefe92b222a0405671517b67e3b6c5cdded (diff)
downloadzig-4776065036f9878c86e54fa83341fe8cdbb175f0.tar.gz
zig-4776065036f9878c86e54fa83341fe8cdbb175f0.zip
Use `EmulatableRunStep` for MachO linker tests
Diffstat (limited to 'lib/std/build/EmulatableRunStep.zig')
-rw-r--r--lib/std/build/EmulatableRunStep.zig7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/std/build/EmulatableRunStep.zig b/lib/std/build/EmulatableRunStep.zig
index 1f36401599..9745ebb89f 100644
--- a/lib/std/build/EmulatableRunStep.zig
+++ b/lib/std/build/EmulatableRunStep.zig
@@ -56,7 +56,12 @@ pub const StdIoAction = union(enum) {
pub fn create(builder: *Builder, name: []const u8, artifact: *LibExeObjStep) *EmulatableRunStep {
std.debug.assert(artifact.kind == .exe or artifact.kind == .test_exe);
const self = builder.allocator.create(EmulatableRunStep) catch unreachable;
- const hide_warnings = builder.option(bool, "hide-foreign-warnings", "Hide the warning when a foreign binary which is incompatible is skipped") orelse false;
+
+ const option_name = "hide-foreign-warnings";
+ const hide_warnings = if (builder.available_options_map.get(option_name) == null) warn: {
+ break :warn builder.option(bool, option_name, "Hide the warning when a foreign binary which is incompatible is skipped") orelse false;
+ } else false;
+
self.* = .{
.builder = builder,
.step = Step.init(.emulatable_run, name, builder.allocator, make),