aboutsummaryrefslogtreecommitdiffstats
path: root/build/platform/lld
diff options
context:
space:
mode:
authorDevtools Arcadia <arcadia-devtools@yandex-team.ru>2022-02-07 18:08:42 +0300
committerDevtools Arcadia <arcadia-devtools@mous.vla.yp-c.yandex.net>2022-02-07 18:08:42 +0300
commit1110808a9d39d4b808aef724c861a2e1a38d2a69 (patch)
treee26c9fed0de5d9873cce7e00bc214573dc2195b7 /build/platform/lld
downloadydb-1110808a9d39d4b808aef724c861a2e1a38d2a69.tar.gz
intermediate changes
ref:cde9a383711a11544ce7e107a78147fb96cc4029
Diffstat (limited to 'build/platform/lld')
-rw-r--r--build/platform/lld/ya.make62
1 files changed, 62 insertions, 0 deletions
diff --git a/build/platform/lld/ya.make b/build/platform/lld/ya.make
new file mode 100644
index 0000000000..c046e89098
--- /dev/null
+++ b/build/platform/lld/ya.make
@@ -0,0 +1,62 @@
+RESOURCES_LIBRARY()
+
+LICENSE(Service-Prebuilt-Tool)
+
+OWNER(somov)
+
+IF (USE_LTO OR USE_THINLTO)
+ IF (CLANG7 OR CLANG8)
+ # Use LLD 8 for old Clang because its IR code fails LLD 11 validation.
+ ENABLE(USE_LLD8)
+ ELSEIF (CLANG11)
+ # DEVTOOLSSUPPORT-9065
+ ENABLE(USE_LLD11)
+ ENDIF()
+ENDIF()
+
+IF (OS_ANDROID)
+ # Use LLD shipped with Android NDK.
+ LDFLAGS("-fuse-ld=lld")
+ELSEIF (USE_LLD8)
+ IF (HOST_OS_LINUX)
+ IF (HOST_ARCH_PPC64LE)
+ DECLARE_EXTERNAL_RESOURCE(LLD_ROOT sbr:1610790447)
+ ELSE()
+ DECLARE_EXTERNAL_RESOURCE(LLD_ROOT sbr:1063258680)
+ ENDIF()
+ ELSEIF (HOST_OS_DARWIN)
+ DECLARE_EXTERNAL_RESOURCE(LLD_ROOT sbr:1063258537)
+ ENDIF()
+
+ LDFLAGS("-fuse-ld=$LLD_ROOT_RESOURCE_GLOBAL/ld")
+ELSEIF (USE_LLD11)
+ IF (HOST_OS_LINUX)
+ IF (HOST_ARCH_PPC64LE)
+ DECLARE_EXTERNAL_RESOURCE(LLD_ROOT sbr:1843381106)
+ ELSE()
+ DECLARE_EXTERNAL_RESOURCE(LLD_ROOT sbr:1843327433)
+ ENDIF()
+ ELSEIF (HOST_OS_DARWIN)
+ DECLARE_EXTERNAL_RESOURCE(LLD_ROOT sbr:1843327928)
+ ENDIF()
+
+ LDFLAGS("-fuse-ld=$LLD_ROOT_RESOURCE_GLOBAL/ld" "-Wl,--no-rosegment")
+ELSE()
+ IF (HOST_OS_LINUX)
+ IF (HOST_ARCH_PPC64LE)
+ DECLARE_EXTERNAL_RESOURCE(LLD_ROOT sbr:2283417120)
+ ELSE()
+ DECLARE_EXTERNAL_RESOURCE(LLD_ROOT sbr:2283360772)
+ ENDIF()
+ ELSEIF (HOST_OS_DARWIN)
+ IF (HOST_ARCH_ARM64)
+ DECLARE_EXTERNAL_RESOURCE(LLD_ROOT sbr:2283439721)
+ ELSE()
+ DECLARE_EXTERNAL_RESOURCE(LLD_ROOT sbr:2283429958)
+ ENDIF()
+ ENDIF()
+
+ LDFLAGS("-fuse-ld=$LLD_ROOT_RESOURCE_GLOBAL/ld" "-Wl,--no-rosegment")
+ENDIF()
+
+END()