diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2024-07-10 15:09:13 +0200 |
|---|---|---|
| committer | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2024-07-10 15:09:13 +0200 |
| commit | cc73e06a46cbefd2afa4caa7ef95ba6d9ab64eb9 (patch) | |
| tree | ab8582b26760c023d37d525f355046aacf93944f /src/linker.cpp | |
| parent | 8dc4eca4d2940500de30dfb8fd2ec25f7c31eba7 (diff) | |
Allow precompiled resources with -resource:foo.res
And add them to the magic new feature.
Diffstat (limited to 'src/linker.cpp')
| -rw-r--r-- | src/linker.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/linker.cpp b/src/linker.cpp index ac3e32851..046e72d0e 100644 --- a/src/linker.cpp +++ b/src/linker.cpp @@ -305,18 +305,13 @@ gb_internal i32 linker_stage(LinkerData *gen) { defer (gb_free(heap_allocator(), windows_sdk_bin_path.text)); if (!build_context.use_lld) { // msvc - String temp_res_path = path_to_string(heap_allocator(), build_context.build_paths[BuildPath_RES]); - String temp_rc_path = path_to_string(heap_allocator(), build_context.build_paths[BuildPath_RC]); - defer (gb_free(heap_allocator(), temp_res_path.text)); - defer (gb_free(heap_allocator(), temp_rc_path.text)); - - String res_path = concatenate3_strings(heap_allocator(), str_lit("\""), temp_res_path, str_lit("\"")); - String rc_path = concatenate3_strings(heap_allocator(), str_lit("\""), temp_rc_path, str_lit("\"")); + String res_path = quote_path(heap_allocator(), build_context.build_paths[BuildPath_RES]); + String rc_path = quote_path(heap_allocator(), build_context.build_paths[BuildPath_RC]); defer (gb_free(heap_allocator(), res_path.text)); defer (gb_free(heap_allocator(), rc_path.text)); if (build_context.has_resource) { - if (temp_rc_path == "") { + if (build_context.build_paths[BuildPath_RC].basename == "") { debugf("Using precompiled resource %.*s\n", LIT(res_path)); } else { debugf("Compiling resource %.*s\n", LIT(res_path)); |