mirror of
https://github.com/ziglang/zig.git
synced 2026-02-20 00:08:56 +00:00
integrate target features into building assembly code
This brings us up to par from what stage1 does. There will still be an open issue for completing this.
This commit is contained in:
parent
1ad60c4386
commit
6e9396e32b
@ -1,4 +1,3 @@
|
||||
* integrate target features into building assembly code
|
||||
* handle .d files from c objects
|
||||
* glibc .so files
|
||||
* support rpaths in ELF linker code
|
||||
@ -46,3 +45,4 @@
|
||||
* improve robustness of response file parsing
|
||||
* there are a couple panic("TODO") in clang options parsing
|
||||
* std.testing needs improvement to support exposing directory path for its tmp dir (look for "bogus")
|
||||
* integrate target features into building assembly code
|
||||
|
||||
@ -1241,10 +1241,20 @@ fn addCCArgs(
|
||||
},
|
||||
.so, .assembly, .ll, .bc, .unknown => {},
|
||||
}
|
||||
// TODO CLI args for cpu features when compiling assembly
|
||||
//for (size_t i = 0; i < g->zig_target->llvm_cpu_features_asm_len; i += 1) {
|
||||
// try argv.append(g->zig_target->llvm_cpu_features_asm_ptr[i]);
|
||||
//}
|
||||
// Argh, why doesn't the assembler accept the list of CPU features?!
|
||||
// I don't see a way to do this other than hard coding everything.
|
||||
switch (target.cpu.arch) {
|
||||
.riscv32, .riscv64 => {
|
||||
if (std.Target.riscv.featureSetHas(target.cpu.features, .relax)) {
|
||||
try argv.append("-mrelax");
|
||||
} else {
|
||||
try argv.append("-mno-relax");
|
||||
}
|
||||
},
|
||||
else => {
|
||||
// TODO
|
||||
},
|
||||
}
|
||||
|
||||
if (target.os.tag == .freestanding) {
|
||||
try argv.append("-ffreestanding");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user