mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
std/build: change default install prefix to zig-out
Currently the default install prefix is $BUILD_ROOT/zig-cache, but mixing cache and artifacts makes little sense. Instead make $BUILD_ROOT/zig-out the default.
This commit is contained in:
parent
2ed368fb92
commit
5079d11b21
2 changed files with 3 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -10,6 +10,7 @@
|
||||||
# -andrewrk
|
# -andrewrk
|
||||||
|
|
||||||
zig-cache/
|
zig-cache/
|
||||||
|
zig-out/
|
||||||
/release/
|
/release/
|
||||||
/debug/
|
/debug/
|
||||||
/build/
|
/build/
|
||||||
|
|
|
||||||
|
|
@ -195,7 +195,8 @@ pub const Builder = struct {
|
||||||
self.install_prefix = install_prefix orelse "/usr";
|
self.install_prefix = install_prefix orelse "/usr";
|
||||||
self.install_path = fs.path.join(self.allocator, &[_][]const u8{ dest_dir, self.install_prefix }) catch unreachable;
|
self.install_path = fs.path.join(self.allocator, &[_][]const u8{ dest_dir, self.install_prefix }) catch unreachable;
|
||||||
} else {
|
} else {
|
||||||
self.install_prefix = install_prefix orelse self.cache_root;
|
self.install_prefix = install_prefix orelse
|
||||||
|
(fs.path.join(self.allocator, &[_][]const u8{ self.build_root, "zig-out" }) catch unreachable);
|
||||||
self.install_path = self.install_prefix;
|
self.install_path = self.install_prefix;
|
||||||
}
|
}
|
||||||
self.lib_dir = fs.path.join(self.allocator, &[_][]const u8{ self.install_path, "lib" }) catch unreachable;
|
self.lib_dir = fs.path.join(self.allocator, &[_][]const u8{ self.install_path, "lib" }) catch unreachable;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue