diff options
| author | Luuk de Gram <luuk@degram.dev> | 2023-09-01 16:37:07 +0200 |
|---|---|---|
| committer | Luuk de Gram <luuk@degram.dev> | 2023-11-03 12:48:53 +0100 |
| commit | 938f9dea374193972be05b19b58dced54d79b1cb (patch) | |
| tree | 3778a6e153a29ffa267c9ab3e6b64824466d6d25 /lib/std/Build/Step/Compile.zig | |
| parent | 58618afaee7c14feedad4f115e9a4468bac4c529 (diff) | |
| download | zig-938f9dea374193972be05b19b58dced54d79b1cb.tar.gz zig-938f9dea374193972be05b19b58dced54d79b1cb.zip | |
update linker tests
This updates all linker tests to include `no_entry` as well as changes
all tests to executable so they do not need to be updated later when
the in-house WebAssembly linker supports dynamic libraries.
Diffstat (limited to 'lib/std/Build/Step/Compile.zig')
| -rw-r--r-- | lib/std/Build/Step/Compile.zig | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/std/Build/Step/Compile.zig b/lib/std/Build/Step/Compile.zig index 18977ac472..f59de11deb 100644 --- a/lib/std/Build/Step/Compile.zig +++ b/lib/std/Build/Step/Compile.zig @@ -1853,7 +1853,11 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void { if (self.global_base) |global_base| { try zig_args.append(b.fmt("--global-base={d}", .{global_base})); } - try addFlag(&zig_args, "entry", self.no_entry); + // invert the value due to naming so when `no_entry` is set to 'true' + // we actually emit the flag `-fno_entry`. + if (self.no_entry) |no_entry| { + try addFlag(&zig_args, "entry", !no_entry); + } if (self.code_model != .default) { try zig_args.append("-mcmodel"); |
