authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-04-09 14:05:45-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-04-09 14:05:45-07:00
log0606af509f9a7f5e6bc458940aa9529d73232fc4
treea0778fd9f965ccd1efca491aa8961cf1948a386f
parent090c32b9d26133fc225c7eab6ca232bcf64c98bf

translate-c build step: remove use_clang field

This no longer does anything.

2 files changed, 0 insertions(+), 7 deletions(-)

lib/std/Build/Step/TranslateC.zig-6
......@@ -18,14 +18,12 @@ target: std.Build.ResolvedTarget,
1818optimize: std.builtin.OptimizeMode,
1919output_file: std.Build.GeneratedFile,
2020link_libc: bool,
21use_clang: bool,
2221
2322pub const Options = struct {
2423 root_source_file: std.Build.LazyPath,
2524 target: std.Build.ResolvedTarget,
2625 optimize: std.builtin.OptimizeMode,
2726 link_libc: bool = true,
28 use_clang: bool = true,
2927};
3028
3129pub fn create(owner: *std.Build, options: Options) *TranslateC {
......@@ -46,7 +44,6 @@ pub fn create(owner: *std.Build, options: Options) *TranslateC {
4644 .optimize = options.optimize,
4745 .output_file = .{ .step = &translate_c.step },
4846 .link_libc = options.link_libc,
49 .use_clang = options.use_clang,
5047 .system_libs = .empty,
5148 };
5249 source.addStepDependencies(&translate_c.step);
......@@ -175,9 +172,6 @@ fn make(step: *Step, options: Step.MakeOptions) !void {
175172 if (translate_c.link_libc) {
176173 try argv_list.append("-lc");
177174 }
178 if (!translate_c.use_clang) {
179 try argv_list.append("-fno-clang");
180 }
181175
182176 try argv_list.append("--cache-dir");
183177 try argv_list.append(b.cache_root.path orelse ".");
src/main.zig-1
......@@ -4722,7 +4722,6 @@ fn cmdTranslateC(
47224722 defer man.deinit();
47234723
47244724 man.hash.add(@as(u16, 0xb945)); // Random number to distinguish translate-c from compiling C objects
4725 man.hash.add(comp.config.c_frontend);
47264725 Compilation.cache_helpers.hashCSource(&man, c_source_file) catch |err|
47274726 fatal("unable to process '{s}': {t}", .{ c_source_file.src_path, err });
47284727