[K/N] Don't perform --gc-sections when producing DLL
Due to a bug, lld-link might be a bit too aggressive. Let's disable --gc-sections for DLL until we update LLD. Patches: https://reviews.llvm.org/D101522 https://reviews.llvm.org/D101615 https://reviews.llvm.org/D102138
This commit is contained in:
@@ -466,7 +466,13 @@ class MingwLinker(targetProperties: MingwConfigurables)
|
||||
// --gc-sections flag may affect profiling.
|
||||
// See https://clang.llvm.org/docs/SourceBasedCodeCoverage.html#drawbacks-and-limitations.
|
||||
// TODO: switching to lld may help.
|
||||
if (optimize && !needsProfileLibrary) +linkerOptimizationFlags
|
||||
if (optimize && !needsProfileLibrary) {
|
||||
// TODO: Can be removed after LLD update.
|
||||
// See KT-48085.
|
||||
if (!dynamic) {
|
||||
+linkerOptimizationFlags
|
||||
}
|
||||
}
|
||||
if (!debug) +linkerNoDebugFlags
|
||||
if (dynamic) +linkerDynamicFlags
|
||||
+libraries
|
||||
|
||||
Reference in New Issue
Block a user