]> granicus.if.org Git - clang/commitdiff
[Fuchsia] Set ENABLE_X86_RELAX_RELOCATIONS for Fuchsia builds
authorPetr Hosek <phosek@chromium.org>
Wed, 13 Sep 2017 19:17:41 +0000 (19:17 +0000)
committerPetr Hosek <phosek@chromium.org>
Wed, 13 Sep 2017 19:17:41 +0000 (19:17 +0000)
This is a "Does your linker support it?" option, and all ours do.

Patch by Roland McGrath

Differential Revision: https://reviews.llvm.org/D37785

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@313173 91177308-0d34-0410-b5e6-96231b3b80d8

cmake/caches/Fuchsia-stage2.cmake

index 56dbaf52b2a71b1a56a29594e99c90eb0741bf69..ef67b518497a49ae38ef7bf833f05f83796179df 100644 (file)
@@ -18,6 +18,13 @@ if(NOT APPLE)
   set(CLANG_DEFAULT_LINKER lld CACHE STRING "")
 endif()
 
+# This is a "Does your linker support it?" option that only applies
+# to x86-64 ELF targets.  All Fuchsia target linkers do support it.
+# For x86-64 Linux, it's supported by LLD and by GNU linkers since
+# binutils 2.27, so one can hope that all Linux hosts in use handle it.
+# Ideally this would be settable as a per-target option.
+set(ENABLE_X86_RELAX_RELOCATIONS ON CACHE BOOL "")
+
 if(APPLE)
   set(LLDB_CODESIGN_IDENTITY "" CACHE STRING "")
 endif()