Compiler: Allow -out: to not have an extension on *nix for executables (only).

This commit is contained in:
Jeroen van Rijn
2022-04-08 19:02:14 +02:00
parent 3cab2592c3
commit 76d48b38d3
3 changed files with 6 additions and 4 deletions

View File

@@ -1308,7 +1308,9 @@ bool init_build_paths(String init_filename) {
// Do we have an extension? We might not if the output filename was supplied.
if (bc->build_paths[BuildPath_Output].ext.len == 0) {
bc->build_paths[BuildPath_Output].ext = copy_string(ha, output_extension);
if (build_context.metrics.os == TargetOs_windows || build_context.build_mode != BuildMode_Executable) {
bc->build_paths[BuildPath_Output].ext = copy_string(ha, output_extension);
}
}
// Check if output path is a directory.