aboutsummaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-02-16 18:57:34 -0500
committerAndrew Kelley <andrew@ziglang.org>2020-02-16 18:57:34 -0500
commit7eb0a3edcef2ab752ff1e45e6f1316b633b29606 (patch)
tree152cce9cc48d92b8a8b319fb71c0aa83e44e8eec /build.zig
parent39ee46a6c1b5a56129950953d304a1169b7ffa67 (diff)
downloadzig-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.zig27
1 files changed, 0 insertions, 27 deletions
diff --git a/build.zig b/build.zig
index 4567b63029..e1ae5cf3cd 100644
--- a/build.zig
+++ b/build.zig
@@ -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);
-}