[Linux] Fix linker arguments order
This commit is contained in:
committed by
Stanislav Erokhin
parent
62e7b67170
commit
5eae55be80
@@ -363,6 +363,9 @@ class GccBasedLinker(targetProperties: GccConfigurables)
|
||||
if (!debug) +linkerNoDebugFlags
|
||||
if (dynamic) +linkerDynamicFlags
|
||||
+objectFiles
|
||||
+libraries
|
||||
+linkerArgs
|
||||
if (mimallocEnabled) +mimallocLinkerDependencies
|
||||
// See explanation about `-u__llvm_profile_runtime` here:
|
||||
// https://github.com/llvm/llvm-project/blob/21e270a479a24738d641e641115bce6af6ed360a/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp#L930
|
||||
if (needsProfileLibrary) +listOf("-u__llvm_profile_runtime", profileLibrary!!)
|
||||
@@ -370,9 +373,6 @@ class GccBasedLinker(targetProperties: GccConfigurables)
|
||||
+linkerGccFlags
|
||||
+if (dynamic) "$libGcc/crtendS.o" else "$libGcc/crtend.o"
|
||||
+"$crtPrefix/crtn.o"
|
||||
+libraries
|
||||
+linkerArgs
|
||||
if (mimallocEnabled) +mimallocLinkerDependencies
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user