From fd59f03396ea26a56e9e8fca8ddffb16cdd4632b Mon Sep 17 00:00:00 2001 From: Anna Rift Date: Thu, 5 Dec 2024 16:58:12 -0600 Subject: [PATCH] Fix removing .o extension for incremental --- compiler/codegen/codegen.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/codegen/codegen.cpp b/compiler/codegen/codegen.cpp index 7b9581d0a446..b33052edd1e1 100644 --- a/compiler/codegen/codegen.cpp +++ b/compiler/codegen/codegen.cpp @@ -3116,7 +3116,8 @@ static void codegenPartTwo() { const char* filename = NULL; filename = generateFileName(fileNameHashMap, filename, currentModule->name); openCFile(&modulefile, filename, "c"); - std::string path = modulefile.pathname; + // cut off .o extension + std::string path(modulefile.pathname, strlen(modulefile.pathname) - 2); userFileName.push_back(astr(path)); closeCFile(&modulefile); }