| author | |
| committer | |
| log | 20abf1394aef44eb1882e801f1d729fcff452db3 |
| tree | e552507aab33a5197c68083627a9cd28cde203f8 |
| parent | b36dd55af5fa0e8e0a464440a7e6f2821f67c590 |
4 files changed, 8 insertions(+), 8 deletions(-)
lib/std/Build/Step/TranslateC.zig+4-4| ... | ... | @@ -19,7 +19,7 @@ link_libc: bool, |
| 19 | 19 | use_clang: bool, |
| 20 | 20 | |
| 21 | 21 | pub const Options = struct { |
| 22 | source_file: std.Build.LazyPath, | |
| 22 | root_source_file: std.Build.LazyPath, | |
| 23 | 23 | target: std.Build.ResolvedTarget, |
| 24 | 24 | optimize: std.builtin.OptimizeMode, |
| 25 | 25 | link_libc: bool = true, |
| ... | ... | @@ -28,7 +28,7 @@ pub const Options = struct { |
| 28 | 28 | |
| 29 | 29 | pub fn create(owner: *std.Build, options: Options) *TranslateC { |
| 30 | 30 | const self = owner.allocator.create(TranslateC) catch @panic("OOM"); |
| 31 | const source = options.source_file.dupe(owner); | |
| 31 | const source = options.root_source_file.dupe(owner); | |
| 32 | 32 | self.* = TranslateC{ |
| 33 | 33 | .step = Step.init(.{ |
| 34 | 34 | .id = .translate_c, |
| ... | ... | @@ -79,7 +79,7 @@ pub fn addExecutable(self: *TranslateC, options: AddExecutableOptions) *Step.Com |
| 79 | 79 | /// `createModule` can be used instead to create a private module. |
| 80 | 80 | pub fn addModule(self: *TranslateC, name: []const u8) *std.Build.Module { |
| 81 | 81 | return self.step.owner.addModule(name, .{ |
| 82 | .source_file = self.getOutput(), | |
| 82 | .root_source_file = self.getOutput(), | |
| 83 | 83 | }); |
| 84 | 84 | } |
| 85 | 85 | |
| ... | ... | @@ -92,7 +92,7 @@ pub fn createModule(self: *TranslateC) *std.Build.Module { |
| 92 | 92 | |
| 93 | 93 | module.* = .{ |
| 94 | 94 | .builder = b, |
| 95 | .source_file = self.getOutput(), | |
| 95 | .root_source_file = self.getOutput(), | |
| 96 | 96 | .dependencies = std.StringArrayHashMap(*std.Build.Module).init(b.allocator), |
| 97 | 97 | }; |
| 98 | 98 | return module; |
test/src/Cases.zig+2-2| ... | ... | @@ -702,7 +702,7 @@ pub fn lowerToBuildSteps( |
| 702 | 702 | const file_source = write_src.add("tmp.c", case.input); |
| 703 | 703 | |
| 704 | 704 | const translate_c = b.addTranslateC(.{ |
| 705 | .source_file = file_source, | |
| 705 | .root_source_file = file_source, | |
| 706 | 706 | .optimize = .Debug, |
| 707 | 707 | .target = case.target, |
| 708 | 708 | .link_libc = case.link_libc, |
| ... | ... | @@ -729,7 +729,7 @@ pub fn lowerToBuildSteps( |
| 729 | 729 | const file_source = write_src.add("tmp.c", case.input); |
| 730 | 730 | |
| 731 | 731 | const translate_c = b.addTranslateC(.{ |
| 732 | .source_file = file_source, | |
| 732 | .root_source_file = file_source, | |
| 733 | 733 | .optimize = .Debug, |
| 734 | 734 | .target = case.target, |
| 735 | 735 | .link_libc = case.link_libc, |
test/src/run_translated_c.zig+1-1| ... | ... | @@ -85,7 +85,7 @@ pub const RunTranslatedCContext = struct { |
| 85 | 85 | _ = write_src.add(src_file.filename, src_file.source); |
| 86 | 86 | } |
| 87 | 87 | const translate_c = b.addTranslateC(.{ |
| 88 | .source_file = write_src.files.items[0].getPath(), | |
| 88 | .root_source_file = write_src.files.items[0].getPath(), | |
| 89 | 89 | .target = b.host, |
| 90 | 90 | .optimize = .Debug, |
| 91 | 91 | }); |
test/src/translate_c.zig+1-1| ... | ... | @@ -107,7 +107,7 @@ pub const TranslateCContext = struct { |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | const translate_c = b.addTranslateC(.{ |
| 110 | .source_file = write_src.files.items[0].getPath(), | |
| 110 | .root_source_file = write_src.files.items[0].getPath(), | |
| 111 | 111 | .target = b.resolveTargetQuery(case.target), |
| 112 | 112 | .optimize = .Debug, |
| 113 | 113 | }); |