File tree 2 files changed +9
-5
lines changed 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -200,12 +200,16 @@ pub const Builder = struct {
200
200
const install_prefix = self .install_prefix orelse "/usr" ;
201
201
self .install_path = fs .path .join (self .allocator , &[_ ][]const u8 { dest_dir , install_prefix }) catch unreachable ;
202
202
} else {
203
- const install_prefix = self .install_prefix orelse blk : {
204
- const p = self .cache_root ;
203
+ self .install_path = self .install_prefix orelse blk : {
204
+ const p = if (self .release_mode ) | mode | switch (mode ) {
205
+ .Debug = > "debug" ,
206
+ .ReleaseSafe = > "release" ,
207
+ .ReleaseFast = > "release" ,
208
+ .ReleaseSmall = > "release" ,
209
+ } else "debug" ;
205
210
self .install_prefix = p ;
206
- break :blk p ;
211
+ break :blk self . pathFromRoot ( p ) ;
207
212
};
208
- self .install_path = install_prefix ;
209
213
}
210
214
self .lib_dir = fs .path .join (self .allocator , &[_ ][]const u8 { self .install_path , "lib" }) catch unreachable ;
211
215
self .exe_dir = fs .path .join (self .allocator , &[_ ][]const u8 { self .install_path , "bin" }) catch unreachable ;
Original file line number Diff line number Diff line change @@ -134,8 +134,8 @@ pub fn main() !void {
134
134
}
135
135
}
136
136
137
- builder .resolveInstallPrefix ();
138
137
try runBuild (builder );
138
+ builder .resolveInstallPrefix ();
139
139
140
140
if (builder .validateUserInputDidItFail ())
141
141
return usageAndErr (builder , true , stderr_stream );
You can’t perform that action at this time.
0 commit comments