diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2022-05-27 15:47:29 +0200 |
|---|---|---|
| committer | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2022-05-27 15:47:29 +0200 |
| commit | f137b927b6b2199539e6e9004de4c5593078b9b6 (patch) | |
| tree | 2edfc919cb7fdda62d8e67b65987307ca8782d3f /src/build_settings.cpp | |
| parent | 337780497df7ff9dfae2cc4936db294ce4047c54 (diff) | |
Refactor ms_craziness.h
Diffstat (limited to 'src/build_settings.cpp')
| -rw-r--r-- | src/build_settings.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/build_settings.cpp b/src/build_settings.cpp index b458d8308..9c996aef3 100644 --- a/src/build_settings.cpp +++ b/src/build_settings.cpp @@ -1221,12 +1221,13 @@ bool init_build_paths(String init_filename) { } if (bc->pdb_filepath.len > 0) { - bc->build_paths[BuildPath_PDB] = path_from_string(ha, bc->pdb_filepath); + bc->build_paths[BuildPath_PDB] = path_from_string(ha, bc->pdb_filepath); } if ((bc->command_kind & Command__does_build) && (!bc->ignore_microsoft_magic)) { // NOTE(ic): It would be nice to extend this so that we could specify the Visual Studio version that we want instead of defaulting to the latest. Find_Result_Utf8 find_result = find_visual_studio_and_windows_sdk_utf8(); + defer (mc_free_all()); if (find_result.windows_sdk_version == 0) { gb_printf_err("Windows SDK not found.\n"); @@ -1256,13 +1257,6 @@ bool init_build_paths(String init_filename) { bc->build_paths[BuildPath_VS_LIB] = path_from_string(ha, find_result.vs_library_path); } } - - gb_free(ha, find_result.windows_sdk_root.text); - gb_free(ha, find_result.windows_sdk_um_library_path.text); - gb_free(ha, find_result.windows_sdk_ucrt_library_path.text); - gb_free(ha, find_result.vs_exe_path.text); - gb_free(ha, find_result.vs_library_path.text); - } #endif @@ -1344,9 +1338,9 @@ bool init_build_paths(String init_filename) { output_name.len -= 1; } output_name = remove_directory_from_path(output_name); - output_name = remove_extension_from_path(output_name); - output_name = copy_string(ha, string_trim_whitespace(output_name)); - output_path = path_from_string(ha, output_name); + output_name = remove_extension_from_path(output_name); + output_name = copy_string(ha, string_trim_whitespace(output_name)); + output_path = path_from_string(ha, output_name); // Replace extension. if (output_path.ext.len > 0) { |