diff --git a/releasenotes.md b/releasenotes.md index bdd191d46..6b1688519 100644 --- a/releasenotes.md +++ b/releasenotes.md @@ -49,6 +49,7 @@ - Fixes to the socket functions. - Improved output when pointer is out of range. - Better error when casting to a distinct fails. +- With single module, name the .o file after what `-o` provides. #1306 ### Stdlib changes diff --git a/src/compiler/module.c b/src/compiler/module.c index c22253329..290e37365 100644 --- a/src/compiler/module.c +++ b/src/compiler/module.c @@ -43,6 +43,7 @@ void scratch_buffer_append_module(Module *module, bool is_export) const char *module_create_object_file_name(Module *module) { + if (active_target.single_module == SINGLE_MODULE_ON && active_target.name) return active_target.name; scratch_buffer_clear(); char c; const char *name = module->name->module;