tweak gold support, added to gcc
The gold linker support and gold plugin variants now use the same name. Trying to apply use-flag-style discipline here despite the fact gold has other implications for clang, this way globally enabling gold will have a more consistent effect if that becomes possible. The gold support in gcc could use more testing to ensure it works consistently, but as long as a binutils including gold is used the gcc configure tends to pick it up, and it seems to work with 5.3.0 at least.
This commit is contained in:
parent
48f19b5fde
commit
884f317d50
@ -48,11 +48,14 @@ class Gcc(Package):
|
||||
version('4.7.4', '4c696da46297de6ae77a82797d2abe28')
|
||||
version('4.6.4', 'b407a3d1480c11667f293bfb1f17d1a4')
|
||||
version('4.5.4', '27e459c2566b8209ab064570e1b378f7')
|
||||
|
||||
variant('gold', default=True, description="Build the gold linker plugin for ld-based LTO")
|
||||
|
||||
depends_on("mpfr")
|
||||
depends_on("gmp")
|
||||
depends_on("mpc") # when @4.5:
|
||||
depends_on("binutils~libiberty")
|
||||
depends_on("binutils~libiberty", when='~gold')
|
||||
depends_on("binutils~libiberty+gold", when='+gold')
|
||||
|
||||
# Save these until we can do optional deps.
|
||||
depends_on("isl", when=DEPENDS_ON_ISL_PREDICATE)
|
||||
|
@ -45,7 +45,7 @@ class Llvm(Package):
|
||||
variant('polly', default=True, description="Build the LLVM polyhedral optimization plugin, only builds for 3.7.0+")
|
||||
variant('libcxx', default=True, description="Build the LLVM C++ standard library")
|
||||
variant('compiler-rt', default=True, description="Build the LLVM compiler runtime, including sanitizers")
|
||||
variant('lto', default=True, description="Add support for LTO with the gold linker plugin")
|
||||
variant('gold', default=True, description="Add support for LTO with the gold linker plugin")
|
||||
|
||||
|
||||
# Universal dependency
|
||||
@ -57,7 +57,7 @@ class Llvm(Package):
|
||||
depends_on('libedit', when='+lldb')
|
||||
|
||||
# gold support
|
||||
depends_on('binutils+gold', when='+lto')
|
||||
depends_on('binutils+gold', when='+gold')
|
||||
|
||||
# polly plugin
|
||||
depends_on('gmp', when='+polly')
|
||||
@ -180,7 +180,7 @@ def install(self, spec, prefix):
|
||||
'-DCLANG_DEFAULT_OPENMP_RUNTIME:STRING=libomp',
|
||||
'-DPYTHON_EXECUTABLE:PATH=%s/bin/python' % spec['python'].prefix ])
|
||||
|
||||
if '+lto' in spec:
|
||||
if '+gold' in spec:
|
||||
cmake_args.append('-DLLVM_BINUTILS_INCDIR=' + os.path.join( spec['binutils'].prefix, 'include'))
|
||||
if '+polly' in spec:
|
||||
cmake_args.append('-DLINK_POLLY_INTO_TOOLS:Bool=ON')
|
||||
|
Loading…
Reference in New Issue
Block a user