aboutsummaryrefslogtreecommitdiff
path: root/src/tilde.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2023-08-08 11:16:14 +0100
committergingerBill <bill@gingerbill.org>2023-08-08 11:16:14 +0100
commit7861dfd667aa8f610292b241269326911fba7b15 (patch)
tree3473bf3b926e7f6bbcd6fd6ce4a81e500836fd49 /src/tilde.cpp
parentc5fc28de7d248e9c832451a65467b5d37d6ee43c (diff)
Fix tilde extension when trying to build as assembly (unsupported currently)
Diffstat (limited to 'src/tilde.cpp')
-rw-r--r--src/tilde.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tilde.cpp b/src/tilde.cpp
index 17a2a1ab3..a0f1fd844 100644
--- a/src/tilde.cpp
+++ b/src/tilde.cpp
@@ -645,7 +645,7 @@ gb_internal String cg_get_entity_name(cgModule *m, Entity *e) {
#include "tilde_stmt.cpp"
-gb_internal String cg_filepath_obj_for_module(cgModule *m) {
+gb_internal String cg_filepath_obj_for_module(cgModule *m, bool use_assembly) {
String path = concatenate3_strings(permanent_allocator(),
build_context.build_paths[BuildPath_Output].basename,
STR_LIT("/"),
@@ -663,7 +663,7 @@ gb_internal String cg_filepath_obj_for_module(cgModule *m) {
String ext = {};
- if (build_context.build_mode == BuildMode_Assembly) {
+ if (use_assembly) {
ext = STR_LIT(".S");
} else {
if (is_arch_wasm()) {
@@ -827,7 +827,7 @@ gb_internal bool cg_generate_code(Checker *c, LinkerData *linker_data) {
TB_ExportBuffer export_buffer = tb_module_object_export(m->mod, debug_format);
defer (tb_export_buffer_free(export_buffer));
- String filepath_obj = cg_filepath_obj_for_module(m);
+ String filepath_obj = cg_filepath_obj_for_module(m, false);
array_add(&linker_data->output_object_paths, filepath_obj);
GB_ASSERT(tb_export_buffer_to_file(export_buffer, cast(char const *)filepath_obj.text));