| ... | @@ -140,7 +140,8 @@ link_function_sections: bool = false, | ... | @@ -140,7 +140,8 @@ link_function_sections: bool = false, |
| 140 | /// exported symbols. | 140 | /// exported symbols. |
| 141 | link_gc_sections: ?bool = null, | 141 | link_gc_sections: ?bool = null, |
| 142 | | 142 | |
| 143 | linker_dynamicbase: ?bool = null, | 143 | /// (Windows) Whether or not to enable ASLR. Maps to the /DYNAMICBASE[:NO] linker argument. |
| | 144 | linker_dynamicbase: bool = true, |
| 144 | | 145 | |
| 145 | linker_allow_shlib_undefined: ?bool = null, | 146 | linker_allow_shlib_undefined: ?bool = null, |
| 146 | | 147 | |
| ... | @@ -1476,8 +1477,8 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void { | ... | @@ -1476,8 +1477,8 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void { |
| 1476 | if (self.link_gc_sections) |x| { | 1477 | if (self.link_gc_sections) |x| { |
| 1477 | try zig_args.append(if (x) "--gc-sections" else "--no-gc-sections"); | 1478 | try zig_args.append(if (x) "--gc-sections" else "--no-gc-sections"); |
| 1478 | } | 1479 | } |
| 1479 | if (self.linker_dynamicbase) |x| { | 1480 | if (!self.linker_dynamicbase) { |
| 1480 | if (!x) try zig_args.append("--no-dynamicbase"); | 1481 | try zig_args.append("--no-dynamicbase"); |
| 1481 | } | 1482 | } |
| 1482 | if (self.linker_allow_shlib_undefined) |x| { | 1483 | if (self.linker_allow_shlib_undefined) |x| { |
| 1483 | try zig_args.append(if (x) "-fallow-shlib-undefined" else "-fno-allow-shlib-undefined"); | 1484 | try zig_args.append(if (x) "-fallow-shlib-undefined" else "-fno-allow-shlib-undefined"); |