Browse Source

Prevent LTCG (MSVC LTO) from removing "pck" section

Bartłomiej T. Listwon 3 years ago
parent
commit
e4bde938a1
1 changed files with 5 additions and 0 deletions
  1. 5 0
      platform/windows/godot_windows.cpp

+ 5 - 0
platform/windows/godot_windows.cpp

@@ -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) {