@@ -90,8 +90,6 @@ pub fn build(b: *std.Build) !void {
9090 const skip_libc = b .option (bool , "skip-libc" , "Main test suite skips tests that link libc" ) orelse false ;
9191 const skip_single_threaded = b .option (bool , "skip-single-threaded" , "Main test suite skips tests that are single-threaded" ) orelse false ;
9292 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 ;
9593 const skip_freebsd = b .option (bool , "skip-freebsd" , "Main test suite skips targets with freebsd OS" ) orelse false ;
9694 const skip_netbsd = b .option (bool , "skip-netbsd" , "Main test suite skips targets with netbsd OS" ) orelse false ;
9795 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 {
202200 });
203201 exe .pie = pie ;
204202 exe .entitlements = entitlements ;
203+ exe .use_new_linker = b .option (bool , "new-linker" , "Use the new linker" );
205204
206205 const use_llvm = b .option (bool , "use-llvm" , "Use the llvm backend" );
207206 exe .use_llvm = use_llvm ;
@@ -415,7 +414,7 @@ pub fn build(b: *std.Build) !void {
415414 test_step .dependOn (check_fmt );
416415
417416 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 , .{
419418 .test_filters = test_filters ,
420419 .test_target_filters = test_target_filters ,
421420 .skip_compile_errors = skip_compile_errors ,
@@ -427,9 +426,6 @@ pub fn build(b: *std.Build) !void {
427426 .skip_linux = skip_linux ,
428427 .skip_llvm = skip_llvm ,
429428 .skip_libc = skip_libc ,
430- }, .{
431- .skip_translate_c = skip_translate_c ,
432- .skip_run_translated_c = skip_run_translated_c ,
433429 }, .{
434430 .enable_llvm = enable_llvm ,
435431 .llvm_has_m68k = llvm_has_m68k ,
@@ -464,28 +460,6 @@ pub fn build(b: *std.Build) !void {
464460 .max_rss = 4000000000 ,
465461 }));
466462
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-
489463 test_modules_step .dependOn (tests .addModuleTests (b , .{
490464 .test_filters = test_filters ,
491465 .test_target_filters = test_target_filters ,
@@ -576,7 +550,6 @@ pub fn build(b: *std.Build) !void {
576550 enable_macos_sdk ,
577551 enable_ios_sdk ,
578552 enable_symlinks_windows ,
579- skip_translate_c ,
580553 ));
581554 test_step .dependOn (tests .addCAbiTests (b , .{
582555 .test_target_filters = test_target_filters ,
@@ -631,6 +604,12 @@ pub fn build(b: *std.Build) !void {
631604 const test_incremental_step = b .step ("test-incremental" , "Run the incremental compilation test cases" );
632605 try tests .addIncrementalTests (b , test_incremental_step );
633606 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 );
634613}
635614
636615fn addWasiUpdateStep (b : * std.Build , version : [:0 ]const u8 ) ! void {
@@ -725,13 +704,7 @@ fn addCompilerMod(b: *std.Build, options: AddCompilerModOptions) *std.Build.Modu
725704 .root_source_file = b .path ("lib/compiler/aro/aro.zig" ),
726705 });
727706
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 );
733707 compiler_mod .addImport ("aro" , aro_mod );
734- compiler_mod .addImport ("aro_translate_c" , aro_translate_c_mod );
735708
736709 return compiler_mod ;
737710}
@@ -1151,7 +1124,6 @@ fn toNativePathSep(b: *std.Build, s: []const u8) []u8 {
11511124const zig_cpp_sources = [_ ][]const u8 {
11521125 // These are planned to stay even when we are self-hosted.
11531126 "src/zig_llvm.cpp" ,
1154- "src/zig_clang.cpp" ,
11551127 "src/zig_llvm-ar.cpp" ,
11561128 "src/zig_clang_driver.cpp" ,
11571129 "src/zig_clang_cc1_main.cpp" ,
0 commit comments