소스 검색

Merge pull request #57450 from Pineapple/master-ltcg-embed-pck

Prevent LTCG (MSVC LTO) from removing "pck" section
Rémi Verschelde 3 년 전
부모
커밋
5b1b545a58
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  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) {