Cleanup Linker.kt a little

This commit is contained in:
Sergey Bogolepov
2020-12-04 18:26:18 +07:00
committed by Stanislav Erokhin
parent 6565d18a9f
commit 61ece4d364
2 changed files with 3 additions and 5 deletions
+3 -3
View File
@@ -412,7 +412,7 @@ linkerNoDebugFlags.linux_x64 = -S
linkerDynamicFlags.linux_x64 = -shared
dynamicLinker.linux_x64 = /lib64/ld-linux-x86-64.so.2
# targetSysRoot relative
abiSpecificLibraries.linux_x64 = ../lib64 lib64 usr/lib64
abiSpecificLibraries.linux_x64 = lib usr/lib ../lib64 lib64 usr/lib64
runtimeDefinitions.linux_x64 = USE_GCC_UNWIND=1 KONAN_LINUX=1 KONAN_X64=1 \
USE_ELF_SYMBOLS=1 ELFSIZE=64 KONAN_HAS_CXX11_EXCEPTION_FUNCTIONS=1
@@ -530,7 +530,7 @@ clangDebugFlags.linux_mips32 = -O0
clangDynamicFlags.linux_mips32 = -mrelocation-model pic
dynamicLinker.linux_mips32 = /lib/ld.so.1
# targetSysRoot relative
abiSpecificLibraries.linux_mips32 =
abiSpecificLibraries.linux_mips32 = lib usr/lib
# TODO: reconsider KONAN_NO_64BIT_ATOMIC, once target MIPS can do proper 64-bit load/store/CAS.
runtimeDefinitions.linux_mips32 = USE_GCC_UNWIND=1 KONAN_LINUX=1 KONAN_MIPS32=1 \
USE_ELF_SYMBOLS=1 ELFSIZE=32 KONAN_NO_64BIT_ATOMIC=1 KONAN_NO_UNALIGNED_ACCESS=1
@@ -563,7 +563,7 @@ clangDebugFlags.linux_mipsel32 = -O0
clangDynamicFlags.linux_mipsel32 = -mrelocation-model pic
dynamicLinker.linux_mipsel32 = /lib/ld.so.1
# targetSysRoot relative
abiSpecificLibraries.linux_mipsel32 =
abiSpecificLibraries.linux_mipsel32 = lib usr/lib
# TODO: reconsider KONAN_NO_64BIT_ATOMIC, once target MIPS can do proper 64-bit load/store/CAS.
runtimeDefinitions.linux_mipsel32 = USE_GCC_UNWIND=1 KONAN_LINUX=1 \
KONAN_MIPSEL32=1 USE_ELF_SYMBOLS=1 ELFSIZE=32 KONAN_NO_64BIT_ATOMIC=1 KONAN_NO_UNALIGNED_ACCESS=1
@@ -366,11 +366,9 @@ class GccBasedLinker(targetProperties: GccConfigurables)
if (!dynamic) +"$absoluteTargetSysRoot/$crtPrefix/crt1.o"
+"$absoluteTargetSysRoot/$crtPrefix/crti.o"
+if (dynamic) "$libGcc/crtbeginS.o" else "$libGcc/crtbegin.o"
+"-L$llvmLib"
+"-L$libGcc"
if (!isMips) +"--hash-style=gnu" // MIPS doesn't support hash-style=gnu
+specificLibs
+listOf("-L$absoluteTargetSysRoot/../lib", "-L$absoluteTargetSysRoot/lib", "-L$absoluteTargetSysRoot/usr/lib")
if (optimize) +linkerOptimizationFlags
if (!debug) +linkerNoDebugFlags
if (dynamic) +linkerDynamicFlags