From d2778baa7eb84fb0b57cd9beb3e1c264721dd1a9 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Thu, 7 Nov 2013 10:37:45 +0900 Subject: [PATCH] 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 --- Makefile.in | 23 +++++++++++-------- browser/app/Makefile.in | 2 ++ build/unix/elfhack/Makefile.in | 4 +++- config/Makefile.in | 4 ++++ .../{target_libs.mk => target_binaries.mk} | 0 config/recurse.mk | 7 ++++++ config/rules.mk | 22 +++++++++++++++++- configure.in | 11 +++++---- .../{target_libs.mk => target_binaries.mk} | 0 js/src/config/recurse.mk | 7 ++++++ js/src/config/rules.mk | 22 +++++++++++++++++- js/src/configure.in | 6 ++++- moz.build | 3 +-- testing/gtest/Makefile.in | 2 ++ toolkit/library/Makefile.in | 4 ++-- toolkit/mozapps/update/tests/Makefile.in | 2 ++ toolkit/toolkit.mozbuild | 13 ++++++----- widget/gonk/libdisplay/moz.build | 2 +- xpcom/ds/moz.build | 2 +- xpcom/reflect/xptcall/src/md/unix/moz.build | 2 +- 20 files changed, 107 insertions(+), 31 deletions(-) rename config/makefiles/{target_libs.mk => target_binaries.mk} (100%) rename js/src/config/makefiles/{target_libs.mk => target_binaries.mk} (100%) diff --git a/Makefile.in b/Makefile.in index ce811dd824e..f5cc46a06b3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -17,13 +17,16 @@ export TOPLEVEL_BUILD := 1 default:: -ifdef COMPILE_ENVIRONMENT include $(topsrcdir)/$(MOZ_BUILD_APP)/build.mk -endif - include $(topsrcdir)/config/config.mk +ifndef LIBXUL_SDK +ifdef COMPILE_ENVIRONMENT +BUILD_JS = 1 +endif +endif + GARBAGE_DIRS += dist _javagen _profile staticlib DIST_GARBAGE = config.cache config.log config.status* config-defs.h \ config/autoconf.mk \ @@ -35,7 +38,7 @@ ifndef MOZ_PROFILE_USE # We need to explicitly put backend.RecursiveMakeBackend here # otherwise the rule in rules.mk doesn't run early enough. libs binaries export tools:: CLOBBER $(topsrcdir)/configure config.status backend.RecursiveMakeBackend -ifndef LIBXUL_SDK +ifdef BUILD_JS libs binaries export tools:: js-config-status endif endif @@ -78,7 +81,7 @@ include backend.RecursiveMakeBackend.pp default:: backend.RecursiveMakeBackend -ifndef LIBXUL_SDK +ifdef BUILD_JS .PHONY: js-config-status js-config-status: $(call SUBMAKE,backend.RecursiveMakeBackend,js/src,1) @@ -92,7 +95,7 @@ install_manifest_depends = \ backend.RecursiveMakeBackend \ $(NULL) -ifndef LIBXUL_SDK +ifdef BUILD_JS install_manifest_depends += js-config-status endif @@ -101,12 +104,12 @@ install-manifests: $(addprefix install-dist-,$(install_manifests)) .PHONY: $(addprefix install-dist-,$(install_manifests)) $(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 install-manifests: install-tests 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 @@ -142,7 +145,7 @@ include $(topsrcdir)/testing/testsuite-targets.mk endif 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 @@ -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 endif -ifndef LIBXUL_SDK +ifdef BUILD_JS js/src/Makefile: subsrcdir := js/src ifdef ENABLE_TESTS diff --git a/browser/app/Makefile.in b/browser/app/Makefile.in index 838b32a2d62..f495df5dd16 100644 --- a/browser/app/Makefile.in +++ b/browser/app/Makefile.in @@ -120,8 +120,10 @@ endif #} ifneq (,$(filter-out OS2 WINNT,$(OS_ARCH))) +ifdef COMPILE_ENVIRONMENT libs:: cp -p $(MOZ_APP_NAME)$(BIN_SUFFIX) $(DIST)/bin/$(MOZ_APP_NAME)-bin$(BIN_SUFFIX) +endif GARBAGE += $(addprefix $(FINAL_TARGET)/defaults/pref/, firefox.js) diff --git a/build/unix/elfhack/Makefile.in b/build/unix/elfhack/Makefile.in index c8ad32877f7..1421c4e8004 100644 --- a/build/unix/elfhack/Makefile.in +++ b/build/unix/elfhack/Makefile.in @@ -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 +ifndef CROSS_COMPILE +ifdef COMPILE_ENVIRONMENT libs:: test-array$(DLL_SUFFIX) test-ctors$(DLL_SUFFIX) -ifndef CROSS_COMPILE dummy: dummy.$(OBJ_SUFFIX) $(CC) -o $@ $^ $(LDFLAGS) @@ -53,5 +54,6 @@ libs:: dummy GARBAGE += dummy endif +endif test.$(OBJ_SUFFIX): CFLAGS := -O0 diff --git a/config/Makefile.in b/config/Makefile.in index 8668fbcf942..9ff0bd2252c 100644 --- a/config/Makefile.in +++ b/config/Makefile.in @@ -9,10 +9,12 @@ MOZ_LIBSTDCXX_HOST_VERSION = ifndef CROSS_COMPILE +ifdef COMPILE_ENVIRONMENT ifdef USE_ELF_DYNSTR_GC export:: elf-dynstr-gc endif endif +endif # IMPORTANT: Disable NSBUILDROOT for this directory only, otherwise we have # a recursive rule for finding nsinstall and the Perl scripts. @@ -27,6 +29,7 @@ endif include $(topsrcdir)/config/config.mk ifneq (WINNT,$(HOST_OS_ARCH)) +ifdef COMPILE_ENVIRONMENT # Ensure nsinstall is atomically created nsinstall$(HOST_BIN_SUFFIX): $(HOST_PROGRAM) cp $^ $@.tmp @@ -37,6 +40,7 @@ NSINSTALL_DEST := $(DIST)/bin NSINSTALL_TARGET := export INSTALL_TARGETS += NSINSTALL endif +endif HEADERS_FILES = \ $(DEPTH)/mozilla-config.h \ diff --git a/config/makefiles/target_libs.mk b/config/makefiles/target_binaries.mk similarity index 100% rename from config/makefiles/target_libs.mk rename to config/makefiles/target_binaries.mk diff --git a/config/recurse.mk b/config/recurse.mk index c6f90b153f2..9b2c5fb7513 100644 --- a/config/recurse.mk +++ b/config/recurse.mk @@ -112,6 +112,7 @@ ifeq ($(CURRENT_TIER),export) $(addsuffix /$(CURRENT_TIER),$(filter-out config,$(CURRENT_DIRS))): config/$(CURRENT_TIER) endif +ifdef COMPILE_ENVIRONMENT ifneq (,$(filter libs binaries,$(CURRENT_TIER))) # 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 @@ -139,6 +140,8 @@ endif DIST_GARBAGE += binaries-deps.mk binaries-deps +endif + else # Don't recurse if MAKELEVEL is NO_RECURSE_MAKELEVEL as defined above, but @@ -209,6 +212,8 @@ endif endif endif +ifdef COMPILE_ENVIRONMENT + # Aggregate all dependency files relevant to a binaries build except in # the mozilla top-level directory. 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))) endif +endif + endif # ifdef MOZ_PSEUDO_DERECURSE diff --git a/config/rules.mk b/config/rules.mk index 3caef33c53c..3728cf28c02 100644 --- a/config/rules.mk +++ b/config/rules.mk @@ -122,6 +122,7 @@ endif endif ifdef CPP_UNIT_TESTS +ifdef COMPILE_ENVIRONMENT # 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 @@ -153,6 +154,7 @@ cppunittests-remote: echo "please prepare your host with environment variables for TEST_DEVICE"; \ fi +endif # COMPILE_ENVIRONMENT endif # CPP_UNIT_TESTS .PHONY: check @@ -303,6 +305,7 @@ EXCLUDED_OBJS := $(SIMPLE_PROGRAMS:$(BIN_SUFFIX)=.$(OBJ_SUFFIX)) SIMPLE_PROGRAMS := endif +ifdef COMPILE_ENVIRONMENT ifndef TARGETS TARGETS = $(LIBRARY) $(SHARED_LIBRARY) $(PROGRAM) $(SIMPLE_PROGRAMS) $(HOST_LIBRARY) $(HOST_PROGRAM) $(HOST_SIMPLE_PROGRAMS) endif @@ -328,6 +331,19 @@ ifndef HOST_OBJS _HOST_OBJS = $(HOST_COBJS) $(HOST_CPPOBJS) $(HOST_CMOBJS) $(HOST_CMMOBJS) HOST_OBJS = $(strip $(_HOST_OBJS)) 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 = \ $(GARBAGE) $(TARGETS) $(OBJS) $(PROGOBJS) LOGS TAGS a.out \ @@ -613,7 +629,9 @@ ifndef SUPPRESS_DEFAULT_RULES default all:: $(MAKE) export ifdef MOZ_PSEUDO_DERECURSE +ifdef COMPILE_ENVIRONMENT $(MAKE) compile +endif endif $(MAKE) libs $(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 ############################################## +ifdef COMPILE_ENVIRONMENT OBJ_TARGETS = $(OBJS) $(PROGOBJS) $(HOST_OBJS) $(HOST_PROGOBJS) compile:: $(OBJ_TARGETS) -include $(topsrcdir)/config/makefiles/target_libs.mk +include $(topsrcdir)/config/makefiles/target_binaries.mk +endif ifdef IS_TOOL_DIR # One would think "tools:: libs" would work, but it turns out that combined with diff --git a/configure.in b/configure.in index f135c6475bb..4cb9f733dd1 100644 --- a/configure.in +++ b/configure.in @@ -2498,9 +2498,10 @@ esac if test -z "$COMPILE_ENVIRONMENT"; then SKIP_COMPILER_CHECKS=1 SKIP_LIBRARY_CHECKS=1 +else + MOZ_COMPILER_OPTS fi -MOZ_COMPILER_OPTS if test -z "$SKIP_COMPILER_CHECKS"; then dnl Checks for typedefs, structures, and compiler characteristics. dnl ======================================================== @@ -7179,7 +7180,7 @@ if test "$USE_ELF_HACK" = 1; then esac 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 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, @@ -7874,7 +7875,9 @@ AC_SUBST(MOZ_PIXMAN_CFLAGS) AC_SUBST(MOZ_PIXMAN_LIBS) # 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 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_SZIP_FLAGS) +if test -n "$COMPILE_ENVIRONMENT"; then AC_MSG_CHECKING([for posix_fallocate]) AC_TRY_LINK([#define _XOPEN_SOURCE 600 #include ], @@ -8676,7 +8680,6 @@ else fi dnl Check for missing components -if test "$COMPILE_ENVIRONMENT"; then if test "$MOZ_X11"; then if test "$WITHOUT_X11"; then AC_MSG_ERROR([--without-x specified and MOZ_X11 still defined]) diff --git a/js/src/config/makefiles/target_libs.mk b/js/src/config/makefiles/target_binaries.mk similarity index 100% rename from js/src/config/makefiles/target_libs.mk rename to js/src/config/makefiles/target_binaries.mk diff --git a/js/src/config/recurse.mk b/js/src/config/recurse.mk index c6f90b153f2..9b2c5fb7513 100644 --- a/js/src/config/recurse.mk +++ b/js/src/config/recurse.mk @@ -112,6 +112,7 @@ ifeq ($(CURRENT_TIER),export) $(addsuffix /$(CURRENT_TIER),$(filter-out config,$(CURRENT_DIRS))): config/$(CURRENT_TIER) endif +ifdef COMPILE_ENVIRONMENT ifneq (,$(filter libs binaries,$(CURRENT_TIER))) # 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 @@ -139,6 +140,8 @@ endif DIST_GARBAGE += binaries-deps.mk binaries-deps +endif + else # Don't recurse if MAKELEVEL is NO_RECURSE_MAKELEVEL as defined above, but @@ -209,6 +212,8 @@ endif endif endif +ifdef COMPILE_ENVIRONMENT + # Aggregate all dependency files relevant to a binaries build except in # the mozilla top-level directory. 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))) endif +endif + endif # ifdef MOZ_PSEUDO_DERECURSE diff --git a/js/src/config/rules.mk b/js/src/config/rules.mk index 3caef33c53c..3728cf28c02 100644 --- a/js/src/config/rules.mk +++ b/js/src/config/rules.mk @@ -122,6 +122,7 @@ endif endif ifdef CPP_UNIT_TESTS +ifdef COMPILE_ENVIRONMENT # 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 @@ -153,6 +154,7 @@ cppunittests-remote: echo "please prepare your host with environment variables for TEST_DEVICE"; \ fi +endif # COMPILE_ENVIRONMENT endif # CPP_UNIT_TESTS .PHONY: check @@ -303,6 +305,7 @@ EXCLUDED_OBJS := $(SIMPLE_PROGRAMS:$(BIN_SUFFIX)=.$(OBJ_SUFFIX)) SIMPLE_PROGRAMS := endif +ifdef COMPILE_ENVIRONMENT ifndef TARGETS TARGETS = $(LIBRARY) $(SHARED_LIBRARY) $(PROGRAM) $(SIMPLE_PROGRAMS) $(HOST_LIBRARY) $(HOST_PROGRAM) $(HOST_SIMPLE_PROGRAMS) endif @@ -328,6 +331,19 @@ ifndef HOST_OBJS _HOST_OBJS = $(HOST_COBJS) $(HOST_CPPOBJS) $(HOST_CMOBJS) $(HOST_CMMOBJS) HOST_OBJS = $(strip $(_HOST_OBJS)) 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 = \ $(GARBAGE) $(TARGETS) $(OBJS) $(PROGOBJS) LOGS TAGS a.out \ @@ -613,7 +629,9 @@ ifndef SUPPRESS_DEFAULT_RULES default all:: $(MAKE) export ifdef MOZ_PSEUDO_DERECURSE +ifdef COMPILE_ENVIRONMENT $(MAKE) compile +endif endif $(MAKE) libs $(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 ############################################## +ifdef COMPILE_ENVIRONMENT OBJ_TARGETS = $(OBJS) $(PROGOBJS) $(HOST_OBJS) $(HOST_PROGOBJS) compile:: $(OBJ_TARGETS) -include $(topsrcdir)/config/makefiles/target_libs.mk +include $(topsrcdir)/config/makefiles/target_binaries.mk +endif ifdef IS_TOOL_DIR # One would think "tools:: libs" would work, but it turns out that combined with diff --git a/js/src/configure.in b/js/src/configure.in index 1815b0764e4..43ae288d02d 100644 --- a/js/src/configure.in +++ b/js/src/configure.in @@ -124,6 +124,7 @@ MOZ_ARG_DISABLE_BOOL(compile-environment, [ --disable-compile-environment Disable compiler/library checks.], COMPILE_ENVIRONMENT= ) +AC_SUBST(COMPILE_ENVIRONMENT) dnl Check for Perl first -- needed for win32 SDK checks MOZ_PATH_PROGS(PERL, $PERL perl5 perl ) @@ -2089,7 +2090,10 @@ if test "$ENABLE_YARR_JIT"; then AC_DEFINE(ENABLE_YARR_JIT) fi -MOZ_COMPILER_OPTS +if test -n "$COMPILE_ENVIRONMENT"; then + MOZ_COMPILER_OPTS +fi + if test -z "$SKIP_COMPILER_CHECKS"; then dnl Checks for typedefs, structures, and compiler characteristics. dnl ======================================================== diff --git a/moz.build b/moz.build index 86d8b958cda..ac08994c508 100644 --- a/moz.build +++ b/moz.build @@ -29,5 +29,4 @@ if not CONFIG['LIBXUL_SDK']: add_tier_dir('precompile', 'xpcom/xpidl') # 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') diff --git a/testing/gtest/Makefile.in b/testing/gtest/Makefile.in index 0bef5f897fe..d6e6d5045ed 100644 --- a/testing/gtest/Makefile.in +++ b/testing/gtest/Makefile.in @@ -27,6 +27,7 @@ ifeq (browser,$(MOZ_BUILD_APP)) # And non metro linking error bug 886656: # LNK1112: module machine type 'x64' conflicts with target machine type 'X86' ifneq ($(OS_ARCH),WINNT) +ifdef COMPILE_ENVIRONMENT check gtest:: $(MAKE) -C $(DEPTH)/toolkit/library gtestxul 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) endif endif +endif diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in index ccee2114f97..ee4fc27fb18 100644 --- a/toolkit/library/Makefile.in +++ b/toolkit/library/Makefile.in @@ -677,9 +677,9 @@ LD := $(PYTHON) $(topsrcdir)/build/link.py $(CURDIR)/linker-vsize $(LD) endif ifndef LINK_GTEST +ifdef COMPILE_ENVIRONMENT libs:: $(FINAL_TARGET)/dependentlibs.list -else -libs:: +endif endif .PHONY: gtestxul diff --git a/toolkit/mozapps/update/tests/Makefile.in b/toolkit/mozapps/update/tests/Makefile.in index 6b3a4326456..df5fc516ade 100644 --- a/toolkit/mozapps/update/tests/Makefile.in +++ b/toolkit/mozapps/update/tests/Makefile.in @@ -44,10 +44,12 @@ service-updater-head_DEST := $(XPCSHELLTESTROOT)/unit_service_updater service-updater-head_FILES := $(XPCSHELLTESTROOT)/unit_aus_update/head_update.js ifndef MOZ_PROFILE_GENERATE +ifdef COMPILE_ENVIRONMENT INSTALL_TARGETS += xpcshell-test-helper xpcshell-test-helper_TARGET := libs xpcshell-test-helper_DEST := $(XPCSHELLTESTROOT)/data xpcshell-test-helper_FILES := $(DIST)/bin/TestAUSHelper$(BIN_SUFFIX) +endif endif # Not MOZ_PROFILE_GENERATE _CHROME_SHARED := \ diff --git a/toolkit/toolkit.mozbuild b/toolkit/toolkit.mozbuild index ec599fc8dc9..1bfbee8e53a 100644 --- a/toolkit/toolkit.mozbuild +++ b/toolkit/toolkit.mozbuild @@ -6,15 +6,16 @@ if CONFIG['LIBXUL_SDK']: error('toolkit.mozbuild is not compatible with --enable-libxul-sdk=') -if not CONFIG['MOZ_NATIVE_NSPR']: - add_tier_dir('nspr', 'config/nspr') +if CONFIG['COMPILE_ENVIRONMENT']: + 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']: - add_tier_dir('nss', 'security/build') + if not CONFIG['MOZ_NATIVE_NSS']: + add_tier_dir('nss', 'security/build') -include('/config/js/js.mozbuild') + include('/config/js/js.mozbuild') if CONFIG['MOZ_CONTENT_SANDBOX']: add_tier_dir('sandbox', 'security/sandbox') diff --git a/widget/gonk/libdisplay/moz.build b/widget/gonk/libdisplay/moz.build index 41c4d37f20a..7ce9e95c4ff 100644 --- a/widget/gonk/libdisplay/moz.build +++ b/widget/gonk/libdisplay/moz.build @@ -35,7 +35,7 @@ elif CONFIG['ANDROID_VERSION'] == '15': SOURCES += [ 'GonkDisplayICS.cpp' ] -else: +elif CONFIG['COMPILE_ENVIRONMENT']: error('Unsupported platform version: %s' % (CONFIG['ANDROID_VERSION'])) LIBRARY_NAME = 'display' diff --git a/xpcom/ds/moz.build b/xpcom/ds/moz.build index 7ca875b23ea..4613ad85942 100644 --- a/xpcom/ds/moz.build +++ b/xpcom/ds/moz.build @@ -105,7 +105,7 @@ elif CONFIG['OS_ARCH'] == 'Darwin': SOURCES += [ 'TimeStamp_darwin.cpp', ] -else: +elif CONFIG['COMPILE_ENVIRONMENT']: error('No TimeStamp implementation on this platform. Build will not succeed') EXTRA_COMPONENTS += [ diff --git a/xpcom/reflect/xptcall/src/md/unix/moz.build b/xpcom/reflect/xptcall/src/md/unix/moz.build index b1855573dcc..5a67e6ac1af 100644 --- a/xpcom/reflect/xptcall/src/md/unix/moz.build +++ b/xpcom/reflect/xptcall/src/md/unix/moz.build @@ -155,7 +155,7 @@ if CONFIG['OS_ARCH'] == 'Linux': 'xptcstubs_asm_parisc_linux.s', 'xptcstubs_pa32.cpp', ] - else: + elif CONFIG['COMPILE_ENVIRONMENT']: error('Unknown C++ compiler, xptcall assembly will probably be incorrect.') if CONFIG['OS_ARCH'] == 'NetBSD':