We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
-fno-use-linker-plugin -fwhole-program
1 parent 9d093cd commit 7b1615bCopy full SHA for 7b1615b
platform/windows/detect.py
@@ -781,6 +781,10 @@ def configure_mingw(env: "SConsEnvironment"):
781
else:
782
env.Append(CCFLAGS=["-flto"])
783
env.Append(LINKFLAGS=["-flto"])
784
+ if not env["use_llvm"]:
785
+ # For mingw-gcc LTO, disable linker plugin and enable whole program to work around GH-102867.
786
+ env.Append(CCFLAGS=["-fno-use-linker-plugin", "-fwhole-program"])
787
+ env.Append(LINKFLAGS=["-fno-use-linker-plugin", "-fwhole-program"])
788
789
if env["use_asan"]:
790
env.Append(LINKFLAGS=["-Wl,--stack," + str(STACK_SIZE_SANITIZERS)])
0 commit comments