Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
f49a547
compiler: update aro and translate-c to latest; delete clang translate-c
andrewrk Jul 18, 2025
1bdcdbd
delete all the translate-c tests
andrewrk Jul 18, 2025
328280b
move translate-c helpers
andrewrk Jul 18, 2025
d1820d2
delete enough aro to make it compile
andrewrk Jul 18, 2025
8e27821
simplify diagnostics
andrewrk Jul 18, 2025
01d993b
add translate-c CLI args
andrewrk Jul 18, 2025
e8e8d7e
resinator: Update for latest aro
squeek502 Jul 19, 2025
e7a622f
update aro and translate-c sources
Vexu Jul 28, 2025
21f5f06
Compilation: avoid passing Clang specific options to Aro
Vexu Jul 29, 2025
0f88f9c
aro: avoid BoundedArray
andrewrk Aug 11, 2025
2f00b63
remove c_builtins.zig from cmake
andrewrk Aug 11, 2025
e5f4dbd
fix rebase conflicts
andrewrk Aug 11, 2025
b693009
translate-c: update for array list defaults
andrewrk Aug 12, 2025
ea169e6
std.Build.Cache: clarify parameter is sub path, not basename
andrewrk Aug 12, 2025
9e979e5
Compilation: re-implement cImport
andrewrk Aug 12, 2025
f0d3b7a
aro: fix dep file logic
andrewrk Aug 13, 2025
f4d328e
Compilation: use renameTmpIntoCache
andrewrk Aug 13, 2025
9ad1e83
zig fmt
andrewrk Aug 13, 2025
e1d6f47
`@cImport`: don't pass args to Aro it doesn't understand
andrewrk Aug 13, 2025
79d9997
delete `@cImport` tests
andrewrk Aug 13, 2025
01132e0
remove behavior test that depended on std.zig.c_translation
andrewrk Aug 13, 2025
8cba6b1
aro: update
andrewrk Aug 21, 2025
aa92c23
aro does not have a pragma-pack warning
andrewrk Aug 21, 2025
3764f7b
compiler: disable InternPool.debug_state as it is unsound
andrewrk Aug 22, 2025
e05073b
aro does not have -mmacos version flags or -Wno-overriding-option
andrewrk Aug 22, 2025
d83c76e
update aro & translate-c
Vexu Sep 14, 2025
41e5331
resinator: fix compile errors
andrewrk Sep 25, 2025
5f763b7
resinator: work around error VARARGS not implemented for this compiler
andrewrk Sep 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ set(ZIG_CPP_SOURCES
# These are planned to stay even when we are self-hosted.
src/zig_llvm.cpp
src/zig_llvm-ar.cpp
src/zig_clang.cpp
src/zig_clang_driver.cpp
src/zig_clang_cc1_main.cpp
src/zig_clang_cc1as_main.cpp
Expand Down Expand Up @@ -502,7 +501,6 @@ set(ZIG_STAGE2_SOURCES
lib/std/zig/Server.zig
lib/std/zig/WindowsSdk.zig
lib/std/zig/Zir.zig
lib/std/zig/c_builtins.zig
lib/std/zig/string_literal.zig
lib/std/zig/system.zig
lib/std/zig/system/NativePaths.zig
Expand Down Expand Up @@ -537,7 +535,6 @@ set(ZIG_STAGE2_SOURCES
src/Value.zig
src/Zcu.zig
src/Zcu/PerThread.zig
src/clang.zig
src/clang_options.zig
src/clang_options_data.zig
src/codegen.zig
Expand Down Expand Up @@ -641,7 +638,6 @@ set(ZIG_STAGE2_SOURCES
src/register_manager.zig
src/target.zig
src/tracy.zig
src/translate_c.zig
src/libs/wasi_libc.zig
)

Expand Down
37 changes: 1 addition & 36 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@ pub fn build(b: *std.Build) !void {
const skip_libc = b.option(bool, "skip-libc", "Main test suite skips tests that link libc") orelse false;
const skip_single_threaded = b.option(bool, "skip-single-threaded", "Main test suite skips tests that are single-threaded") orelse false;
const skip_compile_errors = b.option(bool, "skip-compile-errors", "Main test suite skips compile error tests") orelse false;
const skip_translate_c = b.option(bool, "skip-translate-c", "Main test suite skips translate-c tests") orelse false;
const skip_run_translated_c = b.option(bool, "skip-run-translated-c", "Main test suite skips run-translated-c tests") orelse skip_translate_c;
const skip_freebsd = b.option(bool, "skip-freebsd", "Main test suite skips targets with freebsd OS") orelse false;
const skip_netbsd = b.option(bool, "skip-netbsd", "Main test suite skips targets with netbsd OS") orelse false;
const skip_windows = b.option(bool, "skip-windows", "Main test suite skips targets with windows OS") orelse false;
Expand Down Expand Up @@ -416,7 +414,7 @@ pub fn build(b: *std.Build) !void {
test_step.dependOn(check_fmt);

const test_cases_step = b.step("test-cases", "Run the main compiler test cases");
try tests.addCases(b, test_cases_step, target, .{
try tests.addCases(b, test_cases_step, .{
.test_filters = test_filters,
.test_target_filters = test_target_filters,
.skip_compile_errors = skip_compile_errors,
Expand All @@ -428,9 +426,6 @@ pub fn build(b: *std.Build) !void {
.skip_linux = skip_linux,
.skip_llvm = skip_llvm,
.skip_libc = skip_libc,
}, .{
.skip_translate_c = skip_translate_c,
.skip_run_translated_c = skip_run_translated_c,
}, .{
.enable_llvm = enable_llvm,
.llvm_has_m68k = llvm_has_m68k,
Expand Down Expand Up @@ -465,28 +460,6 @@ pub fn build(b: *std.Build) !void {
.max_rss = 4000000000,
}));

if (!skip_translate_c) {
test_modules_step.dependOn(tests.addModuleTests(b, .{
.test_filters = test_filters,
.test_target_filters = test_target_filters,
.test_extra_targets = test_extra_targets,
.root_src = "test/c_import.zig",
.name = "c-import",
.desc = "Run the @cImport tests",
.optimize_modes = optimization_modes,
.include_paths = &.{"test/c_import"},
.skip_single_threaded = true,
.skip_non_native = skip_non_native,
.skip_freebsd = skip_freebsd,
.skip_netbsd = skip_netbsd,
.skip_windows = skip_windows,
.skip_macos = skip_macos,
.skip_linux = skip_linux,
.skip_llvm = skip_llvm,
.skip_libc = skip_libc,
}));
}

test_modules_step.dependOn(tests.addModuleTests(b, .{
.test_filters = test_filters,
.test_target_filters = test_target_filters,
Expand Down Expand Up @@ -577,7 +550,6 @@ pub fn build(b: *std.Build) !void {
enable_macos_sdk,
enable_ios_sdk,
enable_symlinks_windows,
skip_translate_c,
));
test_step.dependOn(tests.addCAbiTests(b, .{
.test_target_filters = test_target_filters,
Expand Down Expand Up @@ -732,13 +704,7 @@ fn addCompilerMod(b: *std.Build, options: AddCompilerModOptions) *std.Build.Modu
.root_source_file = b.path("lib/compiler/aro/aro.zig"),
});

const aro_translate_c_mod = b.createModule(.{
.root_source_file = b.path("lib/compiler/aro_translate_c.zig"),
});

aro_translate_c_mod.addImport("aro", aro_mod);
compiler_mod.addImport("aro", aro_mod);
compiler_mod.addImport("aro_translate_c", aro_translate_c_mod);

return compiler_mod;
}
Expand Down Expand Up @@ -1158,7 +1124,6 @@ fn toNativePathSep(b: *std.Build, s: []const u8) []u8 {
const zig_cpp_sources = [_][]const u8{
// These are planned to stay even when we are self-hosted.
"src/zig_llvm.cpp",
"src/zig_clang.cpp",
"src/zig_llvm-ar.cpp",
"src/zig_clang_driver.cpp",
"src/zig_clang_cc1_main.cpp",
Expand Down
26 changes: 0 additions & 26 deletions lib/compiler/aro/README.md

This file was deleted.

10 changes: 6 additions & 4 deletions lib/compiler/aro/aro.zig
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,22 @@ pub const Driver = @import("aro/Driver.zig");
pub const Parser = @import("aro/Parser.zig");
pub const Preprocessor = @import("aro/Preprocessor.zig");
pub const Source = @import("aro/Source.zig");
pub const StringInterner = @import("aro/StringInterner.zig");
pub const target_util = @import("aro/target.zig");
pub const Tokenizer = @import("aro/Tokenizer.zig");
pub const Toolchain = @import("aro/Toolchain.zig");
pub const Tree = @import("aro/Tree.zig");
pub const Type = @import("aro/Type.zig");
pub const TypeMapper = @import("aro/StringInterner.zig").TypeMapper;
pub const target_util = @import("aro/target.zig");
pub const TypeStore = @import("aro/TypeStore.zig");
pub const QualType = TypeStore.QualType;
pub const Type = TypeStore.Type;
pub const Value = @import("aro/Value.zig");

const backend = @import("backend.zig");
pub const Interner = backend.Interner;
pub const Ir = backend.Ir;
pub const Object = backend.Object;
pub const CallingConvention = backend.CallingConvention;
pub const Assembly = backend.Assembly;

pub const version_str = backend.version_str;
pub const version = backend.version;
Expand All @@ -34,6 +37,5 @@ test {
_ = @import("aro/Preprocessor.zig");
_ = @import("aro/target.zig");
_ = @import("aro/Tokenizer.zig");
_ = @import("aro/toolchains/Linux.zig");
_ = @import("aro/Value.zig");
}
Loading