| author | |
| committer | |
| log | bf959666e8013518660b188a365cbd383d516af3 |
| tree | 21a19ad0d4c9a39db0b56ca87032f2837dc2055f |
| parent | b3c6a3b047cb248afb0d61ae723ae41aeab9289b |
The dev environment system solves this use case better4 files changed, 0 insertions(+), 33 deletions(-)
build.zig-1| ... | ... | @@ -233,7 +233,6 @@ pub fn build(b: *std.Build) !void { |
| 233 | 233 | exe.root_module.addOptions("build_options", exe_options); |
| 234 | 234 | |
| 235 | 235 | exe_options.addOption(u32, "mem_leak_frames", mem_leak_frames); |
| 236 | exe_options.addOption(bool, "skip_non_native", skip_non_native); | |
| 237 | 236 | exe_options.addOption(bool, "have_llvm", enable_llvm); |
| 238 | 237 | exe_options.addOption(bool, "llvm_has_m68k", llvm_has_m68k); |
| 239 | 238 | exe_options.addOption(bool, "llvm_has_csky", llvm_has_csky); |
src/link/Elf.zig-12| ... | ... | @@ -1691,9 +1691,6 @@ pub fn updateFunc( |
| 1691 | 1691 | func_index: InternPool.Index, |
| 1692 | 1692 | mir: *const codegen.AnyMir, |
| 1693 | 1693 | ) link.File.UpdateNavError!void { |
| 1694 | if (build_options.skip_non_native and builtin.object_format != .elf) { | |
| 1695 | @panic("Attempted to compile for object format that was disabled by build configuration"); | |
| 1696 | } | |
| 1697 | 1694 | return self.zigObjectPtr().?.updateFunc(self, pt, func_index, mir); |
| 1698 | 1695 | } |
| 1699 | 1696 | |
| ... | ... | @@ -1702,9 +1699,6 @@ pub fn updateNav( |
| 1702 | 1699 | pt: Zcu.PerThread, |
| 1703 | 1700 | nav: InternPool.Nav.Index, |
| 1704 | 1701 | ) link.File.UpdateNavError!void { |
| 1705 | if (build_options.skip_non_native and builtin.object_format != .elf) { | |
| 1706 | @panic("Attempted to compile for object format that was disabled by build configuration"); | |
| 1707 | } | |
| 1708 | 1702 | return self.zigObjectPtr().?.updateNav(self, pt, nav); |
| 1709 | 1703 | } |
| 1710 | 1704 | |
| ... | ... | @@ -1714,9 +1708,6 @@ pub fn updateContainerType( |
| 1714 | 1708 | ty: InternPool.Index, |
| 1715 | 1709 | success: bool, |
| 1716 | 1710 | ) link.File.UpdateContainerTypeError!void { |
| 1717 | if (build_options.skip_non_native and builtin.object_format != .elf) { | |
| 1718 | @panic("Attempted to compile for object format that was disabled by build configuration"); | |
| 1719 | } | |
| 1720 | 1711 | return self.zigObjectPtr().?.updateContainerType(pt, ty, success) catch |err| switch (err) { |
| 1721 | 1712 | error.OutOfMemory => |e| return e, |
| 1722 | 1713 | }; |
| ... | ... | @@ -1728,9 +1719,6 @@ pub fn updateExports( |
| 1728 | 1719 | exported: Zcu.Exported, |
| 1729 | 1720 | export_indices: []const Zcu.Export.Index, |
| 1730 | 1721 | ) link.File.UpdateExportsError!void { |
| 1731 | if (build_options.skip_non_native and builtin.object_format != .elf) { | |
| 1732 | @panic("Attempted to compile for object format that was disabled by build configuration"); | |
| 1733 | } | |
| 1734 | 1722 | return self.zigObjectPtr().?.updateExports(self, pt, exported, export_indices); |
| 1735 | 1723 | } |
| 1736 | 1724 |
src/link/MachO.zig-9| ... | ... | @@ -3075,16 +3075,10 @@ pub fn updateFunc( |
| 3075 | 3075 | func_index: InternPool.Index, |
| 3076 | 3076 | mir: *const codegen.AnyMir, |
| 3077 | 3077 | ) link.File.UpdateNavError!void { |
| 3078 | if (build_options.skip_non_native and builtin.object_format != .macho) { | |
| 3079 | @panic("Attempted to compile for object format that was disabled by build configuration"); | |
| 3080 | } | |
| 3081 | 3078 | return self.getZigObject().?.updateFunc(self, pt, func_index, mir); |
| 3082 | 3079 | } |
| 3083 | 3080 | |
| 3084 | 3081 | pub fn updateNav(self: *MachO, pt: Zcu.PerThread, nav: InternPool.Nav.Index) link.File.UpdateNavError!void { |
| 3085 | if (build_options.skip_non_native and builtin.object_format != .macho) { | |
| 3086 | @panic("Attempted to compile for object format that was disabled by build configuration"); | |
| 3087 | } | |
| 3088 | 3082 | return self.getZigObject().?.updateNav(self, pt, nav); |
| 3089 | 3083 | } |
| 3090 | 3084 | |
| ... | ... | @@ -3098,9 +3092,6 @@ pub fn updateExports( |
| 3098 | 3092 | exported: Zcu.Exported, |
| 3099 | 3093 | export_indices: []const Zcu.Export.Index, |
| 3100 | 3094 | ) link.File.UpdateExportsError!void { |
| 3101 | if (build_options.skip_non_native and builtin.object_format != .macho) { | |
| 3102 | @panic("Attempted to compile for object format that was disabled by build configuration"); | |
| 3103 | } | |
| 3104 | 3095 | return self.getZigObject().?.updateExports(self, pt, exported, export_indices); |
| 3105 | 3096 | } |
| 3106 | 3097 |
src/link/Wasm.zig-11| ... | ... | @@ -3192,10 +3192,6 @@ pub fn updateFunc( |
| 3192 | 3192 | func_index: InternPool.Index, |
| 3193 | 3193 | any_mir: *const codegen.AnyMir, |
| 3194 | 3194 | ) !void { |
| 3195 | if (build_options.skip_non_native and builtin.object_format != .wasm) { | |
| 3196 | @panic("Attempted to compile for object format that was disabled by build configuration"); | |
| 3197 | } | |
| 3198 | ||
| 3199 | 3195 | dev.check(.wasm_backend); |
| 3200 | 3196 | |
| 3201 | 3197 | // This linker implementation only works with codegen backend `.stage2_wasm`. |
| ... | ... | @@ -3279,9 +3275,6 @@ pub fn updateFunc( |
| 3279 | 3275 | // Generate code for the "Nav", storing it in memory to be later written to |
| 3280 | 3276 | // the file on flush(). |
| 3281 | 3277 | pub fn updateNav(wasm: *Wasm, pt: Zcu.PerThread, nav_index: InternPool.Nav.Index) !void { |
| 3282 | if (build_options.skip_non_native and builtin.object_format != .wasm) { | |
| 3283 | @panic("Attempted to compile for object format that was disabled by build configuration"); | |
| 3284 | } | |
| 3285 | 3278 | const zcu = pt.zcu; |
| 3286 | 3279 | const ip = &zcu.intern_pool; |
| 3287 | 3280 | const nav = ip.getNav(nav_index); |
| ... | ... | @@ -3378,10 +3371,6 @@ pub fn updateExports( |
| 3378 | 3371 | exported: Zcu.Exported, |
| 3379 | 3372 | export_indices: []const Zcu.Export.Index, |
| 3380 | 3373 | ) !void { |
| 3381 | if (build_options.skip_non_native and builtin.object_format != .wasm) { | |
| 3382 | @panic("Attempted to compile for object format that was disabled by build configuration"); | |
| 3383 | } | |
| 3384 | ||
| 3385 | 3374 | const zcu = pt.zcu; |
| 3386 | 3375 | const gpa = zcu.gpa; |
| 3387 | 3376 | const ip = &zcu.intern_pool; |