Windows: Fix GCC -fpermissive error with 'pck' section workaround
Follow-up to #57450.
(cherry picked from commit 5a1f42b322
)
This commit is contained in:
parent
b7b2fd0634
commit
58edf04240
1 changed files with 2 additions and 2 deletions
|
@ -39,7 +39,7 @@
|
||||||
#ifndef TOOLS_ENABLED
|
#ifndef TOOLS_ENABLED
|
||||||
#if defined _MSC_VER
|
#if defined _MSC_VER
|
||||||
#pragma section("pck", read)
|
#pragma section("pck", read)
|
||||||
__declspec(allocate("pck")) static char dummy[8] = { 0 };
|
__declspec(allocate("pck")) static const char dummy[8] = { 0 };
|
||||||
#elif defined __GNUC__
|
#elif defined __GNUC__
|
||||||
static const char dummy[8] __attribute__((section("pck"), used)) = { 0 };
|
static const char dummy[8] __attribute__((section("pck"), used)) = { 0 };
|
||||||
#endif
|
#endif
|
||||||
|
@ -142,7 +142,7 @@ __declspec(dllexport) int widechar_main(int argc, wchar_t **argv) {
|
||||||
|
|
||||||
#ifndef TOOLS_ENABLED
|
#ifndef TOOLS_ENABLED
|
||||||
// Workaround to prevent LTCG (MSVC LTO) from removing "pck" section
|
// Workaround to prevent LTCG (MSVC LTO) from removing "pck" section
|
||||||
char *dummy_guard = dummy;
|
const char *dummy_guard = dummy;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
char **argv_utf8 = new char *[argc];
|
char **argv_utf8 = new char *[argc];
|
||||||
|
|
Loading…
Reference in a new issue