Backed out changeset e34634758f51 (bug 1671424) for bustages on configure.py . CLOSED TREE

This commit is contained in:
Narcis Beleuzu 2020-10-20 00:16:22 +03:00
Родитель 127dbfe779
Коммит 9252175982
6 изменённых файлов: 56 добавлений и 32 удалений

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

@ -58,6 +58,10 @@ endif
MOZ_MAKE = $(MAKE) $(MOZ_MAKE_FLAGS) -C $(OBJDIR)
# 'configure' scripts generated by autoconf.
CONFIGURES := $(TOPSRCDIR)/configure
CONFIGURES += $(TOPSRCDIR)/js/src/configure
#######################################################################
# Rules
@ -82,6 +86,38 @@ build::
$(if $(findstring n,$(filter-out --%, $(MAKEFLAGS))),,+)env SCCACHE_LOG=sccache=debug SCCACHE_ERROR_LOG=$(UPLOAD_PATH)/sccache.log $(MOZBUILD_MANAGE_SCCACHE_DAEMON) --start-server
endif
####################################
# Configure
$(CONFIGURES): %: %.in
@echo Generating $@
cp -f $< $@
chmod +x $@
CONFIGURE_ENV_ARGS += \
MAKE='$(MAKE)' \
$(NULL)
# configure uses the program name to determine @srcdir@. Calling it without
# $(TOPSRCDIR) will set @srcdir@ to "."; otherwise, it is set to the full
# path of $(TOPSRCDIR).
ifeq ($(TOPSRCDIR),$(OBJDIR))
CONFIGURE = ./configure
else
CONFIGURE = $(TOPSRCDIR)/configure
endif
configure:: $(CONFIGURES)
$(call BUILDSTATUS,TIERS configure)
$(call BUILDSTATUS,TIER_START configure)
@echo cd $(OBJDIR);
@echo $(CONFIGURE) $(CONFIGURE_ARGS)
@cd $(OBJDIR) && $(CONFIGURE_ENV_ARGS) $(CONFIGURE) $(CONFIGURE_ARGS) \
|| ( echo '*** Fix above errors and then restart with\
"./mach build"' && exit 1 )
@touch $(OBJDIR)/Makefile
$(call BUILDSTATUS,TIER_FINISH configure)
####################################
# Build it
@ -99,4 +135,5 @@ endif
.NOTPARALLEL:
.PHONY: \
build
build \
configure

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

@ -15,5 +15,6 @@
SRCDIR=$(dirname $0)
TOPSRCDIR="$SRCDIR"
PYTHON3="${PYTHON3:-python3}"
export OLD_CONFIGURE="$SRCDIR"/old-configure
exec "$PYTHON3" "$TOPSRCDIR/configure.py" "$@"

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

@ -40,9 +40,6 @@ import six
def main(argv):
config = {}
if 'OLD_CONFIGURE' not in os.environ:
os.environ['OLD_CONFIGURE'] = os.path.join(base_dir, 'old-configure')
sandbox = ConfigureSandbox(config, os.environ, argv)
clobber_file = 'CLOBBER'

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

@ -762,6 +762,8 @@ def config_status_deps(build_env, build_project):
return list(__sandbox__._all_paths) + extra_deps + [
os.path.join(topsrcdir, 'CLOBBER'),
os.path.join(topsrcdir, 'configure'),
os.path.join(topsrcdir, 'js', 'src', 'configure'),
os.path.join(topsrcdir, 'configure.in'),
os.path.join(topsrcdir, 'js', 'src', 'configure.in'),
os.path.join(topsrcdir, 'nsprpub', 'configure'),

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

@ -671,7 +671,7 @@ class MozbuildObject(ProcessExecutionMixin):
"""
self._ensure_objdir_exists()
args = [self._make_path()]
args = self._make_path()
if directory:
args.extend(['-C', directory.replace(os.sep, '/')])
@ -795,7 +795,7 @@ class MozbuildObject(ProcessExecutionMixin):
continue
result, xcode_lisense_error_tmp = validate_make(make)
if result:
return make
return [make]
if xcode_lisense_error_tmp:
xcode_lisense_error = True

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

@ -31,7 +31,6 @@ except Exception:
psutil = None
from mach.mixin.logging import LoggingMixin
from mozboot.util import get_mach_virtualenv_binary
import mozfile
from mozsystemmonitor.resourcemonitor import SystemResourceMonitor
from mozterm.widgets import Footer
@ -54,6 +53,9 @@ from ..compilation.warnings import (
WarningsCollector,
WarningsDatabase,
)
from ..shellutil import (
quote as shell_quote,
)
from ..util import (
FileAvoidWrite,
mkdir,
@ -1405,34 +1407,19 @@ class BuildDriver(MozbuildObject):
line_handler = line_handler or on_line
options = ' '.join(shell_quote(o) for o in options or ())
append_env = dict(append_env or {})
append_env['MAKE'] = self._make_path()
append_env['CONFIGURE_ARGS'] = options
if six.PY3:
python = sys.executable
else:
# Try to get the mach virtualenv Python if we can.
python = get_mach_virtualenv_binary()
if not os.path.exists(python):
python = 'python3'
# Only print build status messages when we have an active
# monitor.
if not buildstatus_messages:
append_env['NO_BUILDSTATUS_MESSAGES'] = '1'
status = self._run_client_mk(target='configure',
line_handler=line_handler,
append_env=append_env)
command = [python, os.path.join(self.topsrcdir, 'configure.py')]
if options:
command.extend(options)
if buildstatus_messages:
line_handler('BUILDSTATUS TIERS configure')
line_handler('BUILDSTATUS TIER_START configure')
status = self._run_command_in_objdir(
args=command,
line_handler=line_handler,
append_env=append_env,
)
if buildstatus_messages:
line_handler('BUILDSTATUS TIER_FINISH configure')
if status:
print('*** Fix above errors and then restart with "./mach build"')
else:
if not status:
print('Configure complete!')
print('Be sure to run |mach build| to pick up any changes')