diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c5aab09ef..a2bf856b9c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -782,7 +782,7 @@ set(BUILD_ZIG1_ARGS -target "${ZIG_TARGET_TRIPLE}" "-mcpu=${ZIG_TARGET_MCPU}" --name zig1 - --override-lib-dir "${CMAKE_SOURCE_DIR}/lib" + --zig-lib-dir "${CMAKE_SOURCE_DIR}/lib" "-femit-bin=${ZIG1_OBJECT}" "${ZIG1_RELEASE_ARG}" "${ZIG1_SINGLE_THREADED_ARG}" @@ -836,7 +836,7 @@ set(ZIG_SKIP_INSTALL_LIB_FILES off CACHE BOOL if(NOT ZIG_SKIP_INSTALL_LIB_FILES) set(ZIG_INSTALL_ARGS "build" - --override-lib-dir "${CMAKE_SOURCE_DIR}/lib" + --zig-lib-dir "${CMAKE_SOURCE_DIR}/lib" "-Dlib-files-only" --prefix "${CMAKE_INSTALL_PREFIX}" "-Dconfig_h=${ZIG_CONFIG_H_OUT}" diff --git a/ci/azure/linux_script b/ci/azure/linux_script index 52880f40aa..462457a932 100755 --- a/ci/azure/linux_script +++ b/ci/azure/linux_script @@ -79,7 +79,7 @@ if [ "${BUILD_REASON}" != "PullRequest" ]; then # Produce the experimental std lib documentation. mkdir -p release/docs/std release/bin/zig test ../lib/std/std.zig \ - --override-lib-dir ../lib \ + --zig-lib-dir ../lib \ -femit-docs=release/docs/std \ -fno-emit-bin diff --git a/ci/azure/macos_arm64_script b/ci/azure/macos_arm64_script index 2caf1c94db..d3eb7bdeaa 100755 --- a/ci/azure/macos_arm64_script +++ b/ci/azure/macos_arm64_script @@ -94,7 +94,7 @@ if [ "${BUILD_REASON}" != "PullRequest" ]; then # Produce the experimental std lib documentation. mkdir -p release/docs/std $ZIG test ../lib/std/std.zig \ - --override-lib-dir ../lib \ + --zig-lib-dir ../lib \ -femit-docs=release/docs/std \ -fno-emit-bin diff --git a/lib/std/build.zig b/lib/std/build.zig index bd3bfbbb98..ed9e5e4ece 100644 --- a/lib/std/build.zig +++ b/lib/std/build.zig @@ -2716,10 +2716,10 @@ pub const LibExeObjStep = struct { } if (self.override_lib_dir) |dir| { - try zig_args.append("--override-lib-dir"); + try zig_args.append("--zig-lib-dir"); try zig_args.append(builder.pathFromRoot(dir)); } else if (self.builder.override_lib_dir) |dir| { - try zig_args.append("--override-lib-dir"); + try zig_args.append("--zig-lib-dir"); try zig_args.append(builder.pathFromRoot(dir)); } diff --git a/lib/std/crypto/benchmark.zig b/lib/std/crypto/benchmark.zig index 49d5b15820..e8e50b95ea 100644 --- a/lib/std/crypto/benchmark.zig +++ b/lib/std/crypto/benchmark.zig @@ -3,7 +3,7 @@ // This file is part of [zig](https://ziglang.org/), which is MIT licensed. // The MIT license requires this copyright notice to be included in all copies // and substantial portions of the software. -// zig run benchmark.zig --release-fast --override-lib-dir .. +// zig run benchmark.zig --release-fast --zig-lib-dir .. const std = @import("../std.zig"); const builtin = std.builtin; diff --git a/lib/std/hash/benchmark.zig b/lib/std/hash/benchmark.zig index 4762068c0e..5a86afa056 100644 --- a/lib/std/hash/benchmark.zig +++ b/lib/std/hash/benchmark.zig @@ -3,7 +3,7 @@ // This file is part of [zig](https://ziglang.org/), which is MIT licensed. // The MIT license requires this copyright notice to be included in all copies // and substantial portions of the software. -// zig run benchmark.zig --release-fast --override-lib-dir .. +// zig run benchmark.zig --release-fast --zig-lib-dir .. const builtin = std.builtin; const std = @import("std"); diff --git a/lib/std/os.zig b/lib/std/os.zig index c3fb42f782..dce1f044ca 100644 --- a/lib/std/os.zig +++ b/lib/std/os.zig @@ -41,7 +41,7 @@ pub const wasi = @import("os/wasi.zig"); pub const windows = @import("os/windows.zig"); comptime { - assert(@import("std") == std); // std lib tests require --override-lib-dir + assert(@import("std") == std); // std lib tests require --zig-lib-dir } test { diff --git a/lib/std/special/build_runner.zig b/lib/std/special/build_runner.zig index b6fe55f725..1855d3652d 100644 --- a/lib/std/special/build_runner.zig +++ b/lib/std/special/build_runner.zig @@ -119,9 +119,9 @@ pub fn main() !void { warn("expected [auto|on|off] after --color, found '{s}'", .{next_arg}); return usageAndErr(builder, false, stderr_stream); }; - } else if (mem.eql(u8, arg, "--override-lib-dir")) { + } else if (mem.eql(u8, arg, "--zig-lib-dir")) { builder.override_lib_dir = nextArg(args, &arg_idx) orelse { - warn("Expected argument after --override-lib-dir\n\n", .{}); + warn("Expected argument after --zig-lib-dir\n\n", .{}); return usageAndErr(builder, false, stderr_stream); }; } else if (mem.eql(u8, arg, "--verbose-tokenize")) { @@ -234,7 +234,7 @@ fn usage(builder: *Builder, already_ran_build: bool, out_stream: anytype) !void \\Advanced Options: \\ --build-file [file] Override path to build.zig \\ --cache-dir [path] Override path to zig cache directory - \\ --override-lib-dir [arg] Override path to Zig lib directory + \\ --zig-lib-dir [arg] Override path to Zig lib directory \\ --verbose-tokenize Enable compiler debug output for tokenization \\ --verbose-ast Enable compiler debug output for parsing into an AST \\ --verbose-link Enable compiler debug output for linking diff --git a/src/main.zig b/src/main.zig index 512828bd77..ed90f7472d 100644 --- a/src/main.zig +++ b/src/main.zig @@ -310,7 +310,7 @@ const usage_build_generic = \\ --show-builtin Output the source of @import("builtin") then exit \\ --cache-dir [path] Override the local cache directory \\ --global-cache-dir [path] Override the global cache directory - \\ --override-lib-dir [path] Override path to Zig installation lib directory + \\ --zig-lib-dir [path] Override path to Zig installation lib directory \\ --enable-cache Output to cache directory; print path to stdout \\ \\Compile Options: @@ -888,7 +888,7 @@ fn buildOutputType( if (i + 1 >= args.len) fatal("expected parameter after {s}", .{arg}); i += 1; override_global_cache_dir = args[i]; - } else if (mem.eql(u8, arg, "--override-lib-dir")) { + } else if (mem.eql(u8, arg, "--zig-lib-dir")) { if (i + 1 >= args.len) fatal("expected parameter after {s}", .{arg}); i += 1; override_lib_dir = args[i]; @@ -2664,7 +2664,7 @@ pub fn cmdBuild(gpa: *Allocator, arena: *Allocator, args: []const []const u8) !v i += 1; build_file = args[i]; continue; - } else if (mem.eql(u8, arg, "--override-lib-dir")) { + } else if (mem.eql(u8, arg, "--zig-lib-dir")) { if (i + 1 >= args.len) fatal("expected argument after '{s}'", .{arg}); i += 1; override_lib_dir = args[i]; diff --git a/src/stage1/zig0.cpp b/src/stage1/zig0.cpp index 642fb56503..48752adad7 100644 --- a/src/stage1/zig0.cpp +++ b/src/stage1/zig0.cpp @@ -351,7 +351,7 @@ int main(int argc, char **argv) { out_name = argv[i]; } else if (strcmp(arg, "--dynamic-linker") == 0) { dynamic_linker = argv[i]; - } else if (strcmp(arg, "--override-lib-dir") == 0) { + } else if (strcmp(arg, "--zig-lib-dir") == 0) { override_lib_dir = argv[i]; } else if (strcmp(arg, "--library") == 0 || strcmp(arg, "-l") == 0) { if (strcmp(argv[i], "c") == 0) { @@ -433,7 +433,7 @@ int main(int argc, char **argv) { } if (override_lib_dir == nullptr) { - fprintf(stderr, "missing --override-lib-dir\n"); + fprintf(stderr, "missing --zig-lib-dir\n"); return print_error_usage(arg0); }