| author | |
| committer | |
| log | 9d8adb38a18169a16707acac2812dd6850de99be |
| tree | d7d545b25e4993d9c5358f3e111a9aeaacfa1a63 |
| parent | aa7c6dcac1c87d892156daf210620f999d9838f3 |
| signature |
This reflects how the compiler actually treats it.
Closes #23424.4 files changed, 6 insertions(+), 8 deletions(-)
lib/std/Build/Module.zig+4| ... | ... | @@ -33,6 +33,7 @@ omit_frame_pointer: ?bool, |
| 33 | 33 | error_tracing: ?bool, |
| 34 | 34 | link_libc: ?bool, |
| 35 | 35 | link_libcpp: ?bool, |
| 36 | no_builtin: ?bool, | |
| 36 | 37 | |
| 37 | 38 | /// Symbols to be exported when compiling to WebAssembly. |
| 38 | 39 | export_symbol_names: []const []const u8 = &.{}, |
| ... | ... | @@ -268,6 +269,7 @@ pub const CreateOptions = struct { |
| 268 | 269 | /// more difficult to obtain stack traces. Has target-dependent effects. |
| 269 | 270 | omit_frame_pointer: ?bool = null, |
| 270 | 271 | error_tracing: ?bool = null, |
| 272 | no_builtin: ?bool = null, | |
| 271 | 273 | }; |
| 272 | 274 | |
| 273 | 275 | pub const Import = struct { |
| ... | ... | @@ -314,6 +316,7 @@ pub fn init( |
| 314 | 316 | .omit_frame_pointer = options.omit_frame_pointer, |
| 315 | 317 | .error_tracing = options.error_tracing, |
| 316 | 318 | .export_symbol_names = &.{}, |
| 319 | .no_builtin = options.no_builtin, | |
| 317 | 320 | }; |
| 318 | 321 | |
| 319 | 322 | m.import_table.ensureUnusedCapacity(allocator, options.imports.len) catch @panic("OOM"); |
| ... | ... | @@ -564,6 +567,7 @@ pub fn appendZigProcessFlags( |
| 564 | 567 | try addFlag(zig_args, m.valgrind, "-fvalgrind", "-fno-valgrind"); |
| 565 | 568 | try addFlag(zig_args, m.pic, "-fPIC", "-fno-PIC"); |
| 566 | 569 | try addFlag(zig_args, m.red_zone, "-mred-zone", "-mno-red-zone"); |
| 570 | try addFlag(zig_args, m.no_builtin, "-fno-builtin", "-fbuiltin"); | |
| 567 | 571 | |
| 568 | 572 | if (m.sanitize_c) |sc| switch (sc) { |
| 569 | 573 | .off => try zig_args.append("-fno-sanitize-c"), |
lib/std/Build/Step/Compile.zig-6| ... | ... | @@ -229,8 +229,6 @@ is_linking_libc: bool = false, |
| 229 | 229 | /// Computed during make(). |
| 230 | 230 | is_linking_libcpp: bool = false, |
| 231 | 231 | |
| 232 | no_builtin: ?bool = null, | |
| 233 | ||
| 234 | 232 | /// Populated during the make phase when there is a long-lived compiler process. |
| 235 | 233 | /// Managed by the build runner, not user build script. |
| 236 | 234 | zig_process: ?*Step.ZigProcess, |
| ... | ... | @@ -1646,10 +1644,6 @@ fn getZigArgs(compile: *Compile, fuzz: bool) ![][]const u8 { |
| 1646 | 1644 | } |
| 1647 | 1645 | } |
| 1648 | 1646 | |
| 1649 | if (compile.no_builtin) |enabled| { | |
| 1650 | try zig_args.append(if (enabled) "-fbuiltin" else "-fno-builtin"); | |
| 1651 | } | |
| 1652 | ||
| 1653 | 1647 | if (b.sysroot) |sysroot| { |
| 1654 | 1648 | try zig_args.appendSlice(&[_][]const u8{ "--sysroot", sysroot }); |
| 1655 | 1649 | } |
test/src/LlvmIr.zig+1-1| ... | ... | @@ -107,9 +107,9 @@ pub fn addCase(self: *LlvmIr, case: TestCase) void { |
| 107 | 107 | |
| 108 | 108 | obj.dll_export_fns = case.params.dll_export_fns; |
| 109 | 109 | obj.pie = case.params.pie; |
| 110 | obj.no_builtin = case.params.no_builtin; | |
| 111 | 110 | |
| 112 | 111 | obj.root_module.dwarf_format = case.params.dwarf_format; |
| 112 | obj.root_module.no_builtin = case.params.no_builtin; | |
| 113 | 113 | obj.root_module.red_zone = case.params.red_zone; |
| 114 | 114 | obj.root_module.stack_check = case.params.stack_check; |
| 115 | 115 | obj.root_module.stack_protector = case.params.stack_protector; |
test/tests.zig+1-1| ... | ... | @@ -1827,7 +1827,7 @@ pub fn addModuleTests(b: *std.Build, options: ModuleTestOptions) *Step { |
| 1827 | 1827 | .zig_lib_dir = b.path("lib"), |
| 1828 | 1828 | }); |
| 1829 | 1829 | these_tests.linkage = test_target.linkage; |
| 1830 | if (options.no_builtin) these_tests.no_builtin = true; | |
| 1830 | if (options.no_builtin) these_tests.root_module.no_builtin = false; | |
| 1831 | 1831 | if (options.build_options) |build_options| { |
| 1832 | 1832 | these_tests.root_module.addOptions("build_options", build_options); |
| 1833 | 1833 | } |