mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-07 16:18:52 +00:00
Add .bin extension the case of a collision
The directory name is used to determine the executable name. In the case that the directory and output executable are in conflict, a .bin extension is added.
This commit is contained in:
@@ -1502,6 +1502,10 @@ gb_internal bool init_build_paths(String init_filename) {
|
|||||||
|
|
||||||
if (build_context.metrics.os == TargetOs_windows) {
|
if (build_context.metrics.os == TargetOs_windows) {
|
||||||
output_extension = STR_LIT("exe");
|
output_extension = STR_LIT("exe");
|
||||||
|
} else if (!str_eq(init_filename, str_lit(".")) && path_is_directory(init_filename)) {
|
||||||
|
// Add .bin extension to avoid collision
|
||||||
|
// with package directory name
|
||||||
|
output_extension = STR_LIT("bin");
|
||||||
}
|
}
|
||||||
} else if (build_context.build_mode == BuildMode_DynamicLibrary) {
|
} else if (build_context.build_mode == BuildMode_DynamicLibrary) {
|
||||||
// By default use a .so shared library extension.
|
// By default use a .so shared library extension.
|
||||||
|
|||||||
Reference in New Issue
Block a user