diff options
| author | Mark Naughton <mark@marknaughton.com> | 2023-04-23 17:02:56 +0100 |
|---|---|---|
| committer | Mark Naughton <mark@marknaughton.com> | 2023-04-23 17:02:56 +0100 |
| commit | 47610725eaac53db557cdb8c4d5b9a71b3af48ea (patch) | |
| tree | ac17cd4a0b8e462574b9820c94a2a83e89352a4b /src/build_settings.cpp | |
| parent | 341ba34773f4d38c3236e613020e741ef4325af2 (diff) | |
Change default executable extension
Putting a program into your path on a UNIX system with a
file extension means that you have to type the extension out for every
invocation of the program. A better default is to have no extension at
all since most people will end up removing it anyway.
This change does not affect Windows since the .exe extension is set
after the default extension if compiling on Windows.
Diffstat (limited to 'src/build_settings.cpp')
| -rw-r--r-- | src/build_settings.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/build_settings.cpp b/src/build_settings.cpp index ac033df71..7de9e558e 100644 --- a/src/build_settings.cpp +++ b/src/build_settings.cpp @@ -1497,13 +1497,11 @@ gb_internal bool init_build_paths(String init_filename) { } else if (is_arch_wasm()) { output_extension = STR_LIT("wasm"); } else if (build_context.build_mode == BuildMode_Executable) { - // By default use a .bin executable extension. - output_extension = STR_LIT("bin"); + // By default use no executable extension. + output_extension = make_string(nullptr, 0); if (build_context.metrics.os == TargetOs_windows) { output_extension = STR_LIT("exe"); - } else if (build_context.cross_compiling && selected_target_metrics->metrics == &target_essence_amd64) { - output_extension = make_string(nullptr, 0); } } else if (build_context.build_mode == BuildMode_DynamicLibrary) { // By default use a .so shared library extension. |