| ... | ... | @@ -26,6 +26,7 @@ const ModuleTestTarget = struct { |
| 26 | 26 | single_threaded: ?bool = null, |
| 27 | 27 | use_llvm: ?bool = null, |
| 28 | 28 | use_lld: ?bool = null, |
| 29 | new_linker: ?bool = null, |
| 29 | 30 | pic: ?bool = null, |
| 30 | 31 | strip: ?bool = null, |
| 31 | 32 | function_sections: ?bool = null, |
| ... | ... | @@ -1288,6 +1289,34 @@ const module_test_targets = blk: { |
| 1288 | 1289 | }, |
| 1289 | 1290 | .link_libc = true, |
| 1290 | 1291 | }, |
| 1292 | .{ |
| 1293 | .target = .{ |
| 1294 | .cpu_arch = .x86_64, |
| 1295 | .os_tag = .linux, |
| 1296 | }, |
| 1297 | .new_linker = true, |
| 1298 | .skip_modules = &.{ "compiler-rt", "behavior" }, // '@export' with '.internal' linkage |
| 1299 | }, |
| 1300 | .{ |
| 1301 | .target = .{ |
| 1302 | .cpu_arch = .x86_64, |
| 1303 | .os_tag = .linux, |
| 1304 | .abi = .musl, |
| 1305 | }, |
| 1306 | .link_libc = true, |
| 1307 | .new_linker = true, |
| 1308 | .skip_modules = &.{ "compiler-rt", "behavior" }, // '@export' with '.internal' linkage |
| 1309 | }, |
| 1310 | .{ |
| 1311 | .target = .{ |
| 1312 | .cpu_arch = .x86_64, |
| 1313 | .os_tag = .linux, |
| 1314 | .abi = .gnu, |
| 1315 | }, |
| 1316 | .link_libc = true, |
| 1317 | .new_linker = true, |
| 1318 | .skip_modules = &.{ "compiler-rt", "behavior" }, // '@export' with '.internal' linkage |
| 1319 | }, |
| 1291 | 1320 | |
| 1292 | 1321 | // Darwin Targets |
| 1293 | 1322 | |
| ... | ... | @@ -2821,6 +2850,7 @@ fn addOneModuleTest( |
| 2821 | 2850 | .zig_lib_dir = b.path("lib"), |
| 2822 | 2851 | }); |
| 2823 | 2852 | these_tests.linkage = test_target.linkage; |
| 2853 | these_tests.use_new_linker = test_target.new_linker; |
| 2824 | 2854 | // https://codeberg.org/ziglang/zig/issues/31701 |
| 2825 | 2855 | if (!(mem.eql(u8, options.name, "compiler-rt") or mem.eql(u8, options.name, "libc"))) { |
| 2826 | 2856 | if (options.no_builtin) these_tests.root_module.no_builtin = true; |
| ... | ... | @@ -2847,7 +2877,11 @@ fn addOneModuleTest( |
| 2847 | 2877 | "-selfhosted" |
| 2848 | 2878 | else |
| 2849 | 2879 | ""; |
| 2850 | | const use_lld = if (test_target.use_lld == false) "-no-lld" else ""; |
| 2880 | const linker_suffix: []const u8 = s: { |
| 2881 | if (test_target.new_linker == true) break :s "-new-linker"; |
| 2882 | if (test_target.use_lld == false) break :s "-no-lld"; |
| 2883 | break :s ""; |
| 2884 | }; |
| 2851 | 2885 | const linkage_name = if (test_target.linkage) |linkage| switch (linkage) { |
| 2852 | 2886 | inline else => |t| "-" ++ @tagName(t), |
| 2853 | 2887 | } else ""; |
| ... | ... | @@ -2863,7 +2897,7 @@ fn addOneModuleTest( |
| 2863 | 2897 | libc_suffix, |
| 2864 | 2898 | single_threaded_suffix, |
| 2865 | 2899 | backend_suffix, |
| 2866 | | use_lld, |
| 2900 | linker_suffix, |
| 2867 | 2901 | linkage_name, |
| 2868 | 2902 | use_pic, |
| 2869 | 2903 | }); |