r273224 - Add a ENABLE_X86_RELAX_RELOCATIONS cmake option.

Rafael Espindola via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 20 16:54:44 PDT 2016


Author: rafael
Date: Mon Jun 20 18:54:44 2016
New Revision: 273224

URL: http://llvm.org/viewvc/llvm-project?rev=273224&view=rev
Log:
Add a ENABLE_X86_RELAX_RELOCATIONS  cmake option.

This corresponds to binutils' --enable-x86-relax-relocations.

Modified:
    cfe/trunk/CMakeLists.txt
    cfe/trunk/include/clang/Config/config.h.cmake
    cfe/trunk/lib/Driver/Tools.cpp

Modified: cfe/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=273224&r1=273223&r2=273224&view=diff
==============================================================================
--- cfe/trunk/CMakeLists.txt (original)
+++ cfe/trunk/CMakeLists.txt Mon Jun 20 18:54:44 2016
@@ -185,6 +185,9 @@ set(DEFAULT_SYSROOT "" CACHE PATH
 
 set(ENABLE_LINKER_BUILD_ID OFF CACHE BOOL "pass --build-id to ld")
 
+set(ENABLE_X86_RELAX_RELOCATIONS OFF CACHE BOOL
+    "enable x86 relax relocations by default")
+
 set(CLANG_DEFAULT_CXX_STDLIB "" CACHE STRING
   "Default C++ stdlib to use (empty for architecture default, \"libstdc++\" or \"libc++\"")
 if (NOT(CLANG_DEFAULT_CXX_STDLIB STREQUAL "" OR

Modified: cfe/trunk/include/clang/Config/config.h.cmake
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Config/config.h.cmake?rev=273224&r1=273223&r2=273224&view=diff
==============================================================================
--- cfe/trunk/include/clang/Config/config.h.cmake (original)
+++ cfe/trunk/include/clang/Config/config.h.cmake Mon Jun 20 18:54:44 2016
@@ -41,4 +41,7 @@
 /* pass --build-id to ld */
 #cmakedefine ENABLE_LINKER_BUILD_ID
 
+/* enable x86 relax relocations by default */
+#cmakedefine01 ENABLE_X86_RELAX_RELOCATIONS
+
 #endif

Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=273224&r1=273223&r2=273224&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Mon Jun 20 18:54:44 2016
@@ -2839,7 +2839,7 @@ static void CollectArgsForIntegratedAsse
   // options.
   bool CompressDebugSections = false;
 
-  bool UseRelaxRelocations = false;
+  bool UseRelaxRelocations = ENABLE_X86_RELAX_RELOCATIONS;
   const char *MipsTargetFeature = nullptr;
   for (const Arg *A :
        Args.filtered(options::OPT_Wa_COMMA, options::OPT_Xassembler)) {




More information about the cfe-commits mailing list