aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/llvm_backend.cpp')
-rw-r--r--src/llvm_backend.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/llvm_backend.cpp b/src/llvm_backend.cpp
index 6ee1541d6..29dc13dad 100644
--- a/src/llvm_backend.cpp
+++ b/src/llvm_backend.cpp
@@ -1017,8 +1017,11 @@ String lb_filepath_obj_for_module(lbModule *m) {
}
String ext = {};
-
- if (build_context.build_mode == BuildMode_Assembly) {
+ if (build_context.out_filepath.len > 0) {
+ if (build_context.build_paths[BuildPath_Output].ext.len > 0) {
+ ext = concatenate_strings(permanent_allocator(), STR_LIT("."), build_context.build_paths[BuildPath_Output].ext);
+ }
+ } else if (build_context.build_mode == BuildMode_Assembly) {
ext = STR_LIT(".S");
} else {
if (is_arch_wasm()) {
@@ -1050,7 +1053,6 @@ String lb_filepath_obj_for_module(lbModule *m) {
}
}
}
-
return concatenate_strings(permanent_allocator(), path, ext);
}