Bug 1604881 - fail if user attempts to set CC or CXX with "mk_add_options" in .mozconfig r=firefox-build-system-reviewers,chmanchester

Differential Revision: https://phabricator.services.mozilla.com/D57656

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Ricky Stewart 2019-12-19 21:00:43 +00:00
Родитель 08af6c6582
Коммит 3513bb2f84
1 изменённых файлов: 9 добавлений и 0 удалений

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

@ -22,6 +22,15 @@ def autoconf(mozconfig, autoconf):
assignment)
if m:
mozconfig_autoconf = m.group(1)
# Check whether we've exported any known-broken variables.
m = re.match('(?:export\s+)?(?:CC|CXX)\s*:?=\s*(?:.+)$',
assignment)
if m:
die('Setting the value of CC or CXX with "mk_add_options" '
'can cause the build to fail unexpectedly. Please '
'change your mozconfig to instead use '
'"ac_add_options", e.g. ac_add_options '
'CC=my-custom-cc".')
autoconf = autoconf[0] if autoconf else None