zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 4569a28ea35e7152f01db1d36c493506b6ca71b6 (tree)
parent c79073c176a909abce3feba96203caef1e6d8360
Author: kcbanner <kcbanner@gmail.com>
Date:   Sat, 25 Mar 2023 16:33:25 -0400

build: fixes from review

Diffstat:
Mlib/std/Build/CompileStep.zig | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/std/Build/CompileStep.zig b/lib/std/Build/CompileStep.zig @@ -140,7 +140,8 @@ link_function_sections: bool = false, /// exported symbols. link_gc_sections: ?bool = null, -linker_dynamicbase: ?bool = null, +/// (Windows) Whether or not to enable ASLR. Maps to the /DYNAMICBASE[:NO] linker argument. +linker_dynamicbase: bool = true, linker_allow_shlib_undefined: ?bool = null, @@ -1476,8 +1477,8 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void { if (self.link_gc_sections) |x| { try zig_args.append(if (x) "--gc-sections" else "--no-gc-sections"); } - if (self.linker_dynamicbase) |x| { - if (!x) try zig_args.append("--no-dynamicbase"); + if (!self.linker_dynamicbase) { + try zig_args.append("--no-dynamicbase"); } if (self.linker_allow_shlib_undefined) |x| { try zig_args.append(if (x) "-fallow-shlib-undefined" else "-fno-allow-shlib-undefined");