authorgravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2020-11-26 22:20:44+01:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-01-02 17:12:57-07:00
log04f37dcd8e9c32d7ce8712939fb9c8dfa6cc6bbe
treee6bbaf299c5bbaad20e9f329c18090be39f281f8
parent1fbe89dc2e204defc18add72efd2bba4dbe728fc

stage2: Use {z} instead of {s} in generated Zig code


1 files changed, 10 insertions(+), 10 deletions(-)

src/Compilation.zig+10-10
...@@ -2653,15 +2653,15 @@ pub fn generateBuiltinZigSource(comp: *Compilation, allocator: *Allocator) ![]u8...@@ -2653,15 +2653,15 @@ pub fn generateBuiltinZigSource(comp: *Compilation, allocator: *Allocator) ![]u8
2653 \\pub const arch = Target.current.cpu.arch;2653 \\pub const arch = Target.current.cpu.arch;
2654 \\/// Deprecated2654 \\/// Deprecated
2655 \\pub const endian = Target.current.cpu.arch.endian();2655 \\pub const endian = Target.current.cpu.arch.endian();
2656 \\pub const output_mode = OutputMode.{s};2656 \\pub const output_mode = OutputMode.{z};
2657 \\pub const link_mode = LinkMode.{s};2657 \\pub const link_mode = LinkMode.{z};
2658 \\pub const is_test = {};2658 \\pub const is_test = {};
2659 \\pub const single_threaded = {};2659 \\pub const single_threaded = {};
2660 \\pub const abi = Abi.{s};2660 \\pub const abi = Abi.{z};
2661 \\pub const cpu: Cpu = Cpu{{2661 \\pub const cpu: Cpu = Cpu{{
2662 \\ .arch = .{s},2662 \\ .arch = .{z},
2663 \\ .model = &Target.{s}.cpu.{s},2663 \\ .model = &Target.{z}.cpu.{z},
2664 \\ .features = Target.{s}.featureSet(&[_]Target.{s}.Feature{{2664 \\ .features = Target.{z}.featureSet(&[_]Target.{z}.Feature{{
2665 \\2665 \\
2666 , .{2666 , .{
2667 @tagName(comp.bin_file.options.output_mode),2667 @tagName(comp.bin_file.options.output_mode),
...@@ -2692,7 +2692,7 @@ pub fn generateBuiltinZigSource(comp: *Compilation, allocator: *Allocator) ![]u8...@@ -2692,7 +2692,7 @@ pub fn generateBuiltinZigSource(comp: *Compilation, allocator: *Allocator) ![]u8
2692 \\ }}),2692 \\ }}),
2693 \\}};2693 \\}};
2694 \\pub const os = Os{{2694 \\pub const os = Os{{
2695 \\ .tag = .{s},2695 \\ .tag = .{z},
2696 \\ .version_range = .{{2696 \\ .version_range = .{{
2697 ,2697 ,
2698 .{@tagName(target.os.tag)},2698 .{@tagName(target.os.tag)},
...@@ -2778,8 +2778,8 @@ pub fn generateBuiltinZigSource(comp: *Compilation, allocator: *Allocator) ![]u8...@@ -2778,8 +2778,8 @@ pub fn generateBuiltinZigSource(comp: *Compilation, allocator: *Allocator) ![]u8
2778 (comp.bin_file.options.skip_linker_dependencies and comp.bin_file.options.parent_compilation_link_libc);2778 (comp.bin_file.options.skip_linker_dependencies and comp.bin_file.options.parent_compilation_link_libc);
27792779
2780 try buffer.writer().print(2780 try buffer.writer().print(
2781 \\pub const object_format = ObjectFormat.{s};2781 \\pub const object_format = ObjectFormat.{z};
2782 \\pub const mode = Mode.{s};2782 \\pub const mode = Mode.{z};
2783 \\pub const link_libc = {};2783 \\pub const link_libc = {};
2784 \\pub const link_libcpp = {};2784 \\pub const link_libcpp = {};
2785 \\pub const have_error_return_tracing = {};2785 \\pub const have_error_return_tracing = {};
...@@ -2787,7 +2787,7 @@ pub fn generateBuiltinZigSource(comp: *Compilation, allocator: *Allocator) ![]u8...@@ -2787,7 +2787,7 @@ pub fn generateBuiltinZigSource(comp: *Compilation, allocator: *Allocator) ![]u8
2787 \\pub const position_independent_code = {};2787 \\pub const position_independent_code = {};
2788 \\pub const position_independent_executable = {};2788 \\pub const position_independent_executable = {};
2789 \\pub const strip_debug_info = {};2789 \\pub const strip_debug_info = {};
2790 \\pub const code_model = CodeModel.{s};2790 \\pub const code_model = CodeModel.{z};
2791 \\2791 \\
2792 , .{2792 , .{
2793 @tagName(comp.bin_file.options.object_format),2793 @tagName(comp.bin_file.options.object_format),