зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1457168 - Make configure tests use LINKER_LDFLAGS. r=chmanchester
Because we have no linking configure test in python configure (yet), we just make old-configure tests use LINKER_LDFLAGS, and make those flags added to LDFLAGS by old-configure at the same time. --HG-- extra : rebase_source : 80ab7c5021c7ddd1b53d58ef76cd4372a524d3cb
This commit is contained in:
Родитель
a68567a1a8
Коммит
da38aeba7d
|
@ -1331,10 +1331,6 @@ def lto(value, c_compiler):
|
|||
|
||||
# clang and clang-cl
|
||||
if c_compiler.type in ('clang', 'clang-cl'):
|
||||
# Until Bug 1457168 is fixed, we have to hardcode -fuse-ld=lld here
|
||||
if c_compiler.type == 'clang':
|
||||
flags.append("-fuse-ld=lld")
|
||||
|
||||
if len(value) and value[0].lower() == 'full':
|
||||
flags.append("-flto")
|
||||
ldflags.append("-flto")
|
||||
|
@ -1644,7 +1640,7 @@ def select_linker(linker, c_compiler, developer_options, enable_gold,
|
|||
|
||||
set_config('LD_IS_BFD', depends(select_linker.KIND)
|
||||
(lambda x: x == 'bfd' or None))
|
||||
set_config('LINKER_LDFLAGS', select_linker.LINKER_FLAG)
|
||||
add_old_configure_assignment('LINKER_LDFLAGS', select_linker.LINKER_FLAG)
|
||||
|
||||
|
||||
js_option('--enable-clang-plugin', env='ENABLE_CLANG_PLUGIN',
|
||||
|
|
|
@ -63,6 +63,8 @@ dnl ========================================================
|
|||
USE_PTHREADS=
|
||||
_PTHREAD_LDFLAGS=""
|
||||
|
||||
LDFLAGS="$LDFLAGS $LINKER_LDFLAGS"
|
||||
|
||||
MOZ_DEFAULT_COMPILER
|
||||
|
||||
if test -z "$JS_STANDALONE"; then
|
||||
|
|
|
@ -78,6 +78,8 @@ dnl ========================================================
|
|||
MOZ_USE_PTHREADS=
|
||||
_PTHREAD_LDFLAGS=""
|
||||
|
||||
LDFLAGS="$LDFLAGS $LINKER_LDFLAGS"
|
||||
|
||||
MOZ_DEFAULT_COMPILER
|
||||
|
||||
if test "$COMPILE_ENVIRONMENT"; then
|
||||
|
|
|
@ -384,8 +384,6 @@ class LinkFlags(BaseCompileFlags):
|
|||
|
||||
self.flag_variables = (
|
||||
('OS', self._os_ldflags(), ('LDFLAGS',)),
|
||||
('LINKER', context.config.substs.get('LINKER_LDFLAGS'),
|
||||
('LDFLAGS',)),
|
||||
('DEFFILE', None, ('LDFLAGS',)),
|
||||
('MOZBUILD', None, ('LDFLAGS',)),
|
||||
('FIX_LINK_PATHS', context.config.substs.get('MOZ_FIX_LINK_PATHS'),
|
||||
|
|
|
@ -242,7 +242,6 @@ class TestEmitterBasic(unittest.TestCase):
|
|||
def test_link_flags(self):
|
||||
reader = self.reader('link-flags', extra_substs={
|
||||
'OS_LDFLAGS': ['-Wl,rpath-link=/usr/lib'],
|
||||
'LINKER_LDFLAGS': ['-fuse-ld=gold'],
|
||||
'MOZ_OPTIMIZE': '',
|
||||
'MOZ_OPTIMIZE_LDFLAGS': ['-Wl,-dead_strip'],
|
||||
'MOZ_DEBUG_LDFLAGS': ['-framework ExceptionHandling'],
|
||||
|
@ -250,7 +249,6 @@ class TestEmitterBasic(unittest.TestCase):
|
|||
sources, ldflags, lib, compile_flags = self.read_topsrcdir(reader)
|
||||
self.assertIsInstance(ldflags, ComputedFlags)
|
||||
self.assertEqual(ldflags.flags['OS'], reader.config.substs['OS_LDFLAGS'])
|
||||
self.assertEqual(ldflags.flags['LINKER'], reader.config.substs['LINKER_LDFLAGS'])
|
||||
self.assertEqual(ldflags.flags['MOZBUILD'], ['-Wl,-U_foo', '-framework Foo', '-x'])
|
||||
self.assertEqual(ldflags.flags['OPTIMIZE'], [])
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче