| ... | @@ -18,14 +18,12 @@ target: std.Build.ResolvedTarget, | ... | @@ -18,14 +18,12 @@ target: std.Build.ResolvedTarget, |
| 18 | optimize: std.builtin.OptimizeMode, | 18 | optimize: std.builtin.OptimizeMode, |
| 19 | output_file: std.Build.GeneratedFile, | 19 | output_file: std.Build.GeneratedFile, |
| 20 | link_libc: bool, | 20 | link_libc: bool, |
| 21 | use_clang: bool, | | |
| 22 | | 21 | |
| 23 | pub const Options = struct { | 22 | pub 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 | }; |
| 30 | | 28 | |
| 31 | pub fn create(owner: *std.Build, options: Options) *TranslateC { | 29 | pub 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 | } | | |
| 181 | | 175 | |
| 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 "."); |