Bug 1637957 - ensure consistent output when checking for linker kind; r=firefox-build-system-reviewers,rstewart

If we don't do this, configure will happily think the linker kind is
"unknown", which then causes problems downstream.

Differential Revision: https://phabricator.services.mozilla.com/D75300
This commit is contained in:
Nathan Froyd 2020-05-14 17:50:14 +00:00
Родитель b9c06ee24f
Коммит 4b28d7c785
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -2065,6 +2065,9 @@ def select_linker(linker, c_compiler, developer_options, enable_gold,
# specific to it on stderr when it fails to process --version.
env = dict(os.environ)
env['LD_PRINT_OPTIONS'] = '1'
# Some locales might not print out the strings we are looking for, so
# ensure consistent output.
env['LC_ALL'] = 'C'
retcode, stdout, stderr = get_cmd_output(*cmd, env=env)
if retcode == 1 and 'Logging ld64 options' in stderr:
kind = 'ld64'