Skip to content

Commit 557679f

Browse files
committedJun 20, 2016
Add a ENABLE_X86_RELAX_RELOCATIONS cmake option.
This corresponds to binutils' --enable-x86-relax-relocations. llvm-svn: 273224
1 parent 0abaef6 commit 557679f

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed
 

‎clang/CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@ set(DEFAULT_SYSROOT "" CACHE PATH
185185

186186
set(ENABLE_LINKER_BUILD_ID OFF CACHE BOOL "pass --build-id to ld")
187187

188+
set(ENABLE_X86_RELAX_RELOCATIONS OFF CACHE BOOL
189+
"enable x86 relax relocations by default")
190+
188191
set(CLANG_DEFAULT_CXX_STDLIB "" CACHE STRING
189192
"Default C++ stdlib to use (empty for architecture default, \"libstdc++\" or \"libc++\"")
190193
if (NOT(CLANG_DEFAULT_CXX_STDLIB STREQUAL "" OR

‎clang/include/clang/Config/config.h.cmake

+3
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,7 @@
4141
/* pass --build-id to ld */
4242
#cmakedefine ENABLE_LINKER_BUILD_ID
4343

44+
/* enable x86 relax relocations by default */
45+
#cmakedefine01 ENABLE_X86_RELAX_RELOCATIONS
46+
4447
#endif

‎clang/lib/Driver/Tools.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2839,7 +2839,7 @@ static void CollectArgsForIntegratedAssembler(Compilation &C,
28392839
// options.
28402840
bool CompressDebugSections = false;
28412841

2842-
bool UseRelaxRelocations = false;
2842+
bool UseRelaxRelocations = ENABLE_X86_RELAX_RELOCATIONS;
28432843
const char *MipsTargetFeature = nullptr;
28442844
for (const Arg *A :
28452845
Args.filtered(options::OPT_Wa_COMMA, options::OPT_Xassembler)) {

0 commit comments

Comments
 (0)