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,...@@ -18,14 +18,12 @@ target: std.Build.ResolvedTarget,
18optimize: std.builtin.OptimizeMode,18optimize: std.builtin.OptimizeMode,
19output_file: std.Build.GeneratedFile,19output_file: std.Build.GeneratedFile,
20link_libc: bool,20link_libc: bool,
21use_clang: bool,
2221
23pub const Options = struct {22pub const Options = struct {
24 root_source_file: std.Build.LazyPath,23 root_source_file: std.Build.LazyPath,
25 target: std.Build.ResolvedTarget,24 target: std.Build.ResolvedTarget,
26 optimize: std.builtin.OptimizeMode,25 optimize: std.builtin.OptimizeMode,
27 link_libc: bool = true,26 link_libc: bool = true,
28 use_clang: bool = true,
29};27};
3028
31pub fn create(owner: *std.Build, options: Options) *TranslateC {29pub fn create(owner: *std.Build, options: Options) *TranslateC {
...@@ -46,7 +44,6 @@ pub fn create(owner: *std.Build, options: Options) *TranslateC {...@@ -46,7 +44,6 @@ pub fn create(owner: *std.Build, options: Options) *TranslateC {
46 .optimize = options.optimize,44 .optimize = options.optimize,
47 .output_file = .{ .step = &translate_c.step },45 .output_file = .{ .step = &translate_c.step },
48 .link_libc = options.link_libc,46 .link_libc = options.link_libc,
49 .use_clang = options.use_clang,
50 .system_libs = .empty,47 .system_libs = .empty,
51 };48 };
52 source.addStepDependencies(&translate_c.step);49 source.addStepDependencies(&translate_c.step);
...@@ -175,9 +172,6 @@ fn make(step: *Step, options: Step.MakeOptions) !void {...@@ -175,9 +172,6 @@ fn make(step: *Step, options: Step.MakeOptions) !void {
175 if (translate_c.link_libc) {172 if (translate_c.link_libc) {
176 try argv_list.append("-lc");173 try argv_list.append("-lc");
177 }174 }
178 if (!translate_c.use_clang) {
179 try argv_list.append("-fno-clang");
180 }
181175
182 try argv_list.append("--cache-dir");176 try argv_list.append("--cache-dir");
183 try argv_list.append(b.cache_root.path orelse ".");177 try argv_list.append(b.cache_root.path orelse ".");
src/main.zig-1
...@@ -4722,7 +4722,6 @@ fn cmdTranslateC(...@@ -4722,7 +4722,6 @@ fn cmdTranslateC(
4722 defer man.deinit();4722 defer man.deinit();
47234723
4724 man.hash.add(@as(u16, 0xb945)); // Random number to distinguish translate-c from compiling C objects4724 man.hash.add(@as(u16, 0xb945)); // Random number to distinguish translate-c from compiling C objects
4725 man.hash.add(comp.config.c_frontend);
4726 Compilation.cache_helpers.hashCSource(&man, c_source_file) catch |err|4725 Compilation.cache_helpers.hashCSource(&man, c_source_file) catch |err|
4727 fatal("unable to process '{s}': {t}", .{ c_source_file.src_path, err });4726 fatal("unable to process '{s}': {t}", .{ c_source_file.src_path, err });
47284727