py-llvmlite: Changing build options when using the FUJITSU compiler (#21585)

This commit is contained in:
a-saitoh-fj 2021-02-11 00:58:10 +09:00 committed by GitHub
parent 08972014f8
commit 24dd5d12a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -37,6 +37,10 @@ class PyLlvmlite(PythonPackage):
depends_on('binutils', type='build') depends_on('binutils', type='build')
def setup_build_environment(self, env): def setup_build_environment(self, env):
if self.spec.satisfies('%fj'):
env.set('CXX_FLTO_FLAGS', '{0}'.format(self.compiler.cxx_pic_flag))
env.set('LD_FLTO_FLAGS', '-Wl,--exclude-libs=ALL')
else:
# Need to set PIC flag since this is linking statically with LLVM # Need to set PIC flag since this is linking statically with LLVM
env.set('CXX_FLTO_FLAGS', '-flto {0}'.format( env.set('CXX_FLTO_FLAGS', '-flto {0}'.format(
self.compiler.cxx_pic_flag)) self.compiler.cxx_pic_flag))