diff options
Diffstat (limited to 'build')
-rw-r--r-- | build/application.ini | 19 | ||||
-rw-r--r-- | build/autoconf/compiler-opts.m4 | 15 | ||||
-rw-r--r-- | build/autoconf/jemalloc.m4 | 114 | ||||
-rw-r--r-- | build/automation-build.mk | 4 | ||||
-rw-r--r-- | build/automation.py.in | 6 | ||||
-rw-r--r-- | build/directive4.py | 65 | ||||
-rw-r--r-- | build/mach_bootstrap.py | 3 | ||||
-rw-r--r-- | build/mobile/b2gautomation.py | 4 | ||||
-rw-r--r-- | build/mobile/remoteautomation.py | 37 | ||||
-rw-r--r-- | build/moz.build | 19 | ||||
-rw-r--r-- | build/moz.configure/init.configure | 19 | ||||
-rw-r--r-- | build/moz.configure/memory.configure | 38 | ||||
-rw-r--r-- | build/moz.configure/old.configure | 11 | ||||
-rw-r--r-- | build/moz.configure/rust.configure | 166 | ||||
-rw-r--r-- | build/moz.configure/toolchain.configure | 5 | ||||
-rw-r--r-- | build/mozconfig.rust | 10 | ||||
-rw-r--r-- | build/pgo/profileserver.py | 1 | ||||
-rw-r--r-- | build/templates.mozbuild | 8 | ||||
-rw-r--r-- | build/valgrind/mach_commands.py | 1 | ||||
-rw-r--r-- | build/valgrind/x86_64-redhat-linux-gnu.sup | 1 |
20 files changed, 148 insertions, 398 deletions
diff --git a/build/application.ini b/build/application.ini index 6d27b4097..8f65421ed 100644 --- a/build/application.ini +++ b/build/application.ini @@ -18,8 +18,22 @@ #include @TOPOBJDIR@/buildid.h #include @TOPOBJDIR@/source-repo.h [App] +#ifdef MC_OFFICIAL +#if defined(MC_PALEMOON) || defined(MC_BASILISK) +Vendor=Moonchild Productions +#elif defined(BINOC_BOREALIS) +Vendor=Binary Outcast +#else +Vendor=@MOZ_APP_VENDOR@ +#endif +#else Vendor=@MOZ_APP_VENDOR@ +#endif +#ifdef MC_PALEMOON +Name=Pale Moon +#else Name=@MOZ_APP_BASENAME@ +#endif RemotingName=@MOZ_APP_REMOTINGNAME@ #ifdef MOZ_APP_DISPLAYNAME CodeName=@MOZ_APP_DISPLAYNAME@ @@ -46,8 +60,3 @@ MaxVersion=@GRE_MILESTONE@ EnableProfileMigrator=1 #endif -#if MOZ_CRASHREPORTER -[Crash Reporter] -Enabled=1 -ServerURL=https://crash-reports.mozilla.com/submit?id=@MOZ_APP_ID@&version=@MOZ_APP_VERSION@&buildid=@MOZ_BUILDID@ -#endif diff --git a/build/autoconf/compiler-opts.m4 b/build/autoconf/compiler-opts.m4 index 5e495e107..c47d792f4 100644 --- a/build/autoconf/compiler-opts.m4 +++ b/build/autoconf/compiler-opts.m4 @@ -7,7 +7,7 @@ dnl Add compiler specific options AC_DEFUN([MOZ_DEFAULT_COMPILER], [ dnl set DEVELOPER_OPTIONS early; MOZ_DEFAULT_COMPILER is usually the first non-setup directive - if test -z "$MOZILLA_OFFICIAL"; then + if test -z "$MC_OFFICIAL"; then DEVELOPER_OPTIONS=1 fi MOZ_ARG_ENABLE_BOOL(release, @@ -181,18 +181,15 @@ if test "$GNU_CC"; then if test -z "$CLANG_CC"; then case "$CC_VERSION" in - 4.*) + 4.* | 5.*) ;; *) # Lifetime Dead Store Elimination level 2 (default in GCC6+) breaks Gecko. - # Ideally, we'd use -flifetime-dse=1, but that means we'd forcefully - # enable it on optimization levels where it would otherwise not be enabled. - # So we disable it entirely. But since that would mean inconsistency with - # GCC5, which has level 1 depending on optimization level, disable it on - # GCC5 as well, because better safe than sorry. + # Instead of completely disabling this optimization on newer GCC's, + # we'll force them to use level 1 optimization with -flifetime-dse=1. # Add it first so that a mozconfig can override by setting CFLAGS/CXXFLAGS. - CFLAGS="-fno-lifetime-dse $CFLAGS" - CXXFLAGS="-fno-lifetime-dse $CXXFLAGS" + CFLAGS="-flifetime-dse=1 $CFLAGS" + CXXFLAGS="-flifetime-dse=1 $CXXFLAGS" ;; esac fi diff --git a/build/autoconf/jemalloc.m4 b/build/autoconf/jemalloc.m4 deleted file mode 100644 index 3b9c603f7..000000000 --- a/build/autoconf/jemalloc.m4 +++ /dev/null @@ -1,114 +0,0 @@ -dnl This Source Code Form is subject to the terms of the Mozilla Public -dnl License, v. 2.0. If a copy of the MPL was not distributed with this -dnl file, You can obtain one at http://mozilla.org/MPL/2.0/. - -AC_DEFUN([MOZ_SUBCONFIGURE_JEMALLOC], [ - -if test "$MOZ_BUILD_APP" != js -o -n "$JS_STANDALONE"; then - - # Run jemalloc configure script - - if test -z "$MOZ_SYSTEM_JEMALLOC" -a "$MOZ_MEMORY" && test -n "$MOZ_JEMALLOC4" -o -n "$MOZ_REPLACE_MALLOC"; then - ac_configure_args="--build=$build --host=$target --enable-stats --with-jemalloc-prefix=je_ --disable-valgrind" - # We're using memalign for _aligned_malloc in memory/build/mozmemory_wrap.c - # on Windows, so just export memalign on all platforms. - ac_configure_args="$ac_configure_args ac_cv_func_memalign=yes" - if test -n "$MOZ_REPLACE_MALLOC"; then - # When using replace_malloc, we always want valloc exported from jemalloc. - ac_configure_args="$ac_configure_args ac_cv_func_valloc=yes" - if test "${OS_ARCH}" = Darwin; then - # We also need to enable pointer validation on Mac because jemalloc's - # zone allocator is not used. - ac_configure_args="$ac_configure_args --enable-ivsalloc" - fi - fi - if test -n "$MOZ_JEMALLOC4"; then - case "${OS_ARCH}" in - WINNT|Darwin) - # We want jemalloc functions to be kept hidden on both Mac and Windows - # See memory/build/mozmemory_wrap.h for details. - ac_configure_args="$ac_configure_args --without-export" - ;; - esac - if test "${OS_ARCH}" = WINNT; then - # Lazy lock initialization doesn't play well with lazy linking of - # mozglue.dll on Windows XP (leads to startup crash), so disable it. - ac_configure_args="$ac_configure_args --disable-lazy-lock" - - # 64-bit Windows builds require a minimum 16-byte alignment. - if test -n "$HAVE_64BIT_BUILD"; then - ac_configure_args="$ac_configure_args --with-lg-tiny-min=4" - fi - fi - elif test "${OS_ARCH}" = Darwin; then - # When building as a replace-malloc lib, disabling the zone allocator - # forces to use pthread_atfork. - ac_configure_args="$ac_configure_args --disable-zone-allocator" - fi - _MANGLE="malloc posix_memalign aligned_alloc calloc realloc free memalign valloc malloc_usable_size" - JEMALLOC_WRAPPER= - if test -z "$MOZ_REPLACE_MALLOC"; then - case "$OS_ARCH" in - Linux|DragonFly|FreeBSD|NetBSD|OpenBSD) - MANGLE=$_MANGLE - ;; - esac - elif test -z "$MOZ_JEMALLOC4"; then - MANGLE=$_MANGLE - JEMALLOC_WRAPPER=replace_ - fi - if test -n "$MANGLE"; then - MANGLED= - for mangle in ${MANGLE}; do - if test -n "$MANGLED"; then - MANGLED="$mangle:$JEMALLOC_WRAPPER$mangle,$MANGLED" - else - MANGLED="$mangle:$JEMALLOC_WRAPPER$mangle" - fi - done - ac_configure_args="$ac_configure_args --with-mangling=$MANGLED" - fi - unset CONFIG_FILES - if test -z "$MOZ_TLS"; then - ac_configure_args="$ac_configure_args --disable-tls" - fi - EXTRA_CFLAGS="$CFLAGS" - for var in AS CC CXX CPP LD AR RANLIB STRIP CPPFLAGS EXTRA_CFLAGS LDFLAGS; do - ac_configure_args="$ac_configure_args $var='`eval echo \\${${var}}`'" - done - - # jemalloc's configure assumes that if you have CFLAGS set at all, you set - # all the flags necessary to configure jemalloc, which is not likely to be - # the case on Windows if someone is building Firefox with flags set in - # their mozconfig. - if test "$_MSC_VER"; then - ac_configure_args="$ac_configure_args CFLAGS=" - fi - - # Force disable DSS support in jemalloc. - ac_configure_args="$ac_configure_args ac_cv_func_sbrk=false" - - # Make Linux builds munmap freed chunks instead of recycling them. - ac_configure_args="$ac_configure_args --enable-munmap" - - # Disable cache oblivious behavior that appears to have a performance - # impact on Firefox. - ac_configure_args="$ac_configure_args --disable-cache-oblivious" - - if ! test -e memory/jemalloc; then - mkdir -p memory/jemalloc - fi - - # jemalloc's configure runs git to determine the version. But when building - # from a gecko git clone, the git commands it uses is going to pick gecko's - # information, not jemalloc's, which is useless. So pretend we don't have git - # at all. That will make jemalloc's configure pick the in-tree VERSION file. - (PATH="$srcdir/memory/jemalloc/helper:$PATH"; - AC_OUTPUT_SUBDIRS(memory/jemalloc/src) - ) || exit 1 - ac_configure_args="$_SUBDIR_CONFIG_ARGS" - fi - -fi - -]) diff --git a/build/automation-build.mk b/build/automation-build.mk index e25f90c5d..6599cb032 100644 --- a/build/automation-build.mk +++ b/build/automation-build.mk @@ -48,11 +48,7 @@ else AUTOMATION_PPARGS += -DIS_DEBUG_BUILD=0 endif -ifdef MOZ_CRASHREPORTER -AUTOMATION_PPARGS += -DCRASHREPORTER=1 -else AUTOMATION_PPARGS += -DCRASHREPORTER=0 -endif ifdef MOZ_ASAN AUTOMATION_PPARGS += -DIS_ASAN=1 diff --git a/build/automation.py.in b/build/automation.py.in index 1c63977e8..09c9d0071 100644 --- a/build/automation.py.in +++ b/build/automation.py.in @@ -228,11 +228,7 @@ class Automation(object): if dmdPath and dmdLibrary and preloadEnvVar: env[preloadEnvVar] = os.path.join(dmdPath, dmdLibrary) - if crashreporter and not debugger: - env['MOZ_CRASHREPORTER_NO_REPORT'] = '1' - env['MOZ_CRASHREPORTER'] = '1' - else: - env['MOZ_CRASHREPORTER_DISABLE'] = '1' + env['MOZ_CRASHREPORTER_DISABLE'] = '1' # Crash on non-local network connections by default. # MOZ_DISABLE_NONLOCAL_CONNECTIONS can be set to "0" to temporarily diff --git a/build/directive4.py b/build/directive4.py new file mode 100644 index 000000000..dd8c111cf --- /dev/null +++ b/build/directive4.py @@ -0,0 +1,65 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +# Imports +from __future__ import print_function, unicode_literals + +import os +import sys + +# Sanity check +if not len(sys.argv) > 1: + print("Incorrect number of arguments") + sys.exit(1) + +# Vars +listConfigure = sys.argv[1:] +listConfig = [] +strBrandingDirectory = "" +listViolations = [] + +# Build a list of set configure variables +for _value in listConfigure: + _splitString = _value.split("=") + + if _splitString[1] == "1": + listConfig += [ _splitString[0] ] + elif _splitString[0] == "MOZ_BRANDING_DIRECTORY": + strBrandingDirectory = _splitString[1] + +# Only applies if using Official Branding or specific branding directories +if ('MOZ_OFFICIAL_BRANDING' in listConfig) or (strBrandingDirectory.endswith("branding/official")) or (strBrandingDirectory.endswith("branding/unstable")): + # Applies to Pale Moon and Basilisk + if ('MC_BASILISK' in listConfig) or ('MC_PALEMOON' in listConfig): + listViolations += [ + 'MOZ_SANDBOX', + 'MOZ_SYSTEM_LIBEVENT', + 'MOZ_SYSTEM_NSS', + 'MOZ_SYSTEM_NSPR', + 'MOZ_SYSTEM_JPEG', + 'MOZ_SYSTEM_ZLIB', + 'MOZ_SYSTEM_BZ2', + 'MOZ_SYSTEM_PNG', + 'MOZ_SYSTEM_LIBVPX', + 'MOZ_SYSTEM_SQLITE', + 'MOZ_SYSTEM_JEMALLOC' + ] + + # Applies to Pale Moon Only + if 'MC_PALEMOON' in listConfig: + listViolations += [ + 'MOZ_EME', + 'MOZ_WEBRTC' + ] + + # Iterate through enabled violations and output 1 to DIRECTIVE4 if any are found + for _value in listViolations: + if _value in listConfig: + sys.stdout.write("1") + sys.exit(1) + +# Exit outputting nothing to DIRECTIVE4 being empty because there are no violations +sys.exit(0) + + diff --git a/build/mach_bootstrap.py b/build/mach_bootstrap.py index 4fbf7de1d..bdf7c9b03 100644 --- a/build/mach_bootstrap.py +++ b/build/mach_bootstrap.py @@ -99,7 +99,6 @@ SEARCH_PATHS = [ # Individual files providing mach commands. MACH_MODULES = [ - 'addon-sdk/mach_commands.py', 'build/valgrind/mach_commands.py', 'devtools/shared/css/generated/mach_commands.py', 'dom/bindings/mach_commands.py', @@ -131,6 +130,8 @@ MACH_MODULES = [ 'mobile/android/mach_commands.py', ] +if os.path.exists('addon-sdk/mach_commands.py'): + MACH_MODULES += [ 'addon-sdk/mach_commands.py' ] CATEGORIES = { 'build': { diff --git a/build/mobile/b2gautomation.py b/build/mobile/b2gautomation.py index d73edd419..a21809068 100644 --- a/build/mobile/b2gautomation.py +++ b/build/mobile/b2gautomation.py @@ -156,10 +156,6 @@ class B2GRemoteAutomation(Automation): if env is None: env = {} - if crashreporter: - env['MOZ_CRASHREPORTER'] = '1' - env['MOZ_CRASHREPORTER_NO_REPORT'] = '1' - # We always hide the results table in B2G; it's much slower if we don't. env['MOZ_HIDE_RESULTS_TABLE'] = '1' return env diff --git a/build/mobile/remoteautomation.py b/build/mobile/remoteautomation.py index 1358e0dfe..f098d5bba 100644 --- a/build/mobile/remoteautomation.py +++ b/build/mobile/remoteautomation.py @@ -74,11 +74,7 @@ class RemoteAutomation(Automation): if 'MOZ_HIDE_RESULTS_TABLE' in os.environ: env['MOZ_HIDE_RESULTS_TABLE'] = os.environ['MOZ_HIDE_RESULTS_TABLE'] - if crashreporter and not debugger: - env['MOZ_CRASHREPORTER_NO_REPORT'] = '1' - env['MOZ_CRASHREPORTER'] = '1' - else: - env['MOZ_CRASHREPORTER_DISABLE'] = '1' + env['MOZ_CRASHREPORTER_DISABLE'] = '1' # Crash on non-local network connections by default. # MOZ_DISABLE_NONLOCAL_CONNECTIONS can be set to "0" to temporarily @@ -215,36 +211,9 @@ class RemoteAutomation(Automation): if javaException: return True - # If crash reporting is disabled (MOZ_CRASHREPORTER!=1), we can't say - # anything. - if not self.CRASHREPORTER: - return False - - try: - dumpDir = tempfile.mkdtemp() - remoteCrashDir = posixpath.join(self._remoteProfile, 'minidumps') - if not self._devicemanager.dirExists(remoteCrashDir): - # If crash reporting is enabled (MOZ_CRASHREPORTER=1), the - # minidumps directory is automatically created when Fennec - # (first) starts, so its lack of presence is a hint that - # something went wrong. - print "Automation Error: No crash directory (%s) found on remote device" % remoteCrashDir - # Whilst no crash was found, the run should still display as a failure - return True - self._devicemanager.getDirectory(remoteCrashDir, dumpDir) + # No crash reporting means we can't say anything. + return False - logger = get_default_logger() - if logger is not None: - crashed = mozcrash.log_crashes(logger, dumpDir, symbolsPath, test=self.lastTestSeen) - else: - crashed = Automation.checkForCrashes(self, dumpDir, symbolsPath) - - finally: - try: - shutil.rmtree(dumpDir) - except: - print "WARNING: unable to remove directory: %s" % dumpDir - return crashed def buildCommandLine(self, app, debuggerInfo, profileDir, testURL, extraArgs): # If remote profile is specified, use that instead diff --git a/build/moz.build b/build/moz.build index 345ba9be0..d96724cad 100644 --- a/build/moz.build +++ b/build/moz.build @@ -26,18 +26,31 @@ for var in ('GRE_MILESTONE', 'MOZ_APP_VERSION', 'MOZ_APP_BASENAME', if CONFIG['MOZ_APP_DISPLAYNAME'] != CONFIG['MOZ_APP_BASENAME']: DEFINES['MOZ_APP_DISPLAYNAME'] = CONFIG['MOZ_APP_DISPLAYNAME'] -if CONFIG['MOZ_BUILD_APP'] == 'browser': +if CONFIG['MOZ_PHOENIX']: + DEFINES['MOZ_PHOENIX'] = CONFIG['MOZ_PHOENIX'] DEFINES['MOZ_BUILD_APP_IS_BROWSER'] = True + +if CONFIG['MC_OFFICIAL']: + DEFINES['MC_OFFICIAL'] = CONFIG['MC_OFFICIAL'] + +if CONFIG['MC_BASILISK']: + DEFINES['MC_BASILISK'] = CONFIG['MC_BASILISK'] + +if CONFIG['MC_PALEMOON']: + DEFINES['MC_PALEMOON'] = CONFIG['MC_PALEMOON'] + +if CONFIG['BINOC_BOREALIS']: + DEFINES['BINOC_BOREALIS'] = CONFIG['BINOC_BOREALIS'] if CONFIG['MOZ_APP_PROFILE']: DEFINES['MOZ_APP_PROFILE'] = CONFIG['MOZ_APP_PROFILE'] -for var in ('MOZ_CRASHREPORTER', 'MOZ_PROFILE_MIGRATOR', +for var in ('MOZ_PROFILE_MIGRATOR', 'MOZ_APP_STATIC_INI'): if CONFIG[var]: DEFINES[var] = True -if CONFIG['MOZ_BUILD_APP'] == 'browser': +if CONFIG['MOZ_PHOENIX']: PYTHON_UNIT_TESTS += [ 'compare-mozconfig/compare-mozconfigs-wrapper.py', ] diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure index 2123bebc9..5f7e9b3ee 100644 --- a/build/moz.configure/init.configure +++ b/build/moz.configure/init.configure @@ -605,10 +605,21 @@ def include_project_configure(project, external_source_dir, build_env, help): if external_source_dir: base_dir = os.path.join(base_dir, external_source_dir[0]) - path = os.path.join(base_dir, project[0], 'moz.configure') - if not exists(path): - die('Cannot find project %s', project[0]) - return path + build_app = project[0] + + # Uncomment when browser becomes application/basilisk + #if build_app == 'browser': + #die('The project "browser" is no longer valid. Perhaps you meant "basilisk" or "palemoon"?') + + path_project_src_dir_application = os.path.join(base_dir, 'application/' + build_app, 'moz.configure') + path_project_src_dir_root = os.path.join(base_dir, build_app, 'moz.configure') + + if exists(path_project_src_dir_application): + return path_project_src_dir_application + elif exists(path_project_src_dir_root): + return path_project_src_dir_root + else: + die('Cannot find project %s', build_app) @depends('--with-external-source-dir') def external_source_dir(value): diff --git a/build/moz.configure/memory.configure b/build/moz.configure/memory.configure index 3beed2fb2..398413b62 100644 --- a/build/moz.configure/memory.configure +++ b/build/moz.configure/memory.configure @@ -5,12 +5,13 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. -option(env='MOZ_JEMALLOC4', help='Enable jemalloc 4') -imply_option('--enable-jemalloc', depends_if('MOZ_JEMALLOC4')(lambda x: '4')) +@deprecated_option(env='MOZ_JEMALLOC4') +def moz_jemalloc4(value): + die('MOZ_JEMALLOC4 is no longer supported') -option('--enable-jemalloc', nargs='?', choices=('4', 'moz'), env='MOZ_MEMORY', - help='Replace memory allocator with jemalloc') +option('--enable-jemalloc', env='MOZ_MEMORY', + help='Replace system memory allocator with jemalloc') @depends('--enable-jemalloc', target, build_project, c_compiler) def jemalloc(value, target, build_project, c_compiler): @@ -30,36 +31,25 @@ def jemalloc(value, target, build_project, c_compiler): if target.kernel == 'Linux': return True -@depends('--enable-jemalloc') -def jemalloc4(jemalloc): - if len(jemalloc) and jemalloc[0] == '4': - return True - set_config('MOZ_MEMORY', jemalloc) set_define('MOZ_MEMORY', jemalloc) add_old_configure_assignment('MOZ_MEMORY', jemalloc) -set_config('MOZ_JEMALLOC4', jemalloc4) -set_define('MOZ_JEMALLOC4', jemalloc4) -add_old_configure_assignment('MOZ_JEMALLOC4', jemalloc4) - # Because --enable-jemalloc doesn't use a default because of the dependency # on the target, we can't use a js_option for it to propagate to js/src # through the old-configure. -@depends(jemalloc, jemalloc4) -def jemalloc_for_old_configure(jemalloc, jemalloc4): - if jemalloc: - return '--enable-jemalloc=4' if jemalloc4 else '--enable-jemalloc' - return '--disable-jemalloc' +@depends(jemalloc) +def jemalloc_for_old_configure(jemalloc): + return '--%s-jemalloc' % ('enable' if jemalloc else 'disable') add_old_configure_arg(jemalloc_for_old_configure) -@depends(jemalloc, jemalloc4, target) -def jemalloc_os_define(jemalloc, jemalloc4, target): - if jemalloc and not jemalloc4: +@depends(jemalloc, target) +def jemalloc_os_define(jemalloc, target): + if jemalloc: if target.kernel == 'WINNT': return 'MOZ_MEMORY_WINDOWS' if target.kernel == 'Linux': @@ -72,9 +62,9 @@ def jemalloc_os_define(jemalloc, jemalloc4, target): set_define(jemalloc_os_define, '1') -@depends(jemalloc, jemalloc4, target) -def jemalloc_os_define_android(jemalloc, jemalloc4, target): - if jemalloc and not jemalloc4 and target.os == 'Android': +@depends(jemalloc, target) +def jemalloc_os_define_android(jemalloc, target): + if jemalloc and target.os == 'Android': return 'MOZ_MEMORY_ANDROID' set_define(jemalloc_os_define_android, '1') diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configure index b32c3f7b7..9f29e68c9 100644 --- a/build/moz.configure/old.configure +++ b/build/moz.configure/old.configure @@ -169,9 +169,13 @@ def old_configure_options(*options): '--enable-crashreporter', '--enable-dbus', '--enable-debug-js-modules', + '--enable-jetpack', + '--enable-devtools-server', + '--enable-devtools', '--enable-directshow', '--enable-dtrace', '--enable-dump-painting', + '--enable-eme', '--enable-elf-hack', '--enable-extensions', '--enable-faststripe', @@ -201,6 +205,7 @@ def old_configure_options(*options): '--enable-nfc', '--enable-nspr-build', '--enable-official-branding', + '--enable-official-vendor', '--enable-omx-plugin', '--enable-oom-breakpoint', '--enable-optimize', @@ -209,12 +214,12 @@ def old_configure_options(*options): '--enable-png-arm-neon-support', '--enable-posix-nspr-emulation', '--enable-pref-extensions', + '--enable-private-build', '--enable-pulseaudio', '--enable-raw', '--enable-readline', '--enable-reflow-perf', '--enable-release', - '--enable-require-all-d3dc-versions', '--enable-safe-browsing', '--enable-sandbox', '--enable-signmar', @@ -230,6 +235,7 @@ def old_configure_options(*options): '--enable-system-pixman', '--enable-system-sqlite', '--enable-tasktracer', + '--enable-tests', '--enable-thread-sanitizer', '--enable-trace-logging', '--enable-ui-locale', @@ -301,6 +307,9 @@ def old_configure_options(*options): '--enable-mapi', '--enable-calendar', '--enable-incomplete-external-linkage', + + # Below are configure flags used by Basilisk + '--disable-webextensions', ) @imports(_from='__builtin__', _import='compile') @imports(_from='__builtin__', _import='open') diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.configure deleted file mode 100644 index 261768f64..000000000 --- a/build/moz.configure/rust.configure +++ /dev/null @@ -1,166 +0,0 @@ -# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- -# vim: set filetype=python: -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - -option('--enable-rust', help='Include Rust language sources') - -@depends('--enable-rust') -def rust_compiler_names(value): - if value: - return ['rustc'] - -@depends('--enable-rust') -def cargo_binary_names(value): - if value: - return ['cargo'] - -rustc = check_prog('RUSTC', rust_compiler_names, allow_missing=True) -cargo = check_prog('CARGO', cargo_binary_names, allow_missing=True) - -@depends_if(rustc) -@checking('rustc version', lambda info: info.version) -def rustc_info(rustc): - out = check_cmd_output(rustc, '--version', '--verbose').splitlines() - info = dict((s.strip() for s in line.split(':', 1)) for line in out[1:]) - return namespace( - version=Version(info.get('release', '0')), - commit=info.get('commit-hash', 'unknown'), - ) - -@depends_if(cargo) -@checking('cargo support for --frozen') -@imports('subprocess') -@imports('os') -def cargo_supports_frozen(cargo): - try: - lines = subprocess.check_output( - [cargo, 'help', 'build'] - ).splitlines() - supported = any(' --frozen' in l for l in lines) - if 'MOZ_AUTOMATION' in os.environ and not supported: - die('cargo in automation must support --frozen') - return supported - except subprocess.CalledProcessError as e: - die('Failed to call cargo: %s', e.message) - -set_config('MOZ_CARGO_SUPPORTS_FROZEN', cargo_supports_frozen) - -@depends('--enable-rust', rustc, rustc_info) -@imports(_from='textwrap', _import='dedent') -def rust_compiler(value, rustc, rustc_info): - if value: - if not rustc: - die(dedent('''\ - Rust compiler not found. - To compile rust language sources, you must have 'rustc' in your path. - See https//www.rust-lang.org/ for more information. - ''')) - version = rustc_info.version - min_version = Version('1.10') - if version < min_version: - die(dedent('''\ - Rust compiler {} is too old. - To compile Rust language sources please install at least - version {} of the 'rustc' toolchain and make sure it is - first in your path. - You can verify this by typing 'rustc --version'. - '''.format(version, min_version))) - return True - -set_config('MOZ_RUST', rust_compiler) - -@depends(rust_compiler, rustc, target, cross_compiling) -@imports('os') -@imports('subprocess') -@imports(_from='mozbuild.configure.util', _import='LineIO') -@imports(_from='mozbuild.shellutil', _import='quote') -@imports(_from='tempfile', _import='mkstemp') -def rust_target(rust_compiler, rustc, target, cross_compiling): - if rust_compiler: - # Rust's --target options are similar to, but not exactly the same - # as, the autoconf-derived targets we use. An example would be that - # Rust uses distinct target triples for targetting the GNU C++ ABI - # and the MSVC C++ ABI on Win32, whereas autoconf has a single - # triple and relies on the user to ensure that everything is - # compiled for the appropriate ABI. We need to perform appropriate - # munging to get the correct option to rustc. - # - # The canonical list of targets supported can be derived from: - # - # https://github.com/rust-lang/rust/tree/master/mk/cfg - - # Avoid having to write out os+kernel for all the platforms where - # they don't differ. - os_or_kernel = target.kernel if target.kernel == 'Linux' and target.os != 'Android' else target.os - rustc_target = { - # DragonFly - ('x86_64', 'DragonFly'): 'x86_64-unknown-dragonfly', - # FreeBSD - ('x86', 'FreeBSD'): 'i686-unknown-freebsd', - ('x86_64', 'FreeBSD'): 'x86_64-unknown-freebsd', - # NetBSD - ('x86_64', 'NetBSD'): 'x86_64-unknown-netbsd', - # OpenBSD - ('x86_64', 'OpenBSD'): 'x86_64-unknown-openbsd', - # Linux - ('x86', 'Linux'): 'i586-unknown-linux-gnu', - # Linux - ('x86_64', 'Linux'): 'x86_64-unknown-linux-gnu', - # OS X and iOS - ('x86', 'OSX'): 'i686-apple-darwin', - ('x86', 'iOS'): 'i386-apple-ios', - ('x86_64', 'OSX'): 'x86_64-apple-darwin', - # Android - ('x86', 'Android'): 'i686-linux-android', - ('arm', 'Android'): 'armv7-linux-androideabi', - # Windows - # XXX better detection of CXX needed here, to figure out whether - # we need i686-pc-windows-gnu instead, since mingw32 builds work. - ('x86', 'WINNT'): 'i686-pc-windows-msvc', - ('x86_64', 'WINNT'): 'x86_64-pc-windows-msvc', - }.get((target.cpu, os_or_kernel), None) - - if rustc_target is None: - die("Don't know how to translate {} for rustc".format(target.alias)) - - # Check to see whether our rustc has a reasonably functional stdlib - # for our chosen target. - target_arg = '--target=' + rustc_target - in_fd, in_path = mkstemp(prefix='conftest', suffix='.rs') - out_fd, out_path = mkstemp(prefix='conftest', suffix='.rlib') - os.close(out_fd) - try: - source = 'pub extern fn hello() { println!("Hello world"); }' - log.debug('Creating `%s` with content:', in_path) - with LineIO(lambda l: log.debug('| %s', l)) as out: - out.write(source) - - os.write(in_fd, source) - os.close(in_fd) - - cmd = [ - rustc, - '--crate-type', 'staticlib', - target_arg, - '-o', out_path, - in_path, - ] - def failed(): - die('Cannot compile for {} with {}'.format(target.alias, rustc)) - check_cmd_output(*cmd, onerror=failed) - if not os.path.exists(out_path) or os.path.getsize(out_path) == 0: - failed() - finally: - os.remove(in_path) - os.remove(out_path) - # This target is usable. - return rustc_target - -set_config('RUST_TARGET', rust_target) - -# Until we remove all the other Rust checks in old-configure. -add_old_configure_assignment('MOZ_RUST', rust_compiler) -add_old_configure_assignment('RUSTC', rustc) -add_old_configure_assignment('RUST_TARGET', rust_target) diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure index 8b2416152..7aa94f9e1 100644 --- a/build/moz.configure/toolchain.configure +++ b/build/moz.configure/toolchain.configure @@ -686,9 +686,9 @@ def compiler(language, host_or_target, c_compiler=None, other_compiler=None, # Check the compiler version here instead of in `compiler_version` so # that the `checking` message doesn't pretend the compiler can be used # to then bail out one line later. - if info.type == 'gcc' and info.version < '4.8.0': + if info.type == 'gcc' and info.version < '4.9.0': raise FatalCheckError( - 'Only GCC 4.8 or newer is supported (found version %s).' + 'Only GCC 4.9 or newer is supported (found version %s).' % info.version) # If you want to bump the version check here search for @@ -907,4 +907,3 @@ set_config('WRAP_SYSTEM_INCLUDES', wrap_system_includes) set_config('VISIBILITY_FLAGS', visibility_flags) include('windows.configure') -include('rust.configure') diff --git a/build/mozconfig.rust b/build/mozconfig.rust deleted file mode 100644 index 65177a6bd..000000000 --- a/build/mozconfig.rust +++ /dev/null @@ -1,10 +0,0 @@ -# Options to enable rust in automation builds. - -# Tell configure to use the tooltool rustc. -# Assume this is compiled with --enable-rpath so we don't -# have to set LD_LIBRARY_PATH. -RUSTC="$topsrcdir/rustc/bin/rustc" -CARGO="$topsrcdir/cargo/bin/cargo" - -# Enable rust in the build. -ac_add_options --enable-rust diff --git a/build/pgo/profileserver.py b/build/pgo/profileserver.py index 3e5a870c3..adc93d9b1 100644 --- a/build/pgo/profileserver.py +++ b/build/pgo/profileserver.py @@ -53,7 +53,6 @@ if __name__ == '__main__': locations=locations) env = os.environ.copy() - env["MOZ_CRASHREPORTER_NO_REPORT"] = "1" env["XPCOM_DEBUG_BREAK"] = "warn" # For VC12+, make sure we can find the right bitness of pgort1x0.dll diff --git a/build/templates.mozbuild b/build/templates.mozbuild index 85b700c2a..196acd34b 100644 --- a/build/templates.mozbuild +++ b/build/templates.mozbuild @@ -61,14 +61,6 @@ def Library(name): @template -def RustLibrary(name): - '''Template for Rust libraries.''' - Library(name) - - IS_RUST_LIBRARY = True - - -@template def SharedLibrary(name): '''Template for shared libraries.''' Library(name) diff --git a/build/valgrind/mach_commands.py b/build/valgrind/mach_commands.py index ba2575247..8109f0784 100644 --- a/build/valgrind/mach_commands.py +++ b/build/valgrind/mach_commands.py @@ -90,7 +90,6 @@ class MachCommands(MachCommandBase): env = os.environ.copy() env['G_SLICE'] = 'always-malloc' env['MOZ_CC_RUN_DURING_SHUTDOWN'] = '1' - env['MOZ_CRASHREPORTER_NO_REPORT'] = '1' env['XPCOM_DEBUG_BREAK'] = 'warn' env.update(self.extra_environment_variables) diff --git a/build/valgrind/x86_64-redhat-linux-gnu.sup b/build/valgrind/x86_64-redhat-linux-gnu.sup index d253a3a4e..28656e418 100644 --- a/build/valgrind/x86_64-redhat-linux-gnu.sup +++ b/build/valgrind/x86_64-redhat-linux-gnu.sup @@ -105,7 +105,6 @@ fun:g_object_newv fun:g_object_new_valist fun:g_object_new - fun:_ZN13nsLookAndFeel4InitEv ... } # set_color() in gtkstyle.c of GTK version 3.4.4 only can leak GdkRGBA |