Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
4c6f28d
compiler: update aro and translate-c to latest; delete clang translate-c
andrewrk Jul 18, 2025
6c81f97
delete all the translate-c tests
andrewrk Jul 18, 2025
9329a1c
move translate-c helpers
andrewrk Jul 18, 2025
1de8a94
delete enough aro to make it compile
andrewrk Jul 18, 2025
b15c7c8
simplify diagnostics
andrewrk Jul 18, 2025
9fee86d
add translate-c CLI args
andrewrk Jul 18, 2025
959a840
resinator: Update for latest aro
squeek502 Jul 19, 2025
9f8b2ff
update aro and translate-c sources
Vexu Jul 28, 2025
8bff4e8
Compilation: avoid passing Clang specific options to Aro
Vexu Jul 29, 2025
72e8c41
aro: avoid BoundedArray
andrewrk Aug 11, 2025
8cf7ea7
remove c_builtins.zig from cmake
andrewrk Aug 11, 2025
b08c8f2
fix rebase conflicts
andrewrk Aug 11, 2025
123529c
translate-c: update for array list defaults
andrewrk Aug 12, 2025
6b5a569
std.Build.Cache: clarify parameter is sub path, not basename
andrewrk Aug 12, 2025
34e293c
Compilation: re-implement cImport
andrewrk Aug 12, 2025
f44a45e
aro: fix dep file logic
andrewrk Aug 13, 2025
8b08e86
Compilation: use renameTmpIntoCache
andrewrk Aug 13, 2025
478b280
zig fmt
andrewrk Aug 13, 2025
935c73e
`@cImport`: don't pass args to Aro it doesn't understand
andrewrk Aug 13, 2025
4720c3b
delete `@cImport` tests
andrewrk Aug 13, 2025
ec60095
remove behavior test that depended on std.zig.c_translation
andrewrk Aug 13, 2025
cf37d2e
aro: update
andrewrk Aug 21, 2025
589b485
aro does not have a pragma-pack warning
andrewrk Aug 21, 2025
e1442ef
compiler: disable InternPool.debug_state as it is unsound
andrewrk Aug 22, 2025
b9ce35a
aro does not have -mmacos version flags or -Wno-overriding-option
andrewrk Aug 22, 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 @@ -639,7 +636,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
34 changes: 1 addition & 33 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 false;
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 @@ -415,7 +413,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 @@ -427,9 +425,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 @@ -464,26 +459,6 @@ pub fn build(b: *std.Build) !void {
.max_rss = 4000000000,
}));

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 @@ -724,13 +699,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 @@ -1150,7 +1119,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
Loading