mirror of
https://github.com/ziglang/zig.git
synced 2026-02-17 06:49:23 +00:00
Compilation: Pass -fPIC for assembly files too, not just C files.
There are targets (e.g. MIPS) where PIC actually affects assembler behavior.
This commit is contained in:
parent
e084c46ed6
commit
f10b226c77
@ -5636,10 +5636,6 @@ pub fn addCCArgs(
|
||||
try argv.append("-Werror=date-time");
|
||||
}
|
||||
|
||||
if (target_util.supports_fpic(target) and mod.pic) {
|
||||
try argv.append("-fPIC");
|
||||
}
|
||||
|
||||
if (mod.unwind_tables) {
|
||||
try argv.append("-funwind-tables");
|
||||
} else {
|
||||
@ -5730,6 +5726,10 @@ pub fn addCCArgs(
|
||||
},
|
||||
}
|
||||
|
||||
if (target_util.supports_fpic(target) and mod.pic) {
|
||||
try argv.append("-fPIC");
|
||||
}
|
||||
|
||||
try argv.ensureUnusedCapacity(2);
|
||||
switch (comp.config.debug_format) {
|
||||
.strip => {},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user