aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2022-09-12 14:43:50 +0100
committergingerBill <bill@gingerbill.org>2022-09-12 14:43:50 +0100
commit663b62e45f023dbdf27eaadc36d8b7d636a9e2d0 (patch)
tree92b269280d40eb11a00304d101c4b2920a0cdec4 /src
parent6910182011dca993fd9c2316f70ae2ebcf57857e (diff)
Fix `ODIN_BUILD_PROJECT_NAME`
Diffstat (limited to 'src')
-rw-r--r--src/build_settings.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/build_settings.cpp b/src/build_settings.cpp
index b877b8cb7..fc5a9d19f 100644
--- a/src/build_settings.cpp
+++ b/src/build_settings.cpp
@@ -1355,6 +1355,12 @@ bool init_build_paths(String init_filename) {
// [BuildPathMainPackage] Turn given init path into a `Path`, which includes normalizing it into a full path.
bc->build_paths[BuildPath_Main_Package] = path_from_string(ha, init_filename);
+ {
+ String build_project_name = last_path_element(bc->build_paths[BuildPath_Main_Package].basename);
+ GB_ASSERT(build_project_name.len > 0);
+ bc->ODIN_BUILD_PROJECT_NAME = build_project_name;
+ }
+
bool produces_output_file = false;
if (bc->command_kind == Command_doc && bc->cmd_doc_flags & CmdDocFlag_DocFormat) {
produces_output_file = true;
@@ -1538,12 +1544,6 @@ bool init_build_paths(String init_filename) {
enable_target_feature({}, bc->target_features_string);
}
- {
- String build_project_name = last_path_element(bc->build_paths[BuildPath_Main_Package].basename);
- GB_ASSERT(build_project_name.len > 0);
- bc->ODIN_BUILD_PROJECT_NAME = build_project_name;
- }
-
return true;
}