diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/stage1/codegen.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/stage1/codegen.cpp b/src/stage1/codegen.cpp index 85b464baca..1a6f047ee1 100644 --- a/src/stage1/codegen.cpp +++ b/src/stage1/codegen.cpp @@ -589,6 +589,13 @@ static LLVMValueRef make_fn_llvm_value(CodeGen *g, ZigFn *fn) { // use the ABI alignment, which is fine. } + if (g->zig_target->llvm_cpu_name != nullptr) { + ZigLLVMAddFunctionAttr(llvm_fn, "target-cpu", g->zig_target->llvm_cpu_name); + } + if (g->zig_target->llvm_cpu_features != nullptr) { + ZigLLVMAddFunctionAttr(llvm_fn, "target-features", g->zig_target->llvm_cpu_features); + } + if (is_async) { addLLVMArgAttr(llvm_fn, 0, "nonnull"); } else { |
