diff --git a/src/Compilation.zig b/src/Compilation.zig index 16d290c1931760a0441b18d7480678b0068218e5..f6b30ef3f9c1c91abf29381d6b9d2b273ef6a424 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -6667,6 +6667,8 @@ pub fn addCCArgs( // Only compiled files support these flags. switch (ext) { + .assembly, + .assembly_with_cpp, .c, .h, .cpp, diff --git a/test/tests.zig b/test/tests.zig index b543d0d48f80e74bb943fae1da93a868278e8363..e2f62400d1d0efa4d40966263e64d4d80e0f2306 100644 --- a/test/tests.zig +++ b/test/tests.zig @@ -455,6 +455,23 @@ const module_test_targets = blk: { .abi = .none, }, }, + .{ + .target = .{ + .cpu_arch = .loongarch32, + .os_tag = .linux, + .abi = .gnu, + }, + .link_libc = true, + }, + .{ + .target = .{ + .cpu_arch = .loongarch32, + .os_tag = .linux, + .abi = .gnusf, + }, + .link_libc = true, + .extra_target = true, + }, .{ .target = .{