mirror of
https://github.com/ziglang/zig.git
synced 2026-02-14 13:30:45 +00:00
elf: ensure we build with -fPIE when testing init array order
This commit is contained in:
parent
43fb74f81a
commit
666e9df170
@ -1362,6 +1362,11 @@ fn testInitArrayOrder(b: *Build, opts: Options) *Step {
|
||||
exe.addObject(g_o);
|
||||
exe.addObject(h_o);
|
||||
|
||||
if (opts.target.isGnuLibC()) {
|
||||
// TODO I think we need to clarify our use of `-fPIC -fPIE` flags for different targets
|
||||
exe.pie = true;
|
||||
}
|
||||
|
||||
const run = addRunArtifact(exe);
|
||||
run.expectStdOutEqual("21348756");
|
||||
test_step.dependOn(&run.step);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user