aboutsummaryrefslogtreecommitdiff
path: root/src/Compilation.zig
diff options
context:
space:
mode:
authorJacob Young <jacobly0@users.noreply.github.com>2023-11-03 23:18:21 -0400
committerJacob Young <jacobly0@users.noreply.github.com>2023-11-03 23:18:21 -0400
commit509be7cf1f10c5d329d2b0524f2af6bfcabd52de (patch)
tree655825e5800a1c79e8ccc0abe5011dd47655a96a /src/Compilation.zig
parentf6de3ec963e3a7d96cd4f6c72b0f076f0437c45d (diff)
downloadzig-509be7cf1f10c5d329d2b0524f2af6bfcabd52de.tar.gz
zig-509be7cf1f10c5d329d2b0524f2af6bfcabd52de.zip
x86_64: fix std test failures
Diffstat (limited to 'src/Compilation.zig')
-rw-r--r--src/Compilation.zig4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig
index f51500cf43..a041a4b188 100644
--- a/src/Compilation.zig
+++ b/src/Compilation.zig
@@ -1121,7 +1121,9 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation {
const include_compiler_rt = options.want_compiler_rt orelse needs_c_symbols;
const must_single_thread = target_util.isSingleThreaded(options.target);
- const single_threaded = options.single_threaded orelse must_single_thread;
+ const single_threaded = options.single_threaded orelse must_single_thread or
+ // x86_64 codegen doesn't support TLV for most object formats
+ (!use_llvm and options.target.cpu.arch == .x86_64 and options.target.ofmt != .macho);
if (must_single_thread and !single_threaded) {
return error.TargetRequiresSingleThreaded;
}