@@ -90,8 +90,6 @@ pub fn build(b: *std.Build) !void {
90
90
const skip_libc = b .option (bool , "skip-libc" , "Main test suite skips tests that link libc" ) orelse false ;
91
91
const skip_single_threaded = b .option (bool , "skip-single-threaded" , "Main test suite skips tests that are single-threaded" ) orelse false ;
92
92
const skip_compile_errors = b .option (bool , "skip-compile-errors" , "Main test suite skips compile error tests" ) orelse false ;
93
- const skip_translate_c = b .option (bool , "skip-translate-c" , "Main test suite skips translate-c tests" ) orelse false ;
94
- const skip_run_translated_c = b .option (bool , "skip-run-translated-c" , "Main test suite skips run-translated-c tests" ) orelse skip_translate_c ;
95
93
const skip_freebsd = b .option (bool , "skip-freebsd" , "Main test suite skips targets with freebsd OS" ) orelse false ;
96
94
const skip_netbsd = b .option (bool , "skip-netbsd" , "Main test suite skips targets with netbsd OS" ) orelse false ;
97
95
const skip_windows = b .option (bool , "skip-windows" , "Main test suite skips targets with windows OS" ) orelse false ;
@@ -202,6 +200,7 @@ pub fn build(b: *std.Build) !void {
202
200
});
203
201
exe .pie = pie ;
204
202
exe .entitlements = entitlements ;
203
+ exe .use_new_linker = b .option (bool , "new-linker" , "Use the new linker" );
205
204
206
205
const use_llvm = b .option (bool , "use-llvm" , "Use the llvm backend" );
207
206
exe .use_llvm = use_llvm ;
@@ -415,7 +414,7 @@ pub fn build(b: *std.Build) !void {
415
414
test_step .dependOn (check_fmt );
416
415
417
416
const test_cases_step = b .step ("test-cases" , "Run the main compiler test cases" );
418
- try tests .addCases (b , test_cases_step , target , .{
417
+ try tests .addCases (b , test_cases_step , .{
419
418
.test_filters = test_filters ,
420
419
.test_target_filters = test_target_filters ,
421
420
.skip_compile_errors = skip_compile_errors ,
@@ -427,9 +426,6 @@ pub fn build(b: *std.Build) !void {
427
426
.skip_linux = skip_linux ,
428
427
.skip_llvm = skip_llvm ,
429
428
.skip_libc = skip_libc ,
430
- }, .{
431
- .skip_translate_c = skip_translate_c ,
432
- .skip_run_translated_c = skip_run_translated_c ,
433
429
}, .{
434
430
.enable_llvm = enable_llvm ,
435
431
.llvm_has_m68k = llvm_has_m68k ,
@@ -464,28 +460,6 @@ pub fn build(b: *std.Build) !void {
464
460
.max_rss = 4000000000 ,
465
461
}));
466
462
467
- if (! skip_translate_c ) {
468
- test_modules_step .dependOn (tests .addModuleTests (b , .{
469
- .test_filters = test_filters ,
470
- .test_target_filters = test_target_filters ,
471
- .test_extra_targets = test_extra_targets ,
472
- .root_src = "test/c_import.zig" ,
473
- .name = "c-import" ,
474
- .desc = "Run the @cImport tests" ,
475
- .optimize_modes = optimization_modes ,
476
- .include_paths = &.{"test/c_import" },
477
- .skip_single_threaded = true ,
478
- .skip_non_native = skip_non_native ,
479
- .skip_freebsd = skip_freebsd ,
480
- .skip_netbsd = skip_netbsd ,
481
- .skip_windows = skip_windows ,
482
- .skip_macos = skip_macos ,
483
- .skip_linux = skip_linux ,
484
- .skip_llvm = skip_llvm ,
485
- .skip_libc = skip_libc ,
486
- }));
487
- }
488
-
489
463
test_modules_step .dependOn (tests .addModuleTests (b , .{
490
464
.test_filters = test_filters ,
491
465
.test_target_filters = test_target_filters ,
@@ -576,7 +550,6 @@ pub fn build(b: *std.Build) !void {
576
550
enable_macos_sdk ,
577
551
enable_ios_sdk ,
578
552
enable_symlinks_windows ,
579
- skip_translate_c ,
580
553
));
581
554
test_step .dependOn (tests .addCAbiTests (b , .{
582
555
.test_target_filters = test_target_filters ,
@@ -631,6 +604,12 @@ pub fn build(b: *std.Build) !void {
631
604
const test_incremental_step = b .step ("test-incremental" , "Run the incremental compilation test cases" );
632
605
try tests .addIncrementalTests (b , test_incremental_step );
633
606
test_step .dependOn (test_incremental_step );
607
+
608
+ if (tests .addLibcTests (b , .{
609
+ .optimize_modes = optimization_modes ,
610
+ .test_filters = test_filters ,
611
+ .test_target_filters = test_target_filters ,
612
+ })) | test_libc_step | test_step .dependOn (test_libc_step );
634
613
}
635
614
636
615
fn addWasiUpdateStep (b : * std.Build , version : [:0 ]const u8 ) ! void {
@@ -725,13 +704,7 @@ fn addCompilerMod(b: *std.Build, options: AddCompilerModOptions) *std.Build.Modu
725
704
.root_source_file = b .path ("lib/compiler/aro/aro.zig" ),
726
705
});
727
706
728
- const aro_translate_c_mod = b .createModule (.{
729
- .root_source_file = b .path ("lib/compiler/aro_translate_c.zig" ),
730
- });
731
-
732
- aro_translate_c_mod .addImport ("aro" , aro_mod );
733
707
compiler_mod .addImport ("aro" , aro_mod );
734
- compiler_mod .addImport ("aro_translate_c" , aro_translate_c_mod );
735
708
736
709
return compiler_mod ;
737
710
}
@@ -1151,7 +1124,6 @@ fn toNativePathSep(b: *std.Build, s: []const u8) []u8 {
1151
1124
const zig_cpp_sources = [_ ][]const u8 {
1152
1125
// These are planned to stay even when we are self-hosted.
1153
1126
"src/zig_llvm.cpp" ,
1154
- "src/zig_clang.cpp" ,
1155
1127
"src/zig_llvm-ar.cpp" ,
1156
1128
"src/zig_clang_driver.cpp" ,
1157
1129
"src/zig_clang_cc1_main.cpp" ,
0 commit comments