riscv: make multi-threaded enabled compilation the default

This commit is contained in:
David Rubin 2024-07-26 14:44:38 -07:00
parent c20def73af
commit 8f84212855
No known key found for this signature in database
GPG Key ID: A4390FEB5F00C0A5
4 changed files with 2 additions and 5 deletions

View File

@ -159,7 +159,7 @@ pub fn create(arena: Allocator, options: CreateOptions) !*Package.Module {
if (options.inherited.single_threaded) |x| break :b x;
if (options.parent) |p| break :b p.single_threaded;
break :b target_util.defaultSingleThreaded(target, zig_backend);
break :b target_util.defaultSingleThreaded(target);
};
const error_tracing = b: {

View File

@ -60,10 +60,9 @@ pub fn alwaysSingleThreaded(target: std.Target) bool {
return false;
}
pub fn defaultSingleThreaded(target: std.Target, backend: std.builtin.CompilerBackend) bool {
pub fn defaultSingleThreaded(target: std.Target) bool {
switch (target.cpu.arch) {
.wasm32, .wasm64 => return true,
.riscv64 => if (backend == .stage2_riscv64) return true,
else => {},
}
switch (target.os.tag) {

View File

@ -118,7 +118,6 @@ test "if peer expressions inferred optional type" {
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
var self: []const u8 = "abcdef";
var index: usize = 0;

View File

@ -53,7 +53,6 @@ test "maybe return" {
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
try maybeReturnImpl();
try comptime maybeReturnImpl();