Skip to content

Commit

Permalink
Prevent LTCG (MSVC LTO) from removing "pck" section
Browse files Browse the repository at this point in the history
(cherry picked from commit e4bde93)
  • Loading branch information
Listwon authored and akien-mga committed Jan 31, 2022
1 parent fa906f7 commit 423a900
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions platform/windows/godot_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ __declspec(dllexport) int widechar_main(int argc, wchar_t **argv) {

setlocale(LC_CTYPE, "");

#ifndef TOOLS_ENABLED
// Workaround to prevent LTCG (MSVC LTO) from removing "pck" section
char *dummy_guard = dummy;
#endif

char **argv_utf8 = new char *[argc];

for (int i = 0; i < argc; ++i) {
Expand Down

0 comments on commit 423a900

Please sign in to comment.