aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Build.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-10-09 11:47:37 -0700
committerGitHub <noreply@github.com>2023-10-09 11:47:37 -0700
commitf7bc55c0136b91805bd046a8cc8ea745d7e7567d (patch)
tree8379c645854d3c513ebb18e7fbabc7ab5ed1a283 /lib/std/Build.zig
parent75b48ef503204d3ba005647ecce8fda4657a8588 (diff)
parent95907cb79578779108f3772cb93648d38354b9ec (diff)
downloadzig-f7bc55c0136b91805bd046a8cc8ea745d7e7567d.tar.gz
zig-f7bc55c0136b91805bd046a8cc8ea745d7e7567d.zip
Merge pull request #17392 from ziglang/fetch
rework package manager
Diffstat (limited to 'lib/std/Build.zig')
-rw-r--r--lib/std/Build.zig25
1 files changed, 20 insertions, 5 deletions
diff --git a/lib/std/Build.zig b/lib/std/Build.zig
index 49afd73778..5c80f4972c 100644
--- a/lib/std/Build.zig
+++ b/lib/std/Build.zig
@@ -634,6 +634,9 @@ pub const ExecutableOptions = struct {
use_llvm: ?bool = null,
use_lld: ?bool = null,
zig_lib_dir: ?LazyPath = null,
+ main_mod_path: ?LazyPath = null,
+
+ /// Deprecated; use `main_mod_path`.
main_pkg_path: ?LazyPath = null,
};
@@ -652,7 +655,7 @@ pub fn addExecutable(b: *Build, options: ExecutableOptions) *Step.Compile {
.use_llvm = options.use_llvm,
.use_lld = options.use_lld,
.zig_lib_dir = options.zig_lib_dir orelse b.zig_lib_dir,
- .main_pkg_path = options.main_pkg_path,
+ .main_mod_path = options.main_mod_path orelse options.main_pkg_path,
});
}
@@ -667,6 +670,9 @@ pub const ObjectOptions = struct {
use_llvm: ?bool = null,
use_lld: ?bool = null,
zig_lib_dir: ?LazyPath = null,
+ main_mod_path: ?LazyPath = null,
+
+ /// Deprecated; use `main_mod_path`.
main_pkg_path: ?LazyPath = null,
};
@@ -683,7 +689,7 @@ pub fn addObject(b: *Build, options: ObjectOptions) *Step.Compile {
.use_llvm = options.use_llvm,
.use_lld = options.use_lld,
.zig_lib_dir = options.zig_lib_dir orelse b.zig_lib_dir,
- .main_pkg_path = options.main_pkg_path,
+ .main_mod_path = options.main_mod_path orelse options.main_pkg_path,
});
}
@@ -699,6 +705,9 @@ pub const SharedLibraryOptions = struct {
use_llvm: ?bool = null,
use_lld: ?bool = null,
zig_lib_dir: ?LazyPath = null,
+ main_mod_path: ?LazyPath = null,
+
+ /// Deprecated; use `main_mod_path`.
main_pkg_path: ?LazyPath = null,
};
@@ -717,7 +726,7 @@ pub fn addSharedLibrary(b: *Build, options: SharedLibraryOptions) *Step.Compile
.use_llvm = options.use_llvm,
.use_lld = options.use_lld,
.zig_lib_dir = options.zig_lib_dir orelse b.zig_lib_dir,
- .main_pkg_path = options.main_pkg_path,
+ .main_mod_path = options.main_mod_path orelse options.main_pkg_path,
});
}
@@ -733,6 +742,9 @@ pub const StaticLibraryOptions = struct {
use_llvm: ?bool = null,
use_lld: ?bool = null,
zig_lib_dir: ?LazyPath = null,
+ main_mod_path: ?LazyPath = null,
+
+ /// Deprecated; use `main_mod_path`.
main_pkg_path: ?LazyPath = null,
};
@@ -751,7 +763,7 @@ pub fn addStaticLibrary(b: *Build, options: StaticLibraryOptions) *Step.Compile
.use_llvm = options.use_llvm,
.use_lld = options.use_lld,
.zig_lib_dir = options.zig_lib_dir orelse b.zig_lib_dir,
- .main_pkg_path = options.main_pkg_path,
+ .main_mod_path = options.main_mod_path orelse options.main_pkg_path,
});
}
@@ -769,6 +781,9 @@ pub const TestOptions = struct {
use_llvm: ?bool = null,
use_lld: ?bool = null,
zig_lib_dir: ?LazyPath = null,
+ main_mod_path: ?LazyPath = null,
+
+ /// Deprecated; use `main_mod_path`.
main_pkg_path: ?LazyPath = null,
};
@@ -787,7 +802,7 @@ pub fn addTest(b: *Build, options: TestOptions) *Step.Compile {
.use_llvm = options.use_llvm,
.use_lld = options.use_lld,
.zig_lib_dir = options.zig_lib_dir orelse b.zig_lib_dir,
- .main_pkg_path = options.main_pkg_path,
+ .main_mod_path = options.main_mod_path orelse options.main_pkg_path,
});
}