diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-02-25 16:30:40 -0500 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-02-25 16:30:40 -0500 |
| commit | f33bf48af7d9c99d532864f8a6c3f695ad5bbd21 (patch) | |
| tree | fa39bd6b654178e653d06e1c79f22ad1d29cd526 /build.zig | |
| parent | 64365bc5d7b1e2c507806ee8976acc3479ad7862 (diff) | |
| parent | 416a547cdb8dbbf3d2e7ce32132f0a25f2a8607e (diff) | |
| download | zig-f33bf48af7d9c99d532864f8a6c3f695ad5bbd21.tar.gz zig-f33bf48af7d9c99d532864f8a6c3f695ad5bbd21.zip | |
Merge remote-tracking branch 'origin/master' into llvm10
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 29 |
1 files changed, 1 insertions, 28 deletions
@@ -65,8 +65,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; @@ -176,7 +174,7 @@ fn dependOnLib(b: *Builder, lib_exe_obj: var, dep: LibraryDep) void { } fn fileExists(filename: []const u8) !bool { - fs.File.access(filename) catch |err| switch (err) { + fs.cwd().access(filename, .{}) catch |err| switch (err) { error.FileNotFound => return false, else => return err, }; @@ -379,28 +377,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); -} |
