Bug 862770 - Fix --disable-compile-environment a little. r=gps

--HG--
rename : config/makefiles/target_libs.mk => config/makefiles/target_binaries.mk
rename : js/src/config/makefiles/target_libs.mk => js/src/config/makefiles/target_binaries.mk
This commit is contained in:
Mike Hommey 2013-11-07 10:37:45 +09:00
parent 6b4f0058ce
commit d2778baa7e
20 changed files with 107 additions and 31 deletions

View File

@ -17,13 +17,16 @@ export TOPLEVEL_BUILD := 1
default:: default::
ifdef COMPILE_ENVIRONMENT
include $(topsrcdir)/$(MOZ_BUILD_APP)/build.mk include $(topsrcdir)/$(MOZ_BUILD_APP)/build.mk
endif
include $(topsrcdir)/config/config.mk include $(topsrcdir)/config/config.mk
ifndef LIBXUL_SDK
ifdef COMPILE_ENVIRONMENT
BUILD_JS = 1
endif
endif
GARBAGE_DIRS += dist _javagen _profile staticlib GARBAGE_DIRS += dist _javagen _profile staticlib
DIST_GARBAGE = config.cache config.log config.status* config-defs.h \ DIST_GARBAGE = config.cache config.log config.status* config-defs.h \
config/autoconf.mk \ config/autoconf.mk \
@ -35,7 +38,7 @@ ifndef MOZ_PROFILE_USE
# We need to explicitly put backend.RecursiveMakeBackend here # We need to explicitly put backend.RecursiveMakeBackend here
# otherwise the rule in rules.mk doesn't run early enough. # otherwise the rule in rules.mk doesn't run early enough.
libs binaries export tools:: CLOBBER $(topsrcdir)/configure config.status backend.RecursiveMakeBackend libs binaries export tools:: CLOBBER $(topsrcdir)/configure config.status backend.RecursiveMakeBackend
ifndef LIBXUL_SDK ifdef BUILD_JS
libs binaries export tools:: js-config-status libs binaries export tools:: js-config-status
endif endif
endif endif
@ -78,7 +81,7 @@ include backend.RecursiveMakeBackend.pp
default:: backend.RecursiveMakeBackend default:: backend.RecursiveMakeBackend
ifndef LIBXUL_SDK ifdef BUILD_JS
.PHONY: js-config-status .PHONY: js-config-status
js-config-status: js-config-status:
$(call SUBMAKE,backend.RecursiveMakeBackend,js/src,1) $(call SUBMAKE,backend.RecursiveMakeBackend,js/src,1)
@ -92,7 +95,7 @@ install_manifest_depends = \
backend.RecursiveMakeBackend \ backend.RecursiveMakeBackend \
$(NULL) $(NULL)
ifndef LIBXUL_SDK ifdef BUILD_JS
install_manifest_depends += js-config-status install_manifest_depends += js-config-status
endif endif
@ -101,12 +104,12 @@ install-manifests: $(addprefix install-dist-,$(install_manifests))
.PHONY: $(addprefix install-dist-,$(install_manifests)) .PHONY: $(addprefix install-dist-,$(install_manifests))
$(addprefix install-dist-,$(install_manifests)): install-dist-%: $(install_manifest_depends) $(addprefix install-dist-,$(install_manifests)): install-dist-%: $(install_manifest_depends)
$(call py_action,process_install_manifest,$(if $(NO_REMOVE),--no-remove )$(DIST)/$* _build_manifests/install/dist_$* $(if $(LIBXUL_SDK),,js/src/_build_manifests/install/dist_$*)) $(call py_action,process_install_manifest,$(if $(NO_REMOVE),--no-remove )$(DIST)/$* _build_manifests/install/dist_$* $(if $(BUILD_JS),js/src/_build_manifests/install/dist_$*))
.PHONY: install-tests .PHONY: install-tests
install-manifests: install-tests install-manifests: install-tests
install-tests: $(install_manifest_depends) install-tests: $(install_manifest_depends)
$(call py_action,process_install_manifest,$(if $(NO_REMOVE),--no-remove )_tests _build_manifests/install/tests $(if $(LIBXUL_SDK),,js/src/_build_manifests/install/tests)) $(call py_action,process_install_manifest,$(if $(NO_REMOVE),--no-remove )_tests _build_manifests/install/tests $(if $(BUILD_JS),js/src/_build_manifests/install/tests))
# _tests should be purged during cleaning. However, we don't want it purged # _tests should be purged during cleaning. However, we don't want it purged
@ -142,7 +145,7 @@ include $(topsrcdir)/testing/testsuite-targets.mk
endif endif
default all:: default all::
$(call BUILDSTATUS,TIERS export $(if $(MOZ_PSEUDO_DERECURSE),compile )libs tools) $(call BUILDSTATUS,TIERS export $(if $(COMPILE_ENVIRONMENT),$(if $(MOZ_PSEUDO_DERECURSE),compile ))libs tools)
include $(topsrcdir)/config/rules.mk include $(topsrcdir)/config/rules.mk
@ -247,7 +250,7 @@ scheck::
@relcount=`find $(DIST)/bin -name "*.so" | xargs objdump -R | grep R_386_PC32 | wc -l` && if test $$relcount -gt 0; then echo "FAILED: R_386_PC32 relocations detected in a shared library. Did you use a system header without adding it to config/system-headers?"; exit 1; else echo "PASSED"; fi @relcount=`find $(DIST)/bin -name "*.so" | xargs objdump -R | grep R_386_PC32 | wc -l` && if test $$relcount -gt 0; then echo "FAILED: R_386_PC32 relocations detected in a shared library. Did you use a system header without adding it to config/system-headers?"; exit 1; else echo "PASSED"; fi
endif endif
ifndef LIBXUL_SDK ifdef BUILD_JS
js/src/Makefile: subsrcdir := js/src js/src/Makefile: subsrcdir := js/src
ifdef ENABLE_TESTS ifdef ENABLE_TESTS

View File

@ -120,8 +120,10 @@ endif #}
ifneq (,$(filter-out OS2 WINNT,$(OS_ARCH))) ifneq (,$(filter-out OS2 WINNT,$(OS_ARCH)))
ifdef COMPILE_ENVIRONMENT
libs:: libs::
cp -p $(MOZ_APP_NAME)$(BIN_SUFFIX) $(DIST)/bin/$(MOZ_APP_NAME)-bin$(BIN_SUFFIX) cp -p $(MOZ_APP_NAME)$(BIN_SUFFIX) $(DIST)/bin/$(MOZ_APP_NAME)-bin$(BIN_SUFFIX)
endif
GARBAGE += $(addprefix $(FINAL_TARGET)/defaults/pref/, firefox.js) GARBAGE += $(addprefix $(FINAL_TARGET)/defaults/pref/, firefox.js)

View File

@ -40,9 +40,10 @@ test-ctors$(DLL_SUFFIX): DT_TYPE=INIT
GARBAGE += test-array$(DLL_SUFFIX) test-ctors$(DLL_SUFFIX) test-array$(DLL_SUFFIX).bak test-ctors$(DLL_SUFFIX).bak GARBAGE += test-array$(DLL_SUFFIX) test-ctors$(DLL_SUFFIX) test-array$(DLL_SUFFIX).bak test-ctors$(DLL_SUFFIX).bak
ifndef CROSS_COMPILE
ifdef COMPILE_ENVIRONMENT
libs:: test-array$(DLL_SUFFIX) test-ctors$(DLL_SUFFIX) libs:: test-array$(DLL_SUFFIX) test-ctors$(DLL_SUFFIX)
ifndef CROSS_COMPILE
dummy: dummy.$(OBJ_SUFFIX) dummy: dummy.$(OBJ_SUFFIX)
$(CC) -o $@ $^ $(LDFLAGS) $(CC) -o $@ $^ $(LDFLAGS)
@ -53,5 +54,6 @@ libs:: dummy
GARBAGE += dummy GARBAGE += dummy
endif endif
endif
test.$(OBJ_SUFFIX): CFLAGS := -O0 test.$(OBJ_SUFFIX): CFLAGS := -O0

View File

@ -9,10 +9,12 @@
MOZ_LIBSTDCXX_HOST_VERSION = MOZ_LIBSTDCXX_HOST_VERSION =
ifndef CROSS_COMPILE ifndef CROSS_COMPILE
ifdef COMPILE_ENVIRONMENT
ifdef USE_ELF_DYNSTR_GC ifdef USE_ELF_DYNSTR_GC
export:: elf-dynstr-gc export:: elf-dynstr-gc
endif endif
endif endif
endif
# IMPORTANT: Disable NSBUILDROOT for this directory only, otherwise we have # IMPORTANT: Disable NSBUILDROOT for this directory only, otherwise we have
# a recursive rule for finding nsinstall and the Perl scripts. # a recursive rule for finding nsinstall and the Perl scripts.
@ -27,6 +29,7 @@ endif
include $(topsrcdir)/config/config.mk include $(topsrcdir)/config/config.mk
ifneq (WINNT,$(HOST_OS_ARCH)) ifneq (WINNT,$(HOST_OS_ARCH))
ifdef COMPILE_ENVIRONMENT
# Ensure nsinstall is atomically created # Ensure nsinstall is atomically created
nsinstall$(HOST_BIN_SUFFIX): $(HOST_PROGRAM) nsinstall$(HOST_BIN_SUFFIX): $(HOST_PROGRAM)
cp $^ $@.tmp cp $^ $@.tmp
@ -37,6 +40,7 @@ NSINSTALL_DEST := $(DIST)/bin
NSINSTALL_TARGET := export NSINSTALL_TARGET := export
INSTALL_TARGETS += NSINSTALL INSTALL_TARGETS += NSINSTALL
endif endif
endif
HEADERS_FILES = \ HEADERS_FILES = \
$(DEPTH)/mozilla-config.h \ $(DEPTH)/mozilla-config.h \

View File

@ -112,6 +112,7 @@ ifeq ($(CURRENT_TIER),export)
$(addsuffix /$(CURRENT_TIER),$(filter-out config,$(CURRENT_DIRS))): config/$(CURRENT_TIER) $(addsuffix /$(CURRENT_TIER),$(filter-out config,$(CURRENT_DIRS))): config/$(CURRENT_TIER)
endif endif
ifdef COMPILE_ENVIRONMENT
ifneq (,$(filter libs binaries,$(CURRENT_TIER))) ifneq (,$(filter libs binaries,$(CURRENT_TIER)))
# When doing a "libs" build, target_libs.mk ensures the interesting dependency data # When doing a "libs" build, target_libs.mk ensures the interesting dependency data
# is available in the "binaries" stamp. Once recursion is done, aggregate all that # is available in the "binaries" stamp. Once recursion is done, aggregate all that
@ -139,6 +140,8 @@ endif
DIST_GARBAGE += binaries-deps.mk binaries-deps DIST_GARBAGE += binaries-deps.mk binaries-deps
endif
else else
# Don't recurse if MAKELEVEL is NO_RECURSE_MAKELEVEL as defined above, but # Don't recurse if MAKELEVEL is NO_RECURSE_MAKELEVEL as defined above, but
@ -209,6 +212,8 @@ endif
endif endif
endif endif
ifdef COMPILE_ENVIRONMENT
# Aggregate all dependency files relevant to a binaries build except in # Aggregate all dependency files relevant to a binaries build except in
# the mozilla top-level directory. # the mozilla top-level directory.
ifneq (_.,$(recurse_targets)_$(DEPTH)) ifneq (_.,$(recurse_targets)_$(DEPTH))
@ -227,4 +232,6 @@ ifneq (_.,$(recurse_targets)_$(DEPTH))
@$(if $(or $(recurse_targets),$^),$(call py_action,link_deps,-o binaries --group-all $(if $(want_abspaths),--abspaths )--topsrcdir $(topsrcdir) --topobjdir $(DEPTH) --dist $(DIST) $(ALL_DEP_FILES))) @$(if $(or $(recurse_targets),$^),$(call py_action,link_deps,-o binaries --group-all $(if $(want_abspaths),--abspaths )--topsrcdir $(topsrcdir) --topobjdir $(DEPTH) --dist $(DIST) $(ALL_DEP_FILES)))
endif endif
endif
endif # ifdef MOZ_PSEUDO_DERECURSE endif # ifdef MOZ_PSEUDO_DERECURSE

View File

@ -122,6 +122,7 @@ endif
endif endif
ifdef CPP_UNIT_TESTS ifdef CPP_UNIT_TESTS
ifdef COMPILE_ENVIRONMENT
# Compile the tests to $(DIST)/bin. Make lots of niceties available by default # Compile the tests to $(DIST)/bin. Make lots of niceties available by default
# through TestHarness.h, by modifying the list of includes and the libs against # through TestHarness.h, by modifying the list of includes and the libs against
@ -153,6 +154,7 @@ cppunittests-remote:
echo "please prepare your host with environment variables for TEST_DEVICE"; \ echo "please prepare your host with environment variables for TEST_DEVICE"; \
fi fi
endif # COMPILE_ENVIRONMENT
endif # CPP_UNIT_TESTS endif # CPP_UNIT_TESTS
.PHONY: check .PHONY: check
@ -303,6 +305,7 @@ EXCLUDED_OBJS := $(SIMPLE_PROGRAMS:$(BIN_SUFFIX)=.$(OBJ_SUFFIX))
SIMPLE_PROGRAMS := SIMPLE_PROGRAMS :=
endif endif
ifdef COMPILE_ENVIRONMENT
ifndef TARGETS ifndef TARGETS
TARGETS = $(LIBRARY) $(SHARED_LIBRARY) $(PROGRAM) $(SIMPLE_PROGRAMS) $(HOST_LIBRARY) $(HOST_PROGRAM) $(HOST_SIMPLE_PROGRAMS) TARGETS = $(LIBRARY) $(SHARED_LIBRARY) $(PROGRAM) $(SIMPLE_PROGRAMS) $(HOST_LIBRARY) $(HOST_PROGRAM) $(HOST_SIMPLE_PROGRAMS)
endif endif
@ -328,6 +331,19 @@ ifndef HOST_OBJS
_HOST_OBJS = $(HOST_COBJS) $(HOST_CPPOBJS) $(HOST_CMOBJS) $(HOST_CMMOBJS) _HOST_OBJS = $(HOST_COBJS) $(HOST_CPPOBJS) $(HOST_CMOBJS) $(HOST_CMMOBJS)
HOST_OBJS = $(strip $(_HOST_OBJS)) HOST_OBJS = $(strip $(_HOST_OBJS))
endif endif
else
LIBRARY :=
SHARED_LIBRARY :=
IMPORT_LIBRARY :=
REAL_LIBRARY :=
PROGRAM :=
SIMPLE_PROGRAMS :=
HOST_LIBRARY :=
HOST_PROGRAM :=
HOST_SIMPLE_PROGRAMS :=
SDK_BINARY := $(filter %.py,$(SDK_BINARY))
SDK_LIBRARY :=
endif
ALL_TRASH = \ ALL_TRASH = \
$(GARBAGE) $(TARGETS) $(OBJS) $(PROGOBJS) LOGS TAGS a.out \ $(GARBAGE) $(TARGETS) $(OBJS) $(PROGOBJS) LOGS TAGS a.out \
@ -613,7 +629,9 @@ ifndef SUPPRESS_DEFAULT_RULES
default all:: default all::
$(MAKE) export $(MAKE) export
ifdef MOZ_PSEUDO_DERECURSE ifdef MOZ_PSEUDO_DERECURSE
ifdef COMPILE_ENVIRONMENT
$(MAKE) compile $(MAKE) compile
endif
endif endif
$(MAKE) libs $(MAKE) libs
$(MAKE) tools $(MAKE) tools
@ -642,11 +660,13 @@ HOST_LIBS_DEPS = $(filter %.$(LIB_SUFFIX),$(HOST_LIBS))
GLOBAL_DEPS += Makefile $(DEPTH)/config/autoconf.mk $(topsrcdir)/config/config.mk GLOBAL_DEPS += Makefile $(DEPTH)/config/autoconf.mk $(topsrcdir)/config/config.mk
############################################## ##############################################
ifdef COMPILE_ENVIRONMENT
OBJ_TARGETS = $(OBJS) $(PROGOBJS) $(HOST_OBJS) $(HOST_PROGOBJS) OBJ_TARGETS = $(OBJS) $(PROGOBJS) $(HOST_OBJS) $(HOST_PROGOBJS)
compile:: $(OBJ_TARGETS) compile:: $(OBJ_TARGETS)
include $(topsrcdir)/config/makefiles/target_libs.mk include $(topsrcdir)/config/makefiles/target_binaries.mk
endif
ifdef IS_TOOL_DIR ifdef IS_TOOL_DIR
# One would think "tools:: libs" would work, but it turns out that combined with # One would think "tools:: libs" would work, but it turns out that combined with

View File

@ -2498,9 +2498,10 @@ esac
if test -z "$COMPILE_ENVIRONMENT"; then if test -z "$COMPILE_ENVIRONMENT"; then
SKIP_COMPILER_CHECKS=1 SKIP_COMPILER_CHECKS=1
SKIP_LIBRARY_CHECKS=1 SKIP_LIBRARY_CHECKS=1
else
MOZ_COMPILER_OPTS
fi fi
MOZ_COMPILER_OPTS
if test -z "$SKIP_COMPILER_CHECKS"; then if test -z "$SKIP_COMPILER_CHECKS"; then
dnl Checks for typedefs, structures, and compiler characteristics. dnl Checks for typedefs, structures, and compiler characteristics.
dnl ======================================================== dnl ========================================================
@ -7179,7 +7180,7 @@ if test "$USE_ELF_HACK" = 1; then
esac esac
fi fi
if test -n "$USE_ELF_HACK"; then if test -n "$COMPILE_ENVIRONMENT" -a -n "$USE_ELF_HACK"; then
dnl PT_GNU_RELRO segment makes the dynamic linker set a read-only flag on dnl PT_GNU_RELRO segment makes the dynamic linker set a read-only flag on
dnl memory addresses it maps to. The result is that by the time elfhack dnl memory addresses it maps to. The result is that by the time elfhack
dnl kicks in, it is not possible to apply relocations because of that, dnl kicks in, it is not possible to apply relocations because of that,
@ -7874,7 +7875,9 @@ AC_SUBST(MOZ_PIXMAN_CFLAGS)
AC_SUBST(MOZ_PIXMAN_LIBS) AC_SUBST(MOZ_PIXMAN_LIBS)
# Check for headers defining standard int types. # Check for headers defining standard int types.
MOZ_CHECK_HEADERS(stdint.h inttypes.h sys/int_types.h) if test -n "$COMPILE_ENVIRONMENT"; then
MOZ_CHECK_HEADERS(stdint.h inttypes.h sys/int_types.h)
fi
if test "$MOZ_TREE_CAIRO"; then if test "$MOZ_TREE_CAIRO"; then
MOZ_CAIRO_CFLAGS='-I$(LIBXUL_DIST)/include/cairo' MOZ_CAIRO_CFLAGS='-I$(LIBXUL_DIST)/include/cairo'
@ -8661,6 +8664,7 @@ AC_SUBST(MOZ_FOLD_LIBS)
AC_SUBST(MOZ_ENABLE_SZIP) AC_SUBST(MOZ_ENABLE_SZIP)
AC_SUBST(MOZ_SZIP_FLAGS) AC_SUBST(MOZ_SZIP_FLAGS)
if test -n "$COMPILE_ENVIRONMENT"; then
AC_MSG_CHECKING([for posix_fallocate]) AC_MSG_CHECKING([for posix_fallocate])
AC_TRY_LINK([#define _XOPEN_SOURCE 600 AC_TRY_LINK([#define _XOPEN_SOURCE 600
#include <fcntl.h>], #include <fcntl.h>],
@ -8676,7 +8680,6 @@ else
fi fi
dnl Check for missing components dnl Check for missing components
if test "$COMPILE_ENVIRONMENT"; then
if test "$MOZ_X11"; then if test "$MOZ_X11"; then
if test "$WITHOUT_X11"; then if test "$WITHOUT_X11"; then
AC_MSG_ERROR([--without-x specified and MOZ_X11 still defined]) AC_MSG_ERROR([--without-x specified and MOZ_X11 still defined])

View File

@ -112,6 +112,7 @@ ifeq ($(CURRENT_TIER),export)
$(addsuffix /$(CURRENT_TIER),$(filter-out config,$(CURRENT_DIRS))): config/$(CURRENT_TIER) $(addsuffix /$(CURRENT_TIER),$(filter-out config,$(CURRENT_DIRS))): config/$(CURRENT_TIER)
endif endif
ifdef COMPILE_ENVIRONMENT
ifneq (,$(filter libs binaries,$(CURRENT_TIER))) ifneq (,$(filter libs binaries,$(CURRENT_TIER)))
# When doing a "libs" build, target_libs.mk ensures the interesting dependency data # When doing a "libs" build, target_libs.mk ensures the interesting dependency data
# is available in the "binaries" stamp. Once recursion is done, aggregate all that # is available in the "binaries" stamp. Once recursion is done, aggregate all that
@ -139,6 +140,8 @@ endif
DIST_GARBAGE += binaries-deps.mk binaries-deps DIST_GARBAGE += binaries-deps.mk binaries-deps
endif
else else
# Don't recurse if MAKELEVEL is NO_RECURSE_MAKELEVEL as defined above, but # Don't recurse if MAKELEVEL is NO_RECURSE_MAKELEVEL as defined above, but
@ -209,6 +212,8 @@ endif
endif endif
endif endif
ifdef COMPILE_ENVIRONMENT
# Aggregate all dependency files relevant to a binaries build except in # Aggregate all dependency files relevant to a binaries build except in
# the mozilla top-level directory. # the mozilla top-level directory.
ifneq (_.,$(recurse_targets)_$(DEPTH)) ifneq (_.,$(recurse_targets)_$(DEPTH))
@ -227,4 +232,6 @@ ifneq (_.,$(recurse_targets)_$(DEPTH))
@$(if $(or $(recurse_targets),$^),$(call py_action,link_deps,-o binaries --group-all $(if $(want_abspaths),--abspaths )--topsrcdir $(topsrcdir) --topobjdir $(DEPTH) --dist $(DIST) $(ALL_DEP_FILES))) @$(if $(or $(recurse_targets),$^),$(call py_action,link_deps,-o binaries --group-all $(if $(want_abspaths),--abspaths )--topsrcdir $(topsrcdir) --topobjdir $(DEPTH) --dist $(DIST) $(ALL_DEP_FILES)))
endif endif
endif
endif # ifdef MOZ_PSEUDO_DERECURSE endif # ifdef MOZ_PSEUDO_DERECURSE

View File

@ -122,6 +122,7 @@ endif
endif endif
ifdef CPP_UNIT_TESTS ifdef CPP_UNIT_TESTS
ifdef COMPILE_ENVIRONMENT
# Compile the tests to $(DIST)/bin. Make lots of niceties available by default # Compile the tests to $(DIST)/bin. Make lots of niceties available by default
# through TestHarness.h, by modifying the list of includes and the libs against # through TestHarness.h, by modifying the list of includes and the libs against
@ -153,6 +154,7 @@ cppunittests-remote:
echo "please prepare your host with environment variables for TEST_DEVICE"; \ echo "please prepare your host with environment variables for TEST_DEVICE"; \
fi fi
endif # COMPILE_ENVIRONMENT
endif # CPP_UNIT_TESTS endif # CPP_UNIT_TESTS
.PHONY: check .PHONY: check
@ -303,6 +305,7 @@ EXCLUDED_OBJS := $(SIMPLE_PROGRAMS:$(BIN_SUFFIX)=.$(OBJ_SUFFIX))
SIMPLE_PROGRAMS := SIMPLE_PROGRAMS :=
endif endif
ifdef COMPILE_ENVIRONMENT
ifndef TARGETS ifndef TARGETS
TARGETS = $(LIBRARY) $(SHARED_LIBRARY) $(PROGRAM) $(SIMPLE_PROGRAMS) $(HOST_LIBRARY) $(HOST_PROGRAM) $(HOST_SIMPLE_PROGRAMS) TARGETS = $(LIBRARY) $(SHARED_LIBRARY) $(PROGRAM) $(SIMPLE_PROGRAMS) $(HOST_LIBRARY) $(HOST_PROGRAM) $(HOST_SIMPLE_PROGRAMS)
endif endif
@ -328,6 +331,19 @@ ifndef HOST_OBJS
_HOST_OBJS = $(HOST_COBJS) $(HOST_CPPOBJS) $(HOST_CMOBJS) $(HOST_CMMOBJS) _HOST_OBJS = $(HOST_COBJS) $(HOST_CPPOBJS) $(HOST_CMOBJS) $(HOST_CMMOBJS)
HOST_OBJS = $(strip $(_HOST_OBJS)) HOST_OBJS = $(strip $(_HOST_OBJS))
endif endif
else
LIBRARY :=
SHARED_LIBRARY :=
IMPORT_LIBRARY :=
REAL_LIBRARY :=
PROGRAM :=
SIMPLE_PROGRAMS :=
HOST_LIBRARY :=
HOST_PROGRAM :=
HOST_SIMPLE_PROGRAMS :=
SDK_BINARY := $(filter %.py,$(SDK_BINARY))
SDK_LIBRARY :=
endif
ALL_TRASH = \ ALL_TRASH = \
$(GARBAGE) $(TARGETS) $(OBJS) $(PROGOBJS) LOGS TAGS a.out \ $(GARBAGE) $(TARGETS) $(OBJS) $(PROGOBJS) LOGS TAGS a.out \
@ -613,7 +629,9 @@ ifndef SUPPRESS_DEFAULT_RULES
default all:: default all::
$(MAKE) export $(MAKE) export
ifdef MOZ_PSEUDO_DERECURSE ifdef MOZ_PSEUDO_DERECURSE
ifdef COMPILE_ENVIRONMENT
$(MAKE) compile $(MAKE) compile
endif
endif endif
$(MAKE) libs $(MAKE) libs
$(MAKE) tools $(MAKE) tools
@ -642,11 +660,13 @@ HOST_LIBS_DEPS = $(filter %.$(LIB_SUFFIX),$(HOST_LIBS))
GLOBAL_DEPS += Makefile $(DEPTH)/config/autoconf.mk $(topsrcdir)/config/config.mk GLOBAL_DEPS += Makefile $(DEPTH)/config/autoconf.mk $(topsrcdir)/config/config.mk
############################################## ##############################################
ifdef COMPILE_ENVIRONMENT
OBJ_TARGETS = $(OBJS) $(PROGOBJS) $(HOST_OBJS) $(HOST_PROGOBJS) OBJ_TARGETS = $(OBJS) $(PROGOBJS) $(HOST_OBJS) $(HOST_PROGOBJS)
compile:: $(OBJ_TARGETS) compile:: $(OBJ_TARGETS)
include $(topsrcdir)/config/makefiles/target_libs.mk include $(topsrcdir)/config/makefiles/target_binaries.mk
endif
ifdef IS_TOOL_DIR ifdef IS_TOOL_DIR
# One would think "tools:: libs" would work, but it turns out that combined with # One would think "tools:: libs" would work, but it turns out that combined with

View File

@ -124,6 +124,7 @@ MOZ_ARG_DISABLE_BOOL(compile-environment,
[ --disable-compile-environment [ --disable-compile-environment
Disable compiler/library checks.], Disable compiler/library checks.],
COMPILE_ENVIRONMENT= ) COMPILE_ENVIRONMENT= )
AC_SUBST(COMPILE_ENVIRONMENT)
dnl Check for Perl first -- needed for win32 SDK checks dnl Check for Perl first -- needed for win32 SDK checks
MOZ_PATH_PROGS(PERL, $PERL perl5 perl ) MOZ_PATH_PROGS(PERL, $PERL perl5 perl )
@ -2089,7 +2090,10 @@ if test "$ENABLE_YARR_JIT"; then
AC_DEFINE(ENABLE_YARR_JIT) AC_DEFINE(ENABLE_YARR_JIT)
fi fi
MOZ_COMPILER_OPTS if test -n "$COMPILE_ENVIRONMENT"; then
MOZ_COMPILER_OPTS
fi
if test -z "$SKIP_COMPILER_CHECKS"; then if test -z "$SKIP_COMPILER_CHECKS"; then
dnl Checks for typedefs, structures, and compiler characteristics. dnl Checks for typedefs, structures, and compiler characteristics.
dnl ======================================================== dnl ========================================================

View File

@ -29,5 +29,4 @@ if not CONFIG['LIBXUL_SDK']:
add_tier_dir('precompile', 'xpcom/xpidl') add_tier_dir('precompile', 'xpcom/xpidl')
# Bring in the configuration for the configured application. # Bring in the configuration for the configured application.
if CONFIG['COMPILE_ENVIRONMENT']: include('/' + CONFIG['MOZ_BUILD_APP'] + '/app.mozbuild')
include('/' + CONFIG['MOZ_BUILD_APP'] + '/app.mozbuild')

View File

@ -27,6 +27,7 @@ ifeq (browser,$(MOZ_BUILD_APP))
# And non metro linking error bug 886656: # And non metro linking error bug 886656:
# LNK1112: module machine type 'x64' conflicts with target machine type 'X86' # LNK1112: module machine type 'x64' conflicts with target machine type 'X86'
ifneq ($(OS_ARCH),WINNT) ifneq ($(OS_ARCH),WINNT)
ifdef COMPILE_ENVIRONMENT
check gtest:: check gtest::
$(MAKE) -C $(DEPTH)/toolkit/library gtestxul $(MAKE) -C $(DEPTH)/toolkit/library gtestxul
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
@ -35,3 +36,4 @@ endif
$(PYTHON) $(topsrcdir)/testing/gtest/rungtests.py --xre-path=$(DIST)/bin --symbols-path=$(DIST)/crashreporter-symbols $(DIST)/bin/$(MOZ_APP_NAME)$(BIN_SUFFIX) $(PYTHON) $(topsrcdir)/testing/gtest/rungtests.py --xre-path=$(DIST)/bin --symbols-path=$(DIST)/crashreporter-symbols $(DIST)/bin/$(MOZ_APP_NAME)$(BIN_SUFFIX)
endif endif
endif endif
endif

View File

@ -677,9 +677,9 @@ LD := $(PYTHON) $(topsrcdir)/build/link.py $(CURDIR)/linker-vsize $(LD)
endif endif
ifndef LINK_GTEST ifndef LINK_GTEST
ifdef COMPILE_ENVIRONMENT
libs:: $(FINAL_TARGET)/dependentlibs.list libs:: $(FINAL_TARGET)/dependentlibs.list
else endif
libs::
endif endif
.PHONY: gtestxul .PHONY: gtestxul

View File

@ -44,10 +44,12 @@ service-updater-head_DEST := $(XPCSHELLTESTROOT)/unit_service_updater
service-updater-head_FILES := $(XPCSHELLTESTROOT)/unit_aus_update/head_update.js service-updater-head_FILES := $(XPCSHELLTESTROOT)/unit_aus_update/head_update.js
ifndef MOZ_PROFILE_GENERATE ifndef MOZ_PROFILE_GENERATE
ifdef COMPILE_ENVIRONMENT
INSTALL_TARGETS += xpcshell-test-helper INSTALL_TARGETS += xpcshell-test-helper
xpcshell-test-helper_TARGET := libs xpcshell-test-helper_TARGET := libs
xpcshell-test-helper_DEST := $(XPCSHELLTESTROOT)/data xpcshell-test-helper_DEST := $(XPCSHELLTESTROOT)/data
xpcshell-test-helper_FILES := $(DIST)/bin/TestAUSHelper$(BIN_SUFFIX) xpcshell-test-helper_FILES := $(DIST)/bin/TestAUSHelper$(BIN_SUFFIX)
endif
endif # Not MOZ_PROFILE_GENERATE endif # Not MOZ_PROFILE_GENERATE
_CHROME_SHARED := \ _CHROME_SHARED := \

View File

@ -6,15 +6,16 @@
if CONFIG['LIBXUL_SDK']: if CONFIG['LIBXUL_SDK']:
error('toolkit.mozbuild is not compatible with --enable-libxul-sdk=') error('toolkit.mozbuild is not compatible with --enable-libxul-sdk=')
if not CONFIG['MOZ_NATIVE_NSPR']: if CONFIG['COMPILE_ENVIRONMENT']:
add_tier_dir('nspr', 'config/nspr') if not CONFIG['MOZ_NATIVE_NSPR']:
add_tier_dir('nspr', 'config/nspr')
add_tier_dir('external', 'config/external') add_tier_dir('external', 'config/external')
if not CONFIG['MOZ_NATIVE_NSS']: if not CONFIG['MOZ_NATIVE_NSS']:
add_tier_dir('nss', 'security/build') add_tier_dir('nss', 'security/build')
include('/config/js/js.mozbuild') include('/config/js/js.mozbuild')
if CONFIG['MOZ_CONTENT_SANDBOX']: if CONFIG['MOZ_CONTENT_SANDBOX']:
add_tier_dir('sandbox', 'security/sandbox') add_tier_dir('sandbox', 'security/sandbox')

View File

@ -35,7 +35,7 @@ elif CONFIG['ANDROID_VERSION'] == '15':
SOURCES += [ SOURCES += [
'GonkDisplayICS.cpp' 'GonkDisplayICS.cpp'
] ]
else: elif CONFIG['COMPILE_ENVIRONMENT']:
error('Unsupported platform version: %s' % (CONFIG['ANDROID_VERSION'])) error('Unsupported platform version: %s' % (CONFIG['ANDROID_VERSION']))
LIBRARY_NAME = 'display' LIBRARY_NAME = 'display'

View File

@ -105,7 +105,7 @@ elif CONFIG['OS_ARCH'] == 'Darwin':
SOURCES += [ SOURCES += [
'TimeStamp_darwin.cpp', 'TimeStamp_darwin.cpp',
] ]
else: elif CONFIG['COMPILE_ENVIRONMENT']:
error('No TimeStamp implementation on this platform. Build will not succeed') error('No TimeStamp implementation on this platform. Build will not succeed')
EXTRA_COMPONENTS += [ EXTRA_COMPONENTS += [

View File

@ -155,7 +155,7 @@ if CONFIG['OS_ARCH'] == 'Linux':
'xptcstubs_asm_parisc_linux.s', 'xptcstubs_asm_parisc_linux.s',
'xptcstubs_pa32.cpp', 'xptcstubs_pa32.cpp',
] ]
else: elif CONFIG['COMPILE_ENVIRONMENT']:
error('Unknown C++ compiler, xptcall assembly will probably be incorrect.') error('Unknown C++ compiler, xptcall assembly will probably be incorrect.')
if CONFIG['OS_ARCH'] == 'NetBSD': if CONFIG['OS_ARCH'] == 'NetBSD':