aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index f7cfc95b3a..c2dcdb38b8 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -8785,15 +8785,15 @@ static void init(CodeGen *g) {
const char *target_specific_features = "";
if (g->zig_target->is_native) {
+ target_specific_cpu_args = ZigLLVMGetHostCPUName();
+ target_specific_features = ZigLLVMGetNativeFeatures();
// LLVM creates invalid binaries on Windows sometimes.
// See https://github.com/ziglang/zig/issues/508
// As a workaround we do not use target native features on Windows.
+ // This logic is repeated in stage1.zig
if (g->zig_target->os == OsWindows || g->zig_target->os == OsUefi) {
target_specific_cpu_args = "";
target_specific_features = "";
- } else {
- target_specific_cpu_args = ZigLLVMGetHostCPUName();
- target_specific_features = ZigLLVMGetNativeFeatures();
}
}