Commit Graph

1500 Commits

Author SHA1 Message Date
Ehsan Akhgari
90545a7bf0 Bug 904572 - Add support for generating clang compilation database; r=glandium,r=gps 2015-09-29 09:23:50 +09:00
Mike Hommey
80df6c3cee Bug 1207897 - Add a configure option to build multiple build backends. r=gps
Also record what backends were requested at configure time so that running
`mach build-backend` or `config.status` uses the same set.
2015-09-29 09:23:50 +09:00
Mike Hommey
8742f025c6 Bug 1207893 - Allow to create multiple build backends at once. r=gps
When running mach `build-backend` or `config.status`, it is now possible to
pass multiple backends to the --backend/-b option, so that they can share
moz.build reading and object emitting.

The command line syntax is however maybe a little awkward:
  mach build-backend -b Backend1 Backend2

but supporting with `-b Backend1 -b Backend2` requires more argument parser
twiddling (action='append' doesn't work out of the box with choices, we'd
need a custom action class)
2015-09-29 09:23:49 +09:00
Mike Hommey
c733beefe8 Bug 1207893 - Change how we track object consumption from the build backend. r=gps
Currently, we set a flag on each object to know whether it has been consumed
by the backend. This doesn't work nicely when multiple backends try to consume
the same objects.
2015-09-29 09:23:48 +09:00
Mike Hommey
80c68f6fa4 Bug 1207893 - Refactor how build backend execution is summarized. r=gps
- Make all backends report the time spent in their own execution
- Change how the data is collected for the reader and emitter such that
  each of them is aware of its own data, instead of everything being
  tracked by the backend.

This is meant to open the door to multiple backends running from the
same execution of config.status.
2015-09-29 09:23:47 +09:00
Mike Hommey
51d10b799b Bug 1207882 - Add an initial partial implementation of a new, faster, build backend. r=gps 2015-09-29 09:23:46 +09:00
Mike Hommey
70b47faa8c Bug 1207882 - Associate an install target with every ContextDerived object. r=gps
Since reading context['FINAL_TARGET'] can have side effects, use it lazily.
2015-09-29 09:23:45 +09:00
Mike Hommey
9ec11eb950 Bug 1207882 - Ensure chrome manifests are created in a directory that exists when processing jar manifests. r=gps
This currently works because other things in the build system are creating
those directories, but it's not a safe thing to rely on.
2015-09-29 09:23:45 +09:00
Chris Manchester
cec6044d39 Bug 1184405 - Take matches by wildcard pattern into account in the test resolver. r=gps 2015-09-25 07:33:11 -07:00
Chris Manchester
85a94b0b9f Bug 1184405 - Add a mach command to expose test-deps file info. r=gps
This commit exposes test-deps file info as a mach command, and
modifies the test scheme reader to make it filter out unsuitable
contexts when generating TestManifest objects for metadata context.
2015-09-25 07:33:11 -07:00
Chris Manchester
36859d65a6 Bug 1184405 - Add annotations for tags, file patterns, and test flavors to moz.build to specify tests potentially impacted by source files. r=gps 2015-09-25 07:33:11 -07:00
Chris Manchester
d37739ca74 Bug 1184405 - Add a container type to mozbuild with a namedtuple-like interface and typed, mutable fields. r=gps 2015-09-25 07:33:11 -07:00
Nick Alexander
b248a49af7 Bug 1194365 - Bump Andoid NDK to r10e; manually install Android SDK and NDK on Mac OS X. r=mcomella
This bumps the NDK version to r10e.

Previously, we used brew to install android-sdk and a custom version
of android-ndk.  That makes it hard to control the installed versions.
This installs from downloaded archives, which unifies the Mac OS X
approach with the straight-forward Linux approach.
2015-09-22 13:56:17 -07:00
Nick Alexander
b4cf889bb0 Bug 1171232 - Depend on platform-tools-preview; don't check for missing and failing Android packages. r=mcomella
The 'tools' package depends on 'platform-tools-preview' now.  Roll
with it until Google breaks us back again.

The behaviour of the |android| tool has changed; recent versions don't
reveal what packages are installed.  That means we can't skip already
installed packages; and we can't really tell if our installation
attempts succeeded.  But we have faith!
2015-09-22 13:54:17 -07:00
Nick Alexander
f85972a10e Bug 1204260 - Post: remove platforms/android-* from |mach bootstrap|. r=glandium 2015-09-22 11:40:06 -07:00
Nick Alexander
f99a3d2d54 Bug 1108782 - Part 2: Explode AAR files at configure time. r=glandium
This gets us a limited version of AAR support: we can consume static
AAR libraries, where here static does not refer to linking, but to
static assets that are fixed at build-backend time and not modified
(or produced) during the build.  This lets us pin our dependencies
(and move to Google's versioned Maven repository packages, away from
Google's unversioned ad-hoc packages).

By restricting to static AAR libraries, we avoid having to handle
truly complicated dependency trees, as changing parts of generated AAR
files require delicate rebuilding of the APKs (and internal libraries)
that depend on the AAR files.

It is possible that we will generate AARs in the tree at some time.
Right now, we don't do that, even for GeckoView: the AARs produced are
assembled as artifacts at package time and are intended for external
consumption.  We might want this for GeckoView and Fennec at some
time; we should consider using Gradle everywhere at that point.

The patch itself does the simplest possible thing (which has precedent
from Gradle and other build systems): it simply "explodes" the AAR
into the object directory and uses existing mechanisms to refer to the
exploded pieces.

AARs have both required and optional components.  Each component is
defined with an expected and required flag. If a component is expected
and not present, or not expected and is present, an error is raised.
If the component is expected and present, autoconf's ifelse() macro is
used to define the relevant AAR_* component variables.  If the
component is not expected and not present, no action is taken.  A
consuming build backend therefore can guard all AAR_* component
variables with just the top-level AAR variable.

Many AAR files have empty assets/ directories.  This patch doesn't
explode empty assets/ directories, protecting against trivial changes
to AAR files that don't impact the build.

There's a lot not to like in this approach, including:

* We need to manually reference internal AAR libs;
* I haven't separated the pinned version numbers out of configure.in.

However, it's closer to what we want than what we have!
2015-09-22 10:04:26 -07:00
J. Ryan Stinnett
79ff031964 Bug 912121 - Update misc. DevTools paths and comments. rs=devtools 2015-09-21 12:07:31 -05:00
Xidorn Quan
25f57514bc Bug 1205144 - Remove 'REMOVED' commands from output of mach-commands and mach-debug-commands. r=gps DONTBUILD 2015-09-21 11:32:03 +10:00
Mike Hommey
1d0357d014 Bug 1204719 - Don't create interfaces.manifest files from the build backend. r=gps 2015-09-16 17:21:27 +09:00
Mike Hommey
63b1aa45bd Bug 1204712 - Handle wildcards properly for localized content in jar manifests. r=gps 2015-09-16 17:21:12 +09:00
Ted Mielczarek
8c3d278dad bug 935237 - use libdmg-hfsplus to create DMG files during packaging on Linux. r=gps 2015-08-21 15:33:03 -04:00
Ted Mielczarek
12f29fb1e1 bug 1198226 - Add HOST_{C,CXX}FLAGS recursive make varible blacklist. r=mshal 2015-08-25 09:17:30 -04:00
Ted Mielczarek
666675babf bug 1198226 - Add HOST_{CFLAGS,CXXFLAGS,DEFINES} support to mozbuild frontend+recursive make backend. r=mshal 2015-09-04 13:33:04 -04:00
Peter Moore
a0f898fc22 Bug 1194767 - use slugid 1.0.6 in ./mach taskcluster-graph command. r=wcosta
This included adding the slugid 1.0.6 python source code in /python since slugid
is now a dependency of the ./mach taskcluster-graph command, as well us updating
references that used it. Previously the implementation was in-tree.
2015-09-04 17:59:34 +02:00
Gregory Szorc
6155e3a3bf Bug 1174037 - Support installing Mercurial from pip; r=glandium
Previously, we used a PPA on Ubuntu to install Mercurial. The PPA has
proved to be unreliable. Furthermore, we didn't have a mechanism for
installing a modern Mercurial on Debian and other derived distros.

In this commit, we remove the PPA from Ubuntu. We add the ability to
install Mercurial from pip to the Debian bootstrapper. However, since
some people may not want <not apt> installing package-like things,
we add a prompt explaining the situation and giving users a choice.
We recommend installing a modern Mercurial via pip. But we also given
the option to install a likely legacy version via apt. And, for Git
users, we give the option to not install Mercurial at all.

Since the new version of the Ubuntu bootstrapper is empty, it doesn't
need to exist, so it has been removed.

DONTBUILD (NPOTB)
2015-09-04 10:37:29 -07:00
Nick Alexander
595c486984 Bug 1137898 - Migrate to android:versionCode scheme v1. r=rnewman,snorp
Android version codes serve multiple masters.  They indicate newer
versions, yes; but they also break ties between versions with
different features and requirements. High order bits effectively
partition the space of versions and are valuable.  Since Android
version codes are signed Java integers, we have 31 bits to work with.
Mozilla's traditional build ID is YYYYMMDDhhmmss.  This was chopped to
ten characters (YYYYMMDDhh, i.e., hourly build IDs) and then converted
to a decimal.  This took many high order bits.  We will lose another
high order bit in the 36th month of 2015 -- i.e., as soon as the year
rolls over to 2016.  If we waited to lose the next higher order bit,
we'd lose that one in the 46th month of 2017 -- i.e., as soon as the
year rolls over to 2018.

The following patch sacrifices a high order bit to change the version
scheme, winning us roughly 15 years of hourly build IDs before we are
forced to lose another high order bit.  So it's clearly to our
advantage to change the scheme sooner rather than later -- we will
sacrifice 1 bit for 15 years of build IDs, rather than keeping the
current scheme and sacrificing (say) 2 bits for 3 years of build IDs.

The resulting scheme produces build IDs that look like (in binary):

0111 1000 0010 tttt tttt tttt tttt txpg

The meaning of these build IDs is documented in the Python source code
that generates them.
2015-08-26 18:34:48 -07:00
Geoff Brown
8b60b03872 Bug 1164596 - Add mach android-emulator command; r=ahal 2015-09-01 15:07:53 -06:00
Nicholas Nethercote
69d088e45f Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.
2015-08-27 20:44:53 -07:00
Xidorn Quan
da613e7a51 Bug 1188468 - Allow script to force updating a generated file even if the file is actually not changed. r=gps 2015-08-25 10:07:43 +10:00
Birunthan Mohanathas
ab28403e15 Bug 1197527 - Consolidate obtaining hg path into mozversioncontrol.get_hg_path; r=gps
DONTBUILD
2015-08-24 14:37:42 -04:00
Philipp Kewisch
a7a20ee2cb Bug 1167986 - TEST-UNEXPECTED-FAIL | xpcshell-unpack.ini:toolkit/mozapps/extensions/test/xpcshell/test_signed_install.js (and signing failures). r=gps 2015-08-23 11:54:44 +02:00
Wes Kocher
671839131e Merge m-c to inbound, a=merge 2015-08-20 12:51:40 -07:00
Wes Kocher
76933589ec Merge inbound to central, a=merge 2015-08-20 12:42:21 -07:00
Joel Maher
0c66b1092d Bug 1196253 - update in-tree psutil to 3.1.1. r=gps 2015-08-20 08:03:31 -04:00
Wes Kocher
ea542eee34 Merge m-c to fx-team, a=merge CLOSED TREE 2015-08-19 17:13:38 -07:00
Nick Alexander
eeabccdb7e Bug 1195388 - Part 2: Add ANDROID_EXTRA_{PACKAGES,RES_DIRS} moz.build variables. r=gps
This moves a little bit more of mobile/android/base/Makefile.in into
moz.build, and gets closer to moving that aapt invocation into
java-build.mk.

There are no other extra package consumers in the tree.  (There should
be a new one shortly: b2gdroid.)
2015-08-14 18:13:11 -07:00
Nick Alexander
8f3534dd41 Bug 1195388 - Part 1: Make ANDROID_APK_{NAME,PACKAGE} moz.build variables. r=gps
This paves the way for defining additional Android packages in
moz.build, which is a step toward moving the special
mobile/android/base/Makefile.in aapt invocations into the generic
java-build.mk framework.

The new variables are both passthru variables for now: in the future,
we'll roll them into some aggregate Android APK definition.

It's worth noting that references to the variables in Makefile.in
files are only defined after including rules.mk (and thereby
backend.mk).  This only required a few changes in the tree but it
confused me for some time.
2015-08-19 12:34:58 -07:00
Andrew Halberstadt
4ab90a9fb9 Bug 1194415 - Refactor BuildProgressFooter.draw() for minor |mach build| perf improvement, r=gps
Over a 19 minute build, |mach build| was spending ~45s drawing the TIER footer. This brings it down to ~30s.
2015-08-13 14:08:12 -04:00
Niels De Graef
2da80d5c36 Bug 1195182 - Fixed broken AUR link for uuid; r=gps
DONTBUILD (NPOTB)
2015-08-18 09:26:37 -07:00
Aaron Raimist
fd49c03b1e Bug 1171783 - Fix bootstrap.py by using DNF instead of Yum if possible; r=mshal
DONTBUILD (NPOTB)
2015-08-19 12:56:22 -07:00
David Keeler
7640a01369 bug 1190603 - import PyECC library r=gps,gerv
Obtained from https://github.com/amintos/PyECC.git
(commit 1bfd3a41410c3650e57d58f7bd016bb0819af250)
2015-08-03 15:17:00 -07:00
Nathan Froyd
f39bd2711a Bug 1186444 - part 2 - remove MODULE_OPTIMIZE_FLAGS from config.mk; r=mshal 2015-07-22 11:17:49 -04:00
Andrew Halberstadt
c7d9eb66ec Bug 1184696 - Add clobber targets to |mach clobber|; Ability to clobber compiled python files, r=gps
This change adds a 'what' parameter to |mach clobber| which facilitates clobbering other things as well.
E.g, |mach clobber python| now clobbers all .pyc and .pyo files in the tree. Multiple clobber targets can
be specified, e.g |mach clobber objdir python|. By default |mach clobber| without arguments will only
remove the currently active objdir, the same as before.
2015-07-20 14:38:18 -04:00
Ryan VanderMeulen
c94aa4172e Merge fx-team to m-c. a=merge 2015-08-13 11:00:54 -04:00
Nick Alexander
2cb62bed1d Bug 1160563 - Part 2: Make ANDROID_ASSETS_DIRS a moz.build variable. r=gps
We have had singular ANDROID_ASSETS_DIR in Makefile.in for a while.
Fennec itself does not use the existing Makefile.in Android code, for
complicated historical reasons.

This makes the existing variable moz.build-only; generalizes the
existing variable to an ordered list; and adds the equivalent use of
the new list to the Fennec build, with a simple example asset.

This patch also updates the packager to include assets packed into the
gecko.ap_.  Without the packager change, the assets/ directory in the
ap_ gets left out of the final apk.  This whole approach is totally
non-standard but is more or less required to support our single-locale
repack scheme.
2015-08-12 11:04:03 -07:00
Nick Alexander
c2c01b0bb8 Bug 1160563 - Part 1: Make ANDROID_RES_DIRS a moz.build variable. r=gps
This patch does a few things.  First, it adds an AbsolutePath data
type, sibling to SourcePath and ObjDirPath.  (Existing Path consumers
that accept an open set of Path subtypes, and that only use full_path,
should function fine with the new AbsolutePath subtype.)

Second, it moves ANDROID_RES_DIRS to a moz.build list of Paths
(ordered).  We test, but don't use in tree, the new AbsolutePath.
2015-08-12 11:03:44 -07:00
Eric Rahm
ed6cd3b261 Bug 1193914 - Properly check ide type when deciding whether or not to package. r=benwa 2015-08-12 13:59:05 -07:00
Ted Mielczarek
a988d7175d bug 1164816 - Import concurrent.futures into the tree. r=gps 2015-05-12 14:52:06 -04:00
Ted Mielczarek
601251747c bug 1190522 - Rewrite pkg-dmg as a Python script. r=gps 2015-08-03 15:40:04 -04:00
Kyle Huey
b0c9371d90 No bug: Make ./mach clobber work on windows without winrm.exe. r=me 2015-08-11 06:10:46 -07:00