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

(cherry picked from commit e4bde938a1)
This commit is contained in:
Bartłomiej T. Listwon 2022-01-30 16:26:24 +01:00 committed by Rémi Verschelde
parent fa906f70e9
commit 423a90043d
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

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