aboutsummaryrefslogtreecommitdiff
path: root/test/standalone/stack_iterator
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2024-01-02 14:11:27 -0800
committerGitHub <noreply@github.com>2024-01-02 14:11:27 -0800
commit289ae45c1b58e952867c4fa1e246d0ef7bc2ff64 (patch)
tree5dd034143a2354b7b44496e684f1c764e2f9664c /test/standalone/stack_iterator
parentc89bb3e141ee215add0b52930d48bffd8dae8342 (diff)
parentc546ddb3edc557fae4b932e5239b9dcb66117832 (diff)
downloadzig-289ae45c1b58e952867c4fa1e246d0ef7bc2ff64.tar.gz
zig-289ae45c1b58e952867c4fa1e246d0ef7bc2ff64.zip
Merge pull request #18160 from ziglang/std-build-module
Move many settings from being per-Compilation to being per-Module
Diffstat (limited to 'test/standalone/stack_iterator')
-rw-r--r--test/standalone/stack_iterator/build.zig19
1 files changed, 9 insertions, 10 deletions
diff --git a/test/standalone/stack_iterator/build.zig b/test/standalone/stack_iterator/build.zig
index 628210452c..463a533ac4 100644
--- a/test/standalone/stack_iterator/build.zig
+++ b/test/standalone/stack_iterator/build.zig
@@ -22,11 +22,10 @@ pub fn build(b: *std.Build) void {
.root_source_file = .{ .path = "unwind.zig" },
.target = target,
.optimize = optimize,
+ .unwind_tables = if (target.result.isDarwin()) true else null,
+ .omit_frame_pointer = false,
});
- if (target.isDarwin()) exe.unwind_tables = true;
- exe.omit_frame_pointer = false;
-
const run_cmd = b.addRunArtifact(exe);
test_step.dependOn(&run_cmd.step);
}
@@ -46,11 +45,10 @@ pub fn build(b: *std.Build) void {
.root_source_file = .{ .path = "unwind.zig" },
.target = target,
.optimize = optimize,
+ .unwind_tables = true,
+ .omit_frame_pointer = true,
});
- exe.omit_frame_pointer = true;
- exe.unwind_tables = true;
-
const run_cmd = b.addRunArtifact(exe);
test_step.dependOn(&run_cmd.step);
}
@@ -69,11 +67,12 @@ pub fn build(b: *std.Build) void {
.name = "c_shared_lib",
.target = target,
.optimize = optimize,
+ .strip = false,
});
- if (target.isWindows()) c_shared_lib.defineCMacro("LIB_API", "__declspec(dllexport)");
+ if (target.result.os.tag == .windows)
+ c_shared_lib.defineCMacro("LIB_API", "__declspec(dllexport)");
- c_shared_lib.strip = false;
c_shared_lib.addCSourceFile(.{
.file = .{ .path = "shared_lib.c" },
.flags = &.{"-fomit-frame-pointer"},
@@ -85,10 +84,10 @@ pub fn build(b: *std.Build) void {
.root_source_file = .{ .path = "shared_lib_unwind.zig" },
.target = target,
.optimize = optimize,
+ .unwind_tables = if (target.result.isDarwin()) true else null,
+ .omit_frame_pointer = true,
});
- if (target.isDarwin()) exe.unwind_tables = true;
- exe.omit_frame_pointer = true;
exe.linkLibrary(c_shared_lib);
const run_cmd = b.addRunArtifact(exe);