Skip to content

Commit

Permalink
Prevent LTCG (MSVC LTO) from removing "pck" section
Browse files Browse the repository at this point in the history
  • Loading branch information
Listwon committed Jan 30, 2022
1 parent 78e3e65 commit e4bde93
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 @@ 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 e4bde93

Please sign in to comment.