Commit Graph

3657 Commits

Author SHA1 Message Date
Gregory Szorc
5a6879494f Bug 1396582 - Move Python version checking to moz.configure; r=nalexander
The Python version validation in virtualenv.py is only called in 2
locations: `python -m mozbuild.virtualenv` and in moz.configure.

I believe that nobody calls `python -m mozbuild.virtualenv` any more.
That means that moz.configure is the only caller of
verify_python_version(). That means we can inline the logic into
moz.configure.

It makes sense for version checking to live in moz.configure because
the role of moz.configure is to evaluate the sanity of the environment.
So this commit does just that.

MozReview-Commit-ID: 7FLL0cGblFS
2018-01-08 15:46:35 -08:00
Gregory Szorc
b456405afd Bug 1426566 - Make -v an alias to --verbose for mach python-test; r=froydnj,nalexander
This alias is super common. It exists for other mach commands. Seems
useful to have for consistency.

MozReview-Commit-ID: 3gBvIHcMEZs
2018-01-05 14:19:33 -08:00
Dustin J. Mitchell
361208e156 Bug 1426255: combine Files:SCHEDULES correctly; r=gps
When multiple SCHEDULES are set for the same file (for example in different
files), combine them in a sensible way: the union of inclusive components, and
whichever has set its exclusive components.

Two conflicting assignments to SCHEDULES.exclusive is considered an error.  We
might relax this situation later if a sensible answer can be determined.  Note
that this error will only be detected when a reader consults the relevant file.

MozReview-Commit-ID: A49L9ISZXOE
2017-12-19 23:58:17 +00:00
Ciure Andrei
f93328fdbe Backed out changeset e4ca69cab96a (bug 1426255) for bustage failures on /python/mozbuild/mozbuild/test/frontend/test_reader.py::TestBuildReader::test_schedules r=backout a=backout on a CLOSED TREE 2018-01-08 23:34:50 +02:00
Dustin J. Mitchell
b8de24f28b Bug 1426255: combine Files:SCHEDULES correctly; r=gps
When multiple SCHEDULES are set for the same file (for example in different
files), combine them in a sensible way: the union of inclusive components, and
whichever has set its exclusive components.

Two conflicting assignments to SCHEDULES.exclusive is considered an error.  We
might relax this situation later if a sensible answer can be determined.  Note
that this error will only be detected when a reader consults the relevant file.

MozReview-Commit-ID: A49L9ISZXOE
2017-12-19 23:58:17 +00:00
Dustin J. Mitchell
5aac8cbe3f Bug 1403322: Switch jsreftests, jittests, test-verify to SCHEDULES; r=ahal
..and remove support for when.files-changed in the test kind.  It is still used
for other kinds, and that will be addressed in other bugs.

This is re-landing of this bug, now without running test-verify excessively.

MozReview-Commit-ID: GBilXAktICZ
2017-12-20 00:39:21 +00:00
Sebastian Hengst
e969e89952 Bug 1427398 - building language packs shouldn't require all l10n changesets to be already public. r=gps
MozReview-Commit-ID: 2zH9Ja9POLj
2017-12-30 01:31:35 +01:00
Ted Mielczarek
dba323bbd3 bug 1401647 - use a 64-bit Rust toolchain for win32 builds. r=nalexander,rillian
We currently use a 32-bit Rust toolchain for win32 builds, but this can lead
to OOM situations. This patch makes win32 builds use a 64-bit Rust toolchain,
which requires a little bit of extra configuration because rustc needs to
be able to find a link.exe that produces 64-bit binaries for building
things like build scripts, which are host binaries.

We will now generate a batch file that sets LIB to the paths to 64-bit
libraries and invokes the x64-targeting link.exe, and add a section to the
.cargo/config file to instruct cargo to use that batch file as the linker
when producing 64-bit binaries.

MozReview-Commit-ID: 9vKBbm7Gvra
2017-12-14 10:20:33 -06:00
Mark Banner
7c567b3441 Bug 1424921 - Support Lint dependencies in bootstrap. r=froydnj
- Add node as a dependency on Linux and Mac
- Add python3 for Mac only (linux generally has it installed already).

MozReview-Commit-ID: EpNWFTI9UXc
2018-01-03 21:11:44 +00:00
Margareta Eliza Balazs
acf78652f9 Merge mozilla-central to autoland. r=merge a=merge CLOSED TREE 2018-01-04 10:07:11 +02:00
Mike Hommey
9b2ce4e9a9 Bug 1427468 - Allow to run mach python without a virtualenv. r=nalexander
Sometimes, one just wants to run a one-off script with access to all
(or most) the libraries available like mozbuild, etc. but without
the weight of the whole virtualenv, which implies having an objdir
setup, etc.

One of my use cases is to run our preprocessor before the objdir is even
setup, and I'd rather not have one automatically created.
2017-12-31 15:50:29 +09:00
Mike Hommey
a666b96be9 Bug 1427466 - Allow mach clobber python to work without an objdir. r=nalexander 2017-12-31 15:38:34 +09:00
Andrew Halberstadt
da5ee7d8a0 Bug 1421799 - [test_archive] Add 'mozterm' to common.tests.zip r=gbrown
This makes sure the mozterm module is available to the testers. The
setup.py was needed to it could be installed from requirements.txt.

This module does not yet live on pypi.

MozReview-Commit-ID: 9AL0EZ1uVgL
2017-12-15 16:51:30 +00:00
Zibi Braniecki
d5a8009b3a Bug 1411012 - Migrate a small chunk of Privacy pane in Preferences to Fluent. r=mshal,Pike
MozReview-Commit-ID: ahAZCinoui
2017-11-09 12:11:32 -08:00
Sebastian Hengst
5199c70807 Backed out 5 changesets (bug 1421799) for failing firefox ui functional tests. r=backout on a CLOSED TREE
Backed out changeset f9f32474fdaf (bug 1421799)
Backed out changeset 18b4fa241936 (bug 1421799)
Backed out changeset 88dca5c8cfac (bug 1421799)
Backed out changeset 8c1f1ab754a5 (bug 1421799)
Backed out changeset e028f677bc80 (bug 1421799)
2018-01-03 20:21:28 +02:00
c68b23e9cf Bug 1421799 - [test_archive] Add 'mozterm' to common.tests.zip r=gbrown
This makes sure the mozterm module is available to the testers. The
setup.py was needed to it could be installed from requirements.txt.

This module does not yet live on pypi.

MozReview-Commit-ID: 9AL0EZ1uVgL
2017-12-15 16:51:30 +00:00
Mike Hommey
00cfebcca3 Bug 1427450 - bootstrap: Don't install mesa, libiw and libnotify development files. r=froydnj
mesa is not necessary as of bug 938489 (there was even a bootstrap patch
that never landed)
libiw is not necessary as of bug 799391.
libnotify is not necessary as of bug 783765.
2017-12-31 09:15:44 +09:00
Pierre Bertran
b4bcc32ffa Bug 1427790 - Ensure that Java8 is bootstrapped on Mac to maintain Android SDK compatibility. r=nalexander 2018-01-03 08:32:00 -05:00
Makoto Kato
31a1a6e78f Bug 1397776 - Removing armv6 config support for Android. r=glandium
We no longer support Android/armv6 and we requires NEON for Android/arm, so
we can remove armv6 support for Android.

MozReview-Commit-ID: Hh17BTyE0wR
2017-12-15 16:32:54 -06:00
Tom Prince
b0724a4cbb Bug 1426528: Get rid of support for BRANDING_FILES in moz.build; r=glandium
MozReview-Commit-ID: 72R6toOA1R0
2017-12-20 15:42:05 -07:00
Tom Prince
c70b14d8cb Bug 1426528: Pass paths to extra dmg files explicitly when packing; r=glandium
MozReview-Commit-ID: FKwZcNycUW8
2017-12-21 13:38:35 -07:00
Tom Prince
075d83ee5c Bug 1427213: Clean up docstrings in mozpack.path; r=glandium
MozReview-Commit-ID: 91cm9XJROy0
2017-12-27 15:57:32 -07:00
Ryan VanderMeulen
0d6d68f741 Bug 1426793 - Add DevEdition to mozinfo. r=nalexander 2017-12-23 16:39:53 -05:00
Andreea Pavel
35130a6b8b Merge inbound to mozilla-centra r=merge a=merge 2017-12-22 11:54:07 +02:00
Mike Hommey
1939f57198 Bug 1426555 - Move --enable-stdcxx-compat to python configure. r=chmanchester
At the same time, we make it actually do something on spidermonkey
builds. We also add an environment variable alternative, that we use
in mozconfig.stdcxx, allowing for mozconfig.no-compile to override it
and avoid configure failures on e.g. artifact builds.
2017-12-21 11:13:08 +09:00
Mike Hommey
c1ada537d9 Bug 1426555 - Allow to add host compiler flags from python configure. r=chmanchester
Bug 1325632 added some facility to add target compiler flags. This
change extends it to add allow adding host compiler flags as well.
2017-12-21 11:11:22 +09:00
Csoregi Natalia
c06a217a1f Backed out 2 changesets (bug 1401647) for Spidermonkey Build Bustage on Linux x64. r=backout on a CLOSED TREE
Backed out changeset b5c9bb05168d (bug 1401647)
Backed out changeset 0542716bb901 (bug 1401647)
2017-12-21 14:14:26 +02:00
Ted Mielczarek
371593930a bug 1401647 - use a 64-bit Rust toolchain for win32 builds. r=rillian
We currently use a 32-bit Rust toolchain for win32 builds, but this can lead
to OOM situations. This patch makes win32 builds use a 64-bit Rust toolchain,
which requires a little bit of extra configuration because rustc needs to
be able to find a link.exe that produces 64-bit binaries for building
things like build scripts, which are host binaries.

We will now generate a batch file that sets LIB to the paths to 64-bit
libraries and invokes the x64-targeting link.exe, and add a section to the
.cargo/config file to instruct cargo to use that batch file as the linker
when producing 64-bit binaries.

MozReview-Commit-ID: 9vKBbm7Gvra
2017-12-14 10:20:33 -06:00
Mike Shal
f0605ae704 Bug 1426452 - Remove check_top_objdir() call from CompileDB; r=chmanchester
Prior to bug 1224450, CompileDB used data from the Makefiles to generate
the compilation command-lines. Now that the data is derived entirely
from moz.build, we don't need to check that the Makefile is present.
This enables a simple "ac_add_options --build-backends=CompileDB"
mozconfig to work without building a make backend first.

MozReview-Commit-ID: 9tYumyUyg5Y
2017-12-20 13:44:34 -05:00
Mike Shal
5c441dac6d Bug 1424417 - Use dry-run flag for backend.mk files; r=glandium
For cases like BackendMakefile where we don't have access to
BuildBackend._write_file(), we need to make sure that FileAvoidWrite
uses the dry-run flag in order to avoid writing out files during a
config.status --dry-run.

MozReview-Commit-ID: ApsSQPySImt
2017-12-13 11:31:16 -05:00
Chris Manchester
f8294b3b25 Bug 1336429 - Add the ability to build GN projects in the tree with mozbuild. r=gps
This commit adds a frontend construct, `GN_DIRS`, to facilitate building
gn projects with moz.build. Directories added to `GN_DIRS` get particular
treatment by two build backends added here as well, `GnConfigGen` and
`GnMozbuildWriter`.

The `GnConfigGen` backend runs `gn gen` for a gn project specified in
`GN_DIRS` and dumps this configuration as json, which is filtered to include
only those elements that will be needed by mozbuild. `gn gen` is run in
the context of a single build's configuration, so when adding or updating
a gn project it will be necessary to run this step with each supported
configuration.

The `GnMozbuildWriter` aggregates the config files generated by the
`GnConfigGen` backend, which it expects to find in the `gn-configs` directory
under the directory specified to `GN_DIRS`. The result is written to a set of
moz.build files suitable for building the project that are intended to be
checked in to the tree.

Once these moz.build files are checked in to the tree the project can be built
as any other directory: when using a general purpose build backend such as
RecursiveMake or FasterMake to build, entries in `GN_DIRS` will be treated as a
normal entries in `DIRS`.


MozReview-Commit-ID: KlHuP4DY2R4
2017-12-07 15:58:18 -08:00
Cosmin Sabou
5a4f6452e3 Merge mozilla-inbound to mozilla-central. r=merge a=merge 2017-12-13 12:14:29 +02:00
Nathan Froyd
1fde75fa02 Bug 1422859 - move MOZILLA_*VERSION setting into moz.configure; r=chmanchester
This has the virtue of not executing python three times during configure
just to read the same value of milestone.txt and munge it.  We can also
remove milestone.py as a happy side effect, so all the milestone
computations can be done in init.configure.
2017-12-04 11:19:25 -05:00
Mike Shal
f54b7476e4 Bug 1423809 - Fixup dist/bin/Tupfile generation; r=nalexander
Bug 1416891 introduced a line in moz.build that uses
LOCALIZED_FILES['..'], which ended up created a BackendTupfile object
for 'dist/bin/browser/../Tupfile' separate from the BackendTupfile
object for 'dist/bin/Tupfile'. Since both objects write to the same
file, the one with a '..' in the path ended up clobbering the original
one.

This patch makes two small changes, either of which would be sufficient
to fix the problem. First, we only get the backend file in
_process_final_target_files() when we actually use it (the
LOCALIZED_FILES in this case goes through the else case). Second, we now
call normpath in _get_backend_file() to ensure things like '..' are
resolved so that any future cases of 'Tupfile' and 'foo/../Tupfile'
end up pointing to the same object.

MozReview-Commit-ID: KDGBdtQ18lK
2017-12-08 14:37:30 -05:00
Mike Shal
f5a0dd484c Bug 1423809 - Support localized generated files in the tup backend; r=nalexander
These files fail to build in the tup backend because the --locale
argument is missing and scripts like generate_update_locale.py require a
locale. Since the tup backend currently only supports en-US, we can just
hardcode this argument for now.

MozReview-Commit-ID: 7Js1yd9QB01
2017-12-08 13:53:44 -05:00
Andreea Pavel
f83f963a34 Merge inbound to mozilla-central r=merge a=merge 2017-12-09 22:21:17 +02:00
Marco Castelluccio
52519f1ba6 Bug 1424227 - Close temporary file before reopening it to avoid a Permission Denied error on Windows. r=me 2017-12-09 14:54:02 +01:00
Marco Castelluccio
1adbbe59d2 Bug 1424227 - Make lcov rewriter tests use a temporary file. r=me 2017-12-09 11:55:58 +01:00
Marco Castelluccio
d71e768f23 Bug 1424227 - Support merging multiple input info files into a single output info file. r=chmanchester 2017-12-09 01:38:34 +01:00
Marco Castelluccio
760d474d87 Bug 1424216 - Support passing directories as inputs to lcov_rewriter.py. r=chmanchester 2017-12-08 12:54:33 +01:00
Daniel Holbert
94b3eff6c0 backout changesets 50f8950fc2bc and cc0a899aa73a (bug 1424216) for bustage 2017-12-08 17:34:30 -08:00
Marco Castelluccio
31841c1b92 Bug 1424227 - Support merging multiple input info files into a single output info file. r=chmanchester 2017-12-09 01:38:34 +01:00
Marco Castelluccio
ec9b805538 Bug 1424216 - Support passing directories as inputs to lcov_rewriter.py. r=chmanchester 2017-12-08 12:54:33 +01:00
Mike Hommey
3c0172c4e6 Bug 1423802 - Handle stdc++compat and STLPORT_LIBS at the emitter level. r=nalexander
Bug 1256642 introduced magic at the emitter level to determine whether a
binary contains C++ sources and should be linked with the C compiler or
the C++ compiler.

Unfortunately, the Binary() moz.build template always adds C++ OS
libraries on Android (through STLPORT_LIBS), and C++ libraries on Linux
(stdc++compat).

The latter only ends up forcing every Binary() to be linked with the C++
linker, which is unfortunate, but doesn't cause much problems. The
former, however, involving OS libraries, the magic from bug 1256642
doesn't kick in, so we end up trying to link C++ OS libraries with the C
linker. Which ends up failing, because the libraries in STLPORT_LIBS
require -lm, which, while it's added by the C++ compiler when linking,
is not when the linkage is driven by the C compiler.

Because the fallible library, linked to all GeckoBinary()s is a C++
library, we still ended up linking with the C++ compiler on Android, so
this wasn't actually causing any problem... until I tried to remove that
fallible library in bug 1423803.

Anyways, the core problem is that moz.build evaluation is happening too
early to know whether any C++ sources are being linked together, so
there is no way the Binary() template can do the right thing. So this
change moves the logic to the emitter.

This also changes the type of STLPORT_LIBS to a list.
2017-12-07 12:15:32 +09:00
Ralph Giles
a80e62e258 Bug 1424439 - mozboot: Update to rust 1.22.0. r=nalexander
Since bug 1421097, rust 1.22.0 is required to build, but
mozboot was still considering 1.21.0 sufficiently new.
bumpt the version there as well so `./mach bootstap`
will update to the required version.

MozReview-Commit-ID: moYo0KSsU
2017-12-08 16:42:28 -08:00
Mike Shal
38214164ec Bug 1423438 - Fix invalid .pp content for process_define_files.py; r=glandium
The process_define_files action uses the PartialConfigEnvironment to
query buildconfig values, but it should only be doing it for 'define'
and 'undef' statements. It was incorrectly also querying the
PartialConfigEnvironment with other preprocessor statements like 'if'
and 'include', which caused bogus entries to appear in the generated
dependency file.

MozReview-Commit-ID: IJptyXGluC7
2017-12-07 10:54:28 -05:00
Mike Shal
7d97f5f590 Bug 1421038 - Rename 'relativedir' to 'relsrcdir'; r=nalexander
The name 'relativedir' is ambiguous - it is unclear whether it is a
relative srcdir or objdir. Rename it to 'relsrcdir' in the
ContextDerived() object to match the naming used in Context() so it is
obvious that it is a relative srcdir.

Most of these are a straight text replacement from relativedir to
relsrcdir, except for tup.py:_get_backend_file(), which was supposed to
be using an objdir in the first place.

MozReview-Commit-ID: 9eFHOCMofq5
2017-12-07 14:52:50 -05:00
Tom Ritter
8b7cfcf712 Bug 1393817 Fix L10N check for MinGW build r=ted
exe_7z_archive.py runs during the MinGW build L10N check step, and
hardcodes 7z as the 7zip executable. This works on Windows, but not
Linux. We need to pass it the correct executable for 7zip, which is
located during configure.

However, repacks (repackage-winXX-nightly) don't do configure, and
don't have the tools to do configure. So we leave the default
command in the python script if one is not supplied.

MozReview-Commit-ID: B7GEKRYEJTD
2017-12-07 11:09:43 -06:00
Gregory Szorc
cde17550ea Bug 1429342 - Ignore mach file-info arguments that don't resolve to paths; r=froydnj
Without this, e.g. `mach file-info bugzilla-component build/does-not-exist`
reports the bug component is `Core :: Build Config`. Because paths
in CI have `build/` prefixes, people were typing `build/` paths into
`mach file-info` and reporting bugs against `Core :: Build Config`.

MozReview-Commit-ID: 8Zp6cnuw0Sh
2018-01-16 16:40:30 -08:00
Emilio Cobos Álvarez
7bad8d42e8 Bug 1423911: Update cargo-vendor requirement. r=kats
on a CLOSED TREE, so the sync bot can't clobber the revendor again.

MozReview-Commit-ID: 1SzllPXnCKd
2017-12-07 16:14:38 +01:00