mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-14 15:23:15 +00:00
Fix ODIN_BUILD_PROJECT_NAME
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user