From cefde23232fc30a1cc1b9d1bf9bba666efad8b57 Mon Sep 17 00:00:00 2001 From: Jeroen van Rijn Date: Sat, 6 Mar 2021 23:09:15 +0100 Subject: [PATCH 1/3] Remove double removal of extension when using the -out option. When specifying the out parameter, the extension was stripped twice. If your path contains a ".", this caused issues. e.g. cd "C:\Repro\Path With a . In The Name\" odin run repro.odin -keep-temp-files -out repro.exe This would cause the files to end up as: "C:\Repro\Path With a.exe", "C:\Repro\Path With a.ll", "C:\Repro\Path With a.bc" and "C:\Repro\Path With a.obj" With this patch it works as expected, with or without a . in the file path. --- src/main.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index b1fc8fd35..0897e5fa6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -875,12 +875,6 @@ bool parse_build_flags(Array args) { String path = value.value_string; path = string_trim_whitespace(path); if (is_build_flag_path_valid(path)) { - #if defined(GB_SYSTEM_WINDOWS) - String ext = path_extension(path); - if (ext == ".exe") { - path = substring(path, 0, string_extension_position(path)); - } - #endif build_context.out_filepath = path_to_full_path(heap_allocator(), path); } else { gb_printf_err("Invalid -out path, got %.*s\n", LIT(path)); From 4f1fb73f32bae1855c2597f46fdaf2d7011f5734 Mon Sep 17 00:00:00 2001 From: Jose Luis Rey Mendez Date: Sat, 6 Mar 2021 20:01:11 -0300 Subject: [PATCH 2/3] Added vs code to git ignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 20e3578ca..0d606498e 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,8 @@ bld/ ![Cc]ore/[Ll]og/ # Visual Studio 2015 cache/options directory .vs/ +# Visual Studio Code options directory +.vscode/ # Uncomment if you have tasks that create the project's static files in wwwroot #wwwroot/ demo From 4e8ec4ce3862f433f07dc89ef21455bdf81dbc11 Mon Sep 17 00:00:00 2001 From: Jose Luis Rey Mendez Date: Sat, 6 Mar 2021 20:02:16 -0300 Subject: [PATCH 3/3] Fix nullref access violation when building with no entry point --- src/checker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/checker.cpp b/src/checker.cpp index be58538a6..d5d6bf5c3 100644 --- a/src/checker.cpp +++ b/src/checker.cpp @@ -1907,7 +1907,7 @@ void generate_minimum_dependency_set(Checker *c, Entity *start) { array_add(&c->info.testing_procedures, e); } } - } else { + } else if (start != nullptr) { start->flags |= EntityFlag_Used; add_dependency_to_set(c, start); }