aboutsummaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-05-27 19:25:58 -0400
committerGitHub <noreply@github.com>2019-05-27 19:25:58 -0400
commitf68d8060ec2c65e3062007348c0e331ffbe86f37 (patch)
tree149eef2c891e592849c1fc52e0ad9a145db35a72 /build.zig
parent6a56091213a48118c8c61c0683466f0ffadf6b55 (diff)
parentd110818cfe96b8038e02d49122d42070d6059197 (diff)
downloadzig-f68d8060ec2c65e3062007348c0e331ffbe86f37.tar.gz
zig-f68d8060ec2c65e3062007348c0e331ffbe86f37.zip
Merge pull request #2526 from LemonBoy/arch-format-osx
Build archives using the K_DARWIN format when targeting osx
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig12
1 files changed, 2 insertions, 10 deletions
diff --git a/build.zig b/build.zig
index 82949ad5bc..13ac983e12 100644
--- a/build.zig
+++ b/build.zig
@@ -383,17 +383,9 @@ const Context = struct {
};
fn addLibUserlandStep(b: *Builder) void {
- // Sadly macOS requires hacks to work around the buggy MACH-O linker code.
- const artifact = if (builtin.os == .macosx)
- b.addObject("userland", "src-self-hosted/stage1.zig")
- else
- b.addStaticLibrary("userland", "src-self-hosted/stage1.zig");
+ const artifact = b.addStaticLibrary("userland", "src-self-hosted/stage1.zig");
artifact.disable_gen_h = true;
- if (builtin.os == .macosx) {
- artifact.disable_stack_probing = true;
- } else {
- artifact.bundle_compiler_rt = true;
- }
+ artifact.bundle_compiler_rt = true;
artifact.setTarget(builtin.arch, builtin.os, builtin.abi);
artifact.linkSystemLibrary("c");
const libuserland_step = b.step("libuserland", "Build the userland compiler library for use in stage1");