diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-01-21 21:01:36 -0500 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-01-21 21:01:36 -0500 |
| commit | 6e6ec3d71d1b5ecff8ad6bff5e159417abfa5382 (patch) | |
| tree | 97b2cf1c4153121c9d501ddc69bc7b07ea345964 /src/codegen.cpp | |
| parent | 68b6867e7689617b3dcef72a88414deaf3ede43b (diff) | |
| download | zig-6e6ec3d71d1b5ecff8ad6bff5e159417abfa5382.tar.gz zig-6e6ec3d71d1b5ecff8ad6bff5e159417abfa5382.zip | |
put hack back in to disable windows native cpu features
See #508. This can be removed when we upgrade to LLVM 10.
Diffstat (limited to 'src/codegen.cpp')
| -rw-r--r-- | src/codegen.cpp | 6 |
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(); } } |
