diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-02-16 18:57:34 -0500 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-02-16 18:57:34 -0500 |
| commit | 7eb0a3edcef2ab752ff1e45e6f1316b633b29606 (patch) | |
| tree | 152cce9cc48d92b8a8b319fb71c0aa83e44e8eec /build.zig | |
| parent | 39ee46a6c1b5a56129950953d304a1169b7ffa67 (diff) | |
| download | zig-7eb0a3edcef2ab752ff1e45e6f1316b633b29606.tar.gz zig-7eb0a3edcef2ab752ff1e45e6f1316b633b29606.zip | |
remove libc dependency of zig0 building libstage2
Rather than `zig0 build ...` the build now does
`zig0 build-lib ...`, avoiding the requirement of linking the build
script, and thus avoiding the requirement of finding native libc,
for systems where libc is the system ABI.
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 27 |
1 files changed, 0 insertions, 27 deletions
@@ -64,8 +64,6 @@ pub fn build(b: *Builder) !void { try configureStage2(b, test_stage2, ctx); try configureStage2(b, exe, ctx); - addLibUserlandStep(b, mode); - const skip_release = b.option(bool, "skip-release", "Main test suite skips release builds") orelse false; const skip_release_small = b.option(bool, "skip-release-small", "Main test suite skips release-small builds") orelse skip_release; const skip_release_fast = b.option(bool, "skip-release-fast", "Main test suite skips release-fast builds") orelse skip_release; @@ -366,28 +364,3 @@ const Context = struct { dia_guids_lib: []const u8, llvm: LibraryDep, }; - -fn addLibUserlandStep(b: *Builder, mode: builtin.Mode) void { - const artifact = b.addStaticLibrary("userland", "src-self-hosted/stage1.zig"); - artifact.disable_gen_h = true; - artifact.bundle_compiler_rt = true; - artifact.setTarget(builtin.arch, builtin.os, builtin.abi); - artifact.setBuildMode(mode); - artifact.force_pic = true; - if (mode != .Debug) { - artifact.strip = true; - } - artifact.linkSystemLibrary("c"); - if (builtin.os == .windows) { - artifact.linkSystemLibrary("ntdll"); - } - const libuserland_step = b.step("libuserland", "Build the userland compiler library for use in stage1"); - libuserland_step.dependOn(&artifact.step); - - const output_dir = b.option( - []const u8, - "output-dir", - "For libuserland step, where to put the output", - ) orelse return; - artifact.setOutputDir(output_dir); -} |
