mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-27 18:51:44 +03:00
translate-c build step: remove use_clang field
This no longer does anything.
This commit is contained in:
@@ -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 ".");
|
||||
|
||||
@@ -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 });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user