Skip to content

Commit

Permalink
stage2: Use {z} instead of {s} in generated Zig code
Browse files Browse the repository at this point in the history
  • Loading branch information
LemonBoy authored and andrewrk committed Jan 3, 2021
1 parent 1fbe89d commit 04f37dc
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/Compilation.zig
Original file line number Diff line number Diff line change
Expand Up @@ -2653,15 +2653,15 @@ pub fn generateBuiltinZigSource(comp: *Compilation, allocator: *Allocator) ![]u8
\\pub const arch = Target.current.cpu.arch;
\\/// Deprecated
\\pub const endian = Target.current.cpu.arch.endian();
\\pub const output_mode = OutputMode.{s};
\\pub const link_mode = LinkMode.{s};
\\pub const output_mode = OutputMode.{z};
\\pub const link_mode = LinkMode.{z};
\\pub const is_test = {};
\\pub const single_threaded = {};
\\pub const abi = Abi.{s};
\\pub const abi = Abi.{z};
\\pub const cpu: Cpu = Cpu{{
\\ .arch = .{s},
\\ .model = &Target.{s}.cpu.{s},
\\ .features = Target.{s}.featureSet(&[_]Target.{s}.Feature{{
\\ .arch = .{z},
\\ .model = &Target.{z}.cpu.{z},
\\ .features = Target.{z}.featureSet(&[_]Target.{z}.Feature{{
\\
, .{
@tagName(comp.bin_file.options.output_mode),
Expand Down Expand Up @@ -2692,7 +2692,7 @@ pub fn generateBuiltinZigSource(comp: *Compilation, allocator: *Allocator) ![]u8
\\ }}),
\\}};
\\pub const os = Os{{
\\ .tag = .{s},
\\ .tag = .{z},
\\ .version_range = .{{
,
.{@tagName(target.os.tag)},
Expand Down Expand Up @@ -2778,16 +2778,16 @@ pub fn generateBuiltinZigSource(comp: *Compilation, allocator: *Allocator) ![]u8
(comp.bin_file.options.skip_linker_dependencies and comp.bin_file.options.parent_compilation_link_libc);

try buffer.writer().print(
\\pub const object_format = ObjectFormat.{s};
\\pub const mode = Mode.{s};
\\pub const object_format = ObjectFormat.{z};
\\pub const mode = Mode.{z};
\\pub const link_libc = {};
\\pub const link_libcpp = {};
\\pub const have_error_return_tracing = {};
\\pub const valgrind_support = {};
\\pub const position_independent_code = {};
\\pub const position_independent_executable = {};
\\pub const strip_debug_info = {};
\\pub const code_model = CodeModel.{s};
\\pub const code_model = CodeModel.{z};
\\
, .{
@tagName(comp.bin_file.options.object_format),
Expand Down

0 comments on commit 04f37dc

Please sign in to comment.