commit 0606af509f9a7f5e6bc458940aa9529d73232fc4 (tree)
parent 090c32b9d26133fc225c7eab6ca232bcf64c98bf
Author: Andrew Kelley <andrew@ziglang.org>
Date: Thu, 9 Apr 2026 14:05:45 -0700
translate-c build step: remove use_clang field
This no longer does anything.
Diffstat:
2 files changed, 0 insertions(+), 7 deletions(-)
diff --git a/lib/std/Build/Step/TranslateC.zig b/lib/std/Build/Step/TranslateC.zig
@@ -18,14 +18,12 @@ target: std.Build.ResolvedTarget,
optimize: std.builtin.OptimizeMode,
output_file: std.Build.GeneratedFile,
link_libc: bool,
-use_clang: bool,
pub const Options = struct {
root_source_file: std.Build.LazyPath,
target: std.Build.ResolvedTarget,
optimize: std.builtin.OptimizeMode,
link_libc: bool = true,
- use_clang: bool = true,
};
pub fn create(owner: *std.Build, options: Options) *TranslateC {
@@ -46,7 +44,6 @@ pub fn create(owner: *std.Build, options: Options) *TranslateC {
.optimize = options.optimize,
.output_file = .{ .step = &translate_c.step },
.link_libc = options.link_libc,
- .use_clang = options.use_clang,
.system_libs = .empty,
};
source.addStepDependencies(&translate_c.step);
@@ -175,9 +172,6 @@ fn make(step: *Step, options: Step.MakeOptions) !void {
if (translate_c.link_libc) {
try argv_list.append("-lc");
}
- if (!translate_c.use_clang) {
- try argv_list.append("-fno-clang");
- }
try argv_list.append("--cache-dir");
try argv_list.append(b.cache_root.path orelse ".");
diff --git a/src/main.zig b/src/main.zig
@@ -4722,7 +4722,6 @@ fn cmdTranslateC(
defer man.deinit();
man.hash.add(@as(u16, 0xb945)); // Random number to distinguish translate-c from compiling C objects
- man.hash.add(comp.config.c_frontend);
Compilation.cache_helpers.hashCSource(&man, c_source_file) catch |err|
fatal("unable to process '{s}': {t}", .{ c_source_file.src_path, err });