| ... | @@ -28,6 +28,8 @@ const TestTarget = struct { | ... | @@ -28,6 +28,8 @@ const TestTarget = struct { |
| 28 | use_lld: ?bool = null, | 28 | use_lld: ?bool = null, |
| 29 | pic: ?bool = null, | 29 | pic: ?bool = null, |
| 30 | strip: ?bool = null, | 30 | strip: ?bool = null, |
| | 31 | function_sections: ?bool = null, |
| | 32 | data_sections: ?bool = null, |
| 31 | skip_modules: []const []const u8 = &.{}, | 33 | skip_modules: []const []const u8 = &.{}, |
| 32 | | 34 | |
| 33 | // This is intended for targets that, for any reason, shouldn't be run as part of a normal test | 35 | // This is intended for targets that, for any reason, shouldn't be run as part of a normal test |
| ... | @@ -40,7 +42,7 @@ const test_targets = blk: { | ... | @@ -40,7 +42,7 @@ const test_targets = blk: { |
| 40 | // getBaselineCpuFeatures calls populateDependencies which has a O(N ^ 2) algorithm | 42 | // getBaselineCpuFeatures calls populateDependencies which has a O(N ^ 2) algorithm |
| 41 | // (where N is roughly 160, which technically makes it O(1), but it adds up to a | 43 | // (where N is roughly 160, which technically makes it O(1), but it adds up to a |
| 42 | // lot of branches) | 44 | // lot of branches) |
| 43 | @setEvalBranchQuota(60000); | 45 | @setEvalBranchQuota(80_000); |
| 44 | break :blk [_]TestTarget{ | 46 | break :blk [_]TestTarget{ |
| 45 | // Native Targets | 47 | // Native Targets |
| 46 | | 48 | |
| ... | @@ -1526,36 +1528,43 @@ const test_targets = blk: { | ... | @@ -1526,36 +1528,43 @@ const test_targets = blk: { |
| 1526 | }, | 1528 | }, |
| 1527 | | 1529 | |
| 1528 | .{ | 1530 | .{ |
| 1529 | .target = .{ | 1531 | .target = std.Target.Query.parse(.{ |
| 1530 | .cpu_arch = .thumb, | 1532 | .arch_os_abi = "thumb-windows-msvc", |
| 1531 | .os_tag = .windows, | 1533 | .cpu_features = "baseline+long_calls", |
| 1532 | .abi = .msvc, | 1534 | }) catch unreachable, |
| 1533 | }, | 1535 | .pic = false, // Long calls don't work with PIC. |
| | 1536 | .function_sections = true, |
| | 1537 | .data_sections = true, |
| 1534 | }, | 1538 | }, |
| 1535 | .{ | 1539 | .{ |
| 1536 | .target = .{ | 1540 | .target = std.Target.Query.parse(.{ |
| 1537 | .cpu_arch = .thumb, | 1541 | .arch_os_abi = "thumb-windows-msvc", |
| 1538 | .os_tag = .windows, | 1542 | .cpu_features = "baseline+long_calls", |
| 1539 | .abi = .msvc, | 1543 | }) catch unreachable, |
| 1540 | }, | | |
| 1541 | .link_libc = true, | 1544 | .link_libc = true, |
| | 1545 | .pic = false, // Long calls don't work with PIC. |
| | 1546 | .function_sections = true, |
| | 1547 | .data_sections = true, |
| | 1548 | }, |
| | 1549 | .{ |
| | 1550 | .target = std.Target.Query.parse(.{ |
| | 1551 | .arch_os_abi = "thumb-windows-gnu", |
| | 1552 | .cpu_features = "baseline+long_calls", |
| | 1553 | }) catch unreachable, |
| | 1554 | .pic = false, // Long calls don't work with PIC. |
| | 1555 | .function_sections = true, |
| | 1556 | .data_sections = true, |
| | 1557 | }, |
| | 1558 | .{ |
| | 1559 | .target = std.Target.Query.parse(.{ |
| | 1560 | .arch_os_abi = "thumb-windows-gnu", |
| | 1561 | .cpu_features = "baseline+long_calls", |
| | 1562 | }) catch unreachable, |
| | 1563 | .link_libc = true, |
| | 1564 | .pic = false, // Long calls don't work with PIC. |
| | 1565 | .function_sections = true, |
| | 1566 | .data_sections = true, |
| 1542 | }, | 1567 | }, |
| 1543 | // https://github.com/ziglang/zig/issues/24016 | | |
| 1544 | // .{ | | |
| 1545 | // .target = .{ | | |
| 1546 | // .cpu_arch = .thumb, | | |
| 1547 | // .os_tag = .windows, | | |
| 1548 | // .abi = .gnu, | | |
| 1549 | // }, | | |
| 1550 | // }, | | |
| 1551 | // .{ | | |
| 1552 | // .target = .{ | | |
| 1553 | // .cpu_arch = .thumb, | | |
| 1554 | // .os_tag = .windows, | | |
| 1555 | // .abi = .gnu, | | |
| 1556 | // }, | | |
| 1557 | // .link_libc = true, | | |
| 1558 | // }, | | |
| 1559 | | 1568 | |
| 1560 | .{ | 1569 | .{ |
| 1561 | .target = .{ | 1570 | .target = .{ |
| ... | @@ -2454,6 +2463,8 @@ fn addOneModuleTest( | ... | @@ -2454,6 +2463,8 @@ fn addOneModuleTest( |
| 2454 | if (options.build_options) |build_options| { | 2463 | if (options.build_options) |build_options| { |
| 2455 | these_tests.root_module.addOptions("build_options", build_options); | 2464 | these_tests.root_module.addOptions("build_options", build_options); |
| 2456 | } | 2465 | } |
| | 2466 | if (test_target.function_sections) |fs| these_tests.link_function_sections = fs; |
| | 2467 | if (test_target.data_sections) |ds| these_tests.link_data_sections = ds; |
| 2457 | const single_threaded_suffix = if (test_target.single_threaded == true) "-single" else ""; | 2468 | const single_threaded_suffix = if (test_target.single_threaded == true) "-single" else ""; |
| 2458 | const backend_suffix = if (test_target.use_llvm == true) | 2469 | const backend_suffix = if (test_target.use_llvm == true) |
| 2459 | "-llvm" | 2470 | "-llvm" |