diff options
author | Matt A. Tobin <email@mattatobin.com> | 2021-10-30 22:19:44 -0400 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2021-10-30 22:19:44 -0400 |
commit | d6c88f9dd700c07eaf884abac959ef46dccdd658 (patch) | |
tree | 8072ffa386b61d13be643644ae9d5c48636a8dd5 | |
parent | 824870f81dc777722d250bfe8c96650763cba32f (diff) | |
download | aura-central-d6c88f9dd700c07eaf884abac959ef46dccdd658.tar.gz |
Issue %3031 - General clean up
-rw-r--r-- | build/docs/cppeclipse.rst | 54 | ||||
-rw-r--r-- | build/docs/index.rst | 8 | ||||
-rw-r--r-- | build/docs/supported-configurations.rst | 29 | ||||
-rw-r--r-- | build/docs/visualstudio.rst | 100 | ||||
-rwxr-xr-x | gradlew | 160 | ||||
-rw-r--r-- | python/mozbuild/mozbuild/backend/__init__.py | 5 | ||||
-rw-r--r-- | python/mozbuild/mozbuild/backend/base.py | 55 | ||||
-rw-r--r-- | toolkit/mozapps/installer/packager.mk | 6 |
8 files changed, 4 insertions, 413 deletions
diff --git a/build/docs/cppeclipse.rst b/build/docs/cppeclipse.rst deleted file mode 100644 index 3596a2f9a..000000000 --- a/build/docs/cppeclipse.rst +++ /dev/null @@ -1,54 +0,0 @@ -.. _build_cppeclipse: - -===================== -Cpp Eclipse Projects -===================== - -For additional information on using Eclipse CDT see -`the MDN page -<https://developer.mozilla.org/en-US/docs/Eclipse_CDT>`_. - -The build system contains alpha support for generating C++ Eclipse -project files to aid with development. - -Please report bugs to bugzilla and make them depend on bug 973770. - -To generate a C++ Eclipse project files, you'll need to have a fully -built tree:: - - mach build - -Then, simply generate the Eclipse build backend:: - - mach build-backend -b CppEclipse - -If all goes well, the path to the generated workspace should be -printed. - -To use the generated Eclipse project files, you'll need to -have a Eclipse CDT 8.3 (We plan to follow the latest Eclipse release) -`Eclipse CDT plugin -<https://www.eclipse.org/cdt/>`_ -installed. You can then import all the projects into Eclipse using -*File > Import ... > General > Existing Projects into Workspace* --only- if you have not ran the background indexer. - -Updating Project Files -====================== - -As you pull and update the source tree, your C++ Eclipse files may -fall out of sync with the build configuration. The tree should still -build fine from within Eclipse, but source files may be missing and in -rare circumstances Eclipse's index may not have the proper build -configuration. - -To account for this, you'll want to periodically regenerate the -Eclipse project files. You can do this by running ``mach build -&& mach build-backend -b CppEclipse`` from the -command line. - -Currently, regeneration rewrites the original project files. **If -you've made any customizations to the projects, they will likely get -overwritten.** We would like to improve this user experience in the -future. - diff --git a/build/docs/index.rst b/build/docs/index.rst index 75000aff3..fa1434b85 100644 --- a/build/docs/index.rst +++ b/build/docs/index.rst @@ -28,14 +28,6 @@ Important Concepts locales rust -integrated development environment (IDE) -======================================== -.. toctree:: - :maxdepth: 1 - - cppeclipse - visualstudio - mozbuild ======== diff --git a/build/docs/supported-configurations.rst b/build/docs/supported-configurations.rst index cc2c1ea72..7645b2e66 100644 --- a/build/docs/supported-configurations.rst +++ b/build/docs/supported-configurations.rst @@ -9,8 +9,8 @@ This page attempts to document supported build configurations. Windows ======= -We support building on Windows XP and newer operating systems using -Visual Studio 2010 and newer. +We support building on Windows 7 and newer operating systems using +Visual Studio 2015. The following are not fully supported by Mozilla (but may work): @@ -18,29 +18,6 @@ The following are not fully supported by Mozilla (but may work): environment * Building with Mingw or any other non-Visual Studio toolchain. -OS X -==== - -We support building on OS X 10.6 and newer with the OS X 10.6 SDK. - -The tree should build with the following OS X releases and SDK versions: - -* 10.6 Snow Leopard -* 10.7 Lion -* 10.8 Mountain Lion -* 10.9 Mavericks - -The tree requires building with Clang 3.3 and newer. This corresponds to -version of 4.2 of Apple's Clang that ships with Xcode. This corresponds -to Xcode 4.6 and newer. Xcode 4.6 only runs on OS X 10.7.4 and newer. -So, OS X 10.6 users will need to install a non-Apple toolchain. Running -``mach bootstrap`` should install an appropriate toolchain from Homebrew -or MacPorts automatically. - -The tree should build with GCC 4.4 and newer on OS X. However, this -build configuration isn't as widely used (and differs from what Mozilla -uses to produce OS X builds), so it's recommended to stick with Clang. - Linux ===== @@ -51,5 +28,3 @@ dependencies are in place. Running ``mach bootstrap`` should install packages for popular Linux distributions. ``configure`` will typically detect missing dependencies and inform you how to disable features to work around unsatisfied dependencies. - -Clang 3.3 or GCC 4.4 is required to build the tree. diff --git a/build/docs/visualstudio.rst b/build/docs/visualstudio.rst deleted file mode 100644 index 3fbf28e94..000000000 --- a/build/docs/visualstudio.rst +++ /dev/null @@ -1,100 +0,0 @@ -.. _build_visualstudio: - -====================== -Visual Studio Projects -====================== - -The build system contains alpha support for generating Visual Studio -project files to aid with development. - -To generate Visual Studio project files, you'll need to have a configured tree:: - - mach configure - -(If you have built recently, your tree is already configured.) - -Then, simply generate the Visual Studio build backend:: - - mach build-backend -b VisualStudio - -If all goes well, the path to the generated Solution (``.sln``) file should be -printed. You should be able to open that solution with Visual Studio 2010 or -newer. - -Currently, output is hard-coded to the Visual Studio 2010 format. If you open -the solution in a newer Visual Studio release, you will be prompted to upgrade -projects. Simply click through the wizard to do that. - -Structure of Solution -===================== - -The Visual Studio solution consists of hundreds of projects spanning thousands -of files. To help with organization, the solution is divided into the following -trees/folders: - -Build Targets - This folder contains common build targets. The *full* project is used to - perform a full build. The *binaries* project is used to build just binaries. - The *visual-studio* project can be built to regenerate the Visual Studio - project files. - - Performing the *clean* action on any of these targets will clean the - *entire* build output. - -Binaries - This folder contains common binaries that can be executed from within - Visual Studio. If you are building the Firefox desktop application, - the *firefox* project will launch firefox.exe. You probably want one of - these set to your startup project. - -Libraries - This folder contains entries for each static library that is produced as - part of the build. These roughly correspond to each directory in the tree - containing C/C++. e.g. code from ``dom/base`` will be contained in the - ``dom_base`` project. - - These projects don't do anything when built. If you build a project here, - the *binaries* build target project is built. - -Updating Project Files -====================== - -As you pull and update the source tree, your Visual Studio files may fall out -of sync with the build configuration. The tree should still build fine from -within Visual Studio. But source files may be missing and IntelliSense may not -have the proper build configuration. - -To account for this, you'll want to periodically regenerate the Visual Studio -project files. You can do this within Visual Studio by building the -``Build Targets :: visual-studio`` project or by running -``mach build-backend -b VisualStudio`` from the command line. - -Currently, regeneration rewrites the original project files. **If you've made -any customizations to the solution or projects, they will likely get -overwritten.** We would like to improve this user experience in the -future. - -Moving Project Files Around -=========================== - -The produced Visual Studio solution and project files should be portable. -If you want to move them to a non-default directory, they should continue -to work from wherever they are. If they don't, please file a bug. - -Invoking mach through Visual Studio -=================================== - -It's possible to build the tree via Visual Studio. There is some light magic -involved here. - -Alongside the Visual Studio project files is a batch script named ``mach.bat``. -This batch script sets the environment variables present in your *MozillaBuild* -development environment at the time of Visual Studio project generation -and invokes *mach* inside an msys shell with the arguments specified to the -batch script. This script essentially allows you to invoke mach commands -inside the MozillaBuild environment without having to load MozillaBuild. - -While projects currently only utilize the ``mach build`` command, the batch -script does not limit it's use: any mach command can be invoked. Developers -may abuse this fact to add custom projects and commands that invoke other -mach commands. diff --git a/gradlew b/gradlew deleted file mode 100755 index 97fac783e..000000000 --- a/gradlew +++ /dev/null @@ -1,160 +0,0 @@ -#!/usr/bin/env bash - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; -esac - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- -APP_HOME="`pwd -P`" -cd "$SAVED" >&- - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/python/mozbuild/mozbuild/backend/__init__.py b/python/mozbuild/mozbuild/backend/__init__.py index b280c7f97..fede9cf9c 100644 --- a/python/mozbuild/mozbuild/backend/__init__.py +++ b/python/mozbuild/mozbuild/backend/__init__.py @@ -9,11 +9,6 @@ backends = { def get_backend_class(name): - if '+' in name: - from mozbuild.backend.base import HybridBackend - return HybridBackend(*(get_backend_class(name) - for name in name.split('+'))) - class_name = '%sBackend' % name module = __import__(backends[name], globals(), locals(), [class_name]) return getattr(module, class_name) diff --git a/python/mozbuild/mozbuild/backend/base.py b/python/mozbuild/mozbuild/backend/base.py index f5e0c2d3c..c46a3b139 100644 --- a/python/mozbuild/mozbuild/backend/base.py +++ b/python/mozbuild/mozbuild/backend/base.py @@ -125,13 +125,11 @@ class BuildBackend(LoggingMixin): for obj in objs: obj_start = time.time() - if (not self.consume_object(obj) and - not isinstance(self, PartialBackend)): + if (not self.consume_object(obj)): raise Exception('Unhandled object of type %s' % type(obj)) self._execution_time += time.time() - obj_start - if (isinstance(obj, ContextDerived) and - not isinstance(self, PartialBackend)): + if (isinstance(obj, ContextDerived)): self.backend_input_files |= obj.context_all_paths # Pull in all loaded Python as dependencies so any Python changes that @@ -266,52 +264,3 @@ class BuildBackend(LoggingMixin): with self._write_file(obj.output_path) as fh: pp.out = fh yield pp - - -class PartialBackend(BuildBackend): - """A PartialBackend is a BuildBackend declaring that its consume_object - method may not handle all build configuration objects it's passed, and - that it's fine.""" - - -def HybridBackend(*backends): - """A HybridBackend is the combination of one or more PartialBackends - with a non-partial BuildBackend. - - Build configuration objects are passed to each backend, stopping at the - first of them that declares having handled them. - """ - assert len(backends) >= 2 - assert all(issubclass(b, PartialBackend) for b in backends[:-1]) - assert not(issubclass(backends[-1], PartialBackend)) - assert all(issubclass(b, BuildBackend) for b in backends) - - class TheHybridBackend(BuildBackend): - def __init__(self, environment): - self._backends = [b(environment) for b in backends] - super(TheHybridBackend, self).__init__(environment) - - def consume_object(self, obj): - return any(b.consume_object(obj) for b in self._backends) - - def consume_finished(self): - for backend in self._backends: - backend.consume_finished() - - for attr in ('_execution_time', '_created_count', '_updated_count', - '_unchanged_count', '_deleted_count'): - setattr(self, attr, - sum(getattr(b, attr) for b in self._backends)) - - for b in self._backends: - self.file_diffs.update(b.file_diffs) - for attr in ('backend_input_files', '_backend_output_files'): - files = getattr(self, attr) - files |= getattr(b, attr) - - name = '+'.join(itertools.chain( - (b.__name__.replace('Backend', '') for b in backends[:1]), - (b.__name__ for b in backends[-1:]) - )) - - return type(str(name), (TheHybridBackend,), {}) diff --git a/toolkit/mozapps/installer/packager.mk b/toolkit/mozapps/installer/packager.mk index b09c91471..99bb0de91 100644 --- a/toolkit/mozapps/installer/packager.mk +++ b/toolkit/mozapps/installer/packager.mk @@ -62,12 +62,6 @@ ifdef MOZ_PACKAGE_JSSHELL $(RM) $(PKG_JSSHELL) $(MAKE_JSSHELL) endif # MOZ_PACKAGE_JSSHELL -ifdef MOZ_ARTIFACT_BUILD_SYMBOLS - @echo 'Packaging existing crashreporter symbols from artifact build...' - $(NSINSTALL) -D $(DIST)/$(PKG_PATH) - cd $(DIST)/crashreporter-symbols && \ - zip -r5D '../$(PKG_PATH)$(SYMBOL_ARCHIVE_BASENAME).zip' . -i '*.sym' -i '*.txt' -endif # MOZ_ARTIFACT_BUILD_SYMBOLS ifeq (Darwin, $(OS_ARCH)) ifdef MOZ_ASAN @echo "Rewriting ASan runtime dylib paths for all binaries in $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH) ..." |