Commit Graph

4288 Commits

Author SHA1 Message Date
Andi-Bogdan Postelnicu
affacf5510 Bug 1639406 - for code-review generate the propper patch when dealing with clang-format issues. r=marco
Differential Revision: https://phabricator.services.mozilla.com/D78060
2020-06-04 08:53:02 +00:00
John Paul Adrian Glaubitz
e1b5790f4d Bug 1325771 - build: Add m68k as target architecture to mozbuild r=glandium
Adds the basic definitions for m68k to mozbuild, allowing to build Spidermonkey.

Differential Revision: https://phabricator.services.mozilla.com/D77285
2020-06-03 18:30:50 +00:00
Ricky Stewart
1914a51fc8 Bug 1643026 - Squash stray reference to deleted global variable in virtualenv.py r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D78069
2020-06-03 17:23:30 +00:00
Ed Lee
96ed60b4bd Bug 1641863 - Upgrade Node 10.x (in preparation for ESR 78) r=Standard8. CLOSED TREE
Node v10.21.0 (LTS) just released https://nodejs.org/en/blog/release/v10.21.0/

Differential Revision: https://phabricator.services.mozilla.com/D77904
2020-06-03 18:00:52 +00:00
Tom Prince
9eac413f54 Bug 1642446: Add an attribute to annotate toolchain tasks used by mach bootstrap; r=firefox-build-system-reviewers,rstewart
Toolchains that are used for local development need to be built on a level-3
branch to installable via `mach bootstrap`. Add an attribute to track the fact
that a toolchain is used that way, and:
- ensure that everything installed via `mach boostrap` has that attribute set
- ensure that everything with that attribute set is built on trunk projects

We could additionally verify that attribute is only set on things used by
bootstrap, but bootstrap doesn't currently have an exhaustive list of things
that it might install, making that difficult.

Differential Revision: https://phabricator.services.mozilla.com/D77706
2020-06-03 15:55:26 +00:00
Dorel Luca
0154691eae Backed out 5 changesets (bug 1325771) for Spidermonkey failures and build bustage in build/src/mfbt/tests/TestCompactPair.cpp. CLOSED TREE
Backed out changeset ace40545b46c (bug 1325771)
Backed out changeset b3e0fb410a1c (bug 1325771)
Backed out changeset d69ac62c063f (bug 1325771)
Backed out changeset 24e6299e112d (bug 1325771)
Backed out changeset 393a6ff847ce (bug 1325771)
2020-06-03 20:23:08 +03:00
John Paul Adrian Glaubitz
25481ca65b Bug 1325771 - build: Add m68k as target architecture to mozbuild r=glandium
Adds the basic definitions for m68k to mozbuild, allowing to build Spidermonkey.

Differential Revision: https://phabricator.services.mozilla.com/D77285
2020-06-02 07:00:48 +00:00
Bogdan Tara
979c77d94e Backed out changeset 83ee79caab92 (bug 1622963) for python related bustages CLOSED TREE 2020-06-03 10:23:57 +03:00
Mike Hommey
323ea73e5a Bug 1622963 - Require python 3.6 for the build system. r=firefox-build-system-reviewers,rstewart
Differential Revision: https://phabricator.services.mozilla.com/D77754
2020-06-03 02:16:48 +00:00
Andy Grover
95b90fb23e Bug 1633006 - Update to Neqo 0.4.0 r=dragana,necko-reviewers
Document qlog uses 2 clause bsd license.

Adapt to API changes in glue and http3server

Differential Revision: https://phabricator.services.mozilla.com/D77903
2020-06-02 21:28:31 +00:00
Ricky Stewart
0bbaac721b Bug 1641693 - Replace a bunch of uses of GENERATED_FILES with the GeneratedFile template r=necko-reviewers,geckoview-reviewers,aklotz,dragana,froydnj
Also update documentation to suggest using the `GeneratedFile` template rather than directly referencing `GENERATED_FILES` where possible.

Differential Revision: https://phabricator.services.mozilla.com/D77496
2020-06-01 16:00:28 +00:00
Mike Hommey
9088528947 Bug 1635764 - Move --with-system-icu and --with-intl-api to python configure. r=firefox-build-system-reviewers,rstewart
At the same time, because it's now simpler to do so, set the right data
file name for big-endians, even though we don't have or produce it
(bug #1264836). Also remove USE_ICU, which is redundant with
JS_HAS_INTL_API, and actively break the build at configure time when
using --without-intl-api with Firefox because this hasn't actually
worked for close to 3 years (since bug 1402048).

Differential Revision: https://phabricator.services.mozilla.com/D77416
2020-05-29 21:29:52 +00:00
Ricky Stewart
7a15c311ac Bug 1639313 - Print usage if you call a bare mach vendor, mach cargo, or mach remote r=remote-protocol-reviewers,froydnj,whimboo
The architecture of `mach` does not make this easy to do from within one process, not least of all due to persistent global, mutable state. :( There may be another way to do this, I'm not saying it's completely impossible (and obviously with a significant enough refactor there's a way to make this happen), but subprocessing is a foolproof way to accomplish the same.

Differential Revision: https://phabricator.services.mozilla.com/D77374
2020-05-29 16:16:31 +00:00
Nils Ohlmeier [:drno]
18ef0cb66a Bug 1641289: Bye, bye Steeplechase. r=dminor,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D77114
2020-05-29 03:19:27 +00:00
Ricky Stewart
d620b9e6a6 Bug 1641242 - Handle difference in API of ImportError between py2 and py3 in artifact_commands.py r=catlee
Differential Revision: https://phabricator.services.mozilla.com/D77337
2020-05-28 20:33:03 +00:00
Axel Hecht
1343d506c0 Bug 1641184, use only the merge dir for repacks, r=nalexander
l10n-merge creates a full merge dir for a while now, let's
simplify the build logic to only read from that directory
during repacks and langpacks.

Differential Revision: https://phabricator.services.mozilla.com/D77023
2020-05-27 17:04:06 +00:00
Mitchell Hentges
0482fe58ed Bug 1641073: improve BaseFile.copy() performance r=rstewart
Arrays are mutable, so appending each substring at a time and joining at the endis much faster than re-allocating
a new string on each loop.

Differential Revision: https://phabricator.services.mozilla.com/D76945
2020-05-27 16:52:51 +00:00
Ricky Stewart
1d10fc6783 Bug 1639624 - Don't import from distutils unless absolutely necessary in virtualenv.py r=froydnj
Similar reasoning to bug 1638780.

Differential Revision: https://phabricator.services.mozilla.com/D76221
2020-05-27 15:07:47 +00:00
Mike Hommey
a97c7ebfe7 Bug 1640578 - Remove --disable-install-strip from mac mozconfigs. r=froydnj
The need for --disable-install-strip in the mac mozconfigs comes from a
discrepancy in how stripping is handled between platforms. On Windows,
there is no stripping. On non-Mac unix, `strip` removes local symbols as
well as debug info and debug symbols. On Mac, it actually removes too
much, and one has to pass flags to remove both local symbols (`-x`) and
debug symbols (`-S`). Debug info is already in a separate file
(`.dSYM`).

For profiling reasons, we do ship e.g. nightlies with local symbols but
not debug info or symbols (or at least that's the intent). On Windows,
again, nothing to do. On non-Mac unix, we pass `--strip-debug` to
`strip` so that it keeps local symbols. That's where the discrepancy
comes in for Mac: the build system doesn't handle this at all, so the
mozconfigs contain --disable-install-strip to avoid stripping.

The build system should be doing what it's expected to be doing from the
start, without mozconfigs opting into anything.

AFAIK, we only really need the local symbols, so we can `strip -S` on
Mac when profiling is enabled, rather than `strip -x -S`. This also
significantly reduces the size of the installer for nightlies.

And while we're here, move the logic out of old-configure and into
python configure.

Differential Revision: https://phabricator.services.mozilla.com/D76789
2020-05-27 01:42:07 +00:00
Andi-Bogdan Postelnicu
622cf2a71a Bug 1640878 - for clang-tidy static-analysis keep a deep copy of the checks. r=froydnj
`StaticAnalysisMonitor` uses `clang-tidy` config dictionary in order to
match different options for the checkers that are being used. For this `StaticAnalysisMonitor`
modifies this dictionary. The dictionary not being a deep copy of the original one, the
modifications are echoed in the initial dictionary thus having the potential to lead to
unexpected behavior from `clang-tidy` when generating the checkers list.

Differential Revision: https://phabricator.services.mozilla.com/D76834
2020-05-26 17:23:38 +00:00
egao
c37762fb9f Bug 1640716 - correct string substitution in mozbuild/frontend/reader.py r=jmaher
Changes:

Current in-tree code will simply print `{path}` as many times as it reads a path.

This change will ensure that paths that have been read are output to the screen, which is much more useful.

Differential Revision: https://phabricator.services.mozilla.com/D76729
2020-05-26 09:57:17 +00:00
Geoff Brown
9e26d9583b Bug 1636797 - Purge __pycache__ in 'mach clobber python'; r=firefox-build-system-reviewers,rstewart
Differential Revision: https://phabricator.services.mozilla.com/D76560
2020-05-23 19:37:09 +00:00
Tilden Windsor
b7355730e6 Bug 1640142 - Added spaces to "mach clang-format" help message. r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D76467
2020-05-22 11:53:48 +00:00
Ricky Stewart
e2fe57521b Bug 1638060 - Standardize interface of mozfile classes as bytes-based streams r=glandium
At the beginning of the Python 3 migration (circa bug 1602540), we made an update to the interface of `mozpack/files.py` in the direction of aligning with Python 3's built-in `file` support; namely, that opening a file in text mode returns a stream of `str` (text), and that opening a file in binary mode returns a stream of `bytes`. This was deemed to be more trouble than it was worth. This patch undoes all of those changes to the interface in favor of moving back to the Python 2 style, where all files are bytestreams.

Differential Revision: https://phabricator.services.mozilla.com/D75424
2020-05-22 01:11:29 +00:00
Andrew Halberstadt
0591e31c1f Bug 1639349 - [ci] Set up a SCHEDULES rule to exclude non-webrender tests on webrender-only pushes, r=gbrown
Depends on D76433

Differential Revision: https://phabricator.services.mozilla.com/D76434
2020-05-22 14:03:46 +00:00
adiabtaic28394
43294f5124 Bug 1632345 - mach doctor does not complain about noatime/reltime on tmpfs anymore r=Callek,glandium
Differential Revision: https://phabricator.services.mozilla.com/D75917
2020-05-22 13:36:42 +00:00
Mike Hommey
6ba1065508 Bug 1639815 - Move --enable-strip and --enable-install-strip to python configure. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D76291
2020-05-21 23:51:58 +00:00
Chris AtLee
cd35328624 Bug 1637381: Add support for extracting zst files to mozbuild tooltool r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D75203
2020-05-21 13:28:33 +00:00
Dan Minor
fdcf957cca Bug 1634675 - Remove webrtc-gtests r=drno,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D73451
2020-05-20 19:59:45 +00:00
Ricky Stewart
e8d734c549 Bug 1639521 - Fix Py3 incompatibility in mach artifact r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D76215
2020-05-20 20:34:51 +00:00
Ricky Stewart
1a44b2a1d9 Bug 1638983 - Run mach repackage with Python 3 r=firefox-build-system-reviewers,glandium
Differential Revision: https://phabricator.services.mozilla.com/D76058
2020-05-20 15:35:58 +00:00
Ricky Stewart
aefac46494 Bug 1638951 - Run mach cargo with Python 3 r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D75999
2020-05-19 19:35:52 +00:00
Ricky Stewart
57d020b2e6 Bug 1638780 - Don't import virtualenv unless necessary in mach commands r=froydnj
The module `distutils.sysconfig` isn't installed by default on Ubuntu -- the package `python3-distutils` exposes it. That's fine, except we unconditionally import it in `virtualenv.py`, which gets up indirectly being imported whenever you run any `mach` command, which will cause `bootstrap` to break before it even has the chance to install it.

`python3-pip` seems to rely on `python3-distutils` being installed so `bootstrap` will install it, so all we need to do is make sure it doesn't import `virtualenv` in any circumstance unless it's necessary (when surfacing an error in the module would be appropriate).

Differential Revision: https://phabricator.services.mozilla.com/D75833
2020-05-19 12:07:47 +00:00
Andi-Bogdan Postelnicu
86f93ce272 Bug 1635112 - Mark clang-diagnostic-error as publishable in the clang-tidy artifact. r=marco
For `clang-tidy` static-analysis mark all diagnostic-messages that are `clang-diagnostic-error` as publishable.

Differential Revision: https://phabricator.services.mozilla.com/D74229
2020-05-08 07:19:51 +00:00
Andi-Bogdan Postelnicu
0b18f7ab13 Bug 1635112 - Disable the build error reporting at review-phase using Coverity. r=sylvestre,marco
Differential Revision: https://phabricator.services.mozilla.com/D74003
2020-05-08 09:30:02 +00:00
Andi-Bogdan Postelnicu
ac1e721802 Bug 1635112 - Use clang-tidy as warning build error detector for our static-analysis targets. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D73692
2020-05-08 07:19:23 +00:00
Andi-Bogdan Postelnicu
7a23d681c5 Bug 1635112 - remove MSVC support from WarningsCollector. r=glandium
MSVC is not supported by the build system anymore.

Differential Revision: https://phabricator.services.mozilla.com/D73809
2020-05-08 07:19:02 +00:00
Rob Lemley
bd812fce54 Bug 1631197 - Make mach valgrind-test work for Thunderbird builds. r=froydnj
Create a new MachCommandCondition, "is_firefox_or_thunderbird" which is then used
to allow mach valgrind-test work for Thunderbird builds.

Differential Revision: https://phabricator.services.mozilla.com/D73153
2020-05-19 00:10:06 +00:00
Mike Hommey
28de21d935 Bug 1638193 - Remove build system support for iOS. r=nalexander
iOS support for Gecko has not been tested in years and is most probably
out of date. The build system part of it, specifically the checks in
build/autoconf/ios.m4, are not trivial to port to python configure, and
they prevent other things from moving to python configure (because some
of them change value when MOZ_IOS is set).

The code is left alone, although it could probably be stripped off as
well, but I'll leave that as an exercise for someone else.

Differential Revision: https://phabricator.services.mozilla.com/D75463
2020-05-15 03:56:16 +00:00
Ricky Stewart
5af71702d3 Bug 1637709 - Configure purge extension when calling hg purge r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D75328
2020-05-14 18:14:11 +00:00
Ricky Stewart
69ecad92c6 Bug 1579329 - Run mach file-info with Python 3 r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D75343
2020-05-14 18:20:22 +00:00
Marco Castelluccio
d845cf5481 Bug 1637911 - Skip modules with a None __file__ attribute. r=rstewart
Differential Revision: https://phabricator.services.mozilla.com/D75267
2020-05-14 18:28:55 +00:00
Nathan Froyd
142b960302 Bug 1637737 - cleanup test failures from mach run JS shell changes; r=firefox-build-system-reviewers,rstewart
In bug 1637665, we changed the OS X codepath for `mach run` to consult
`MOZ_WIDGET_TOOLKIT` as a substitute for "browserness".  Unfortunately,
this caused tests that only set `MOZ_MACBUNDLE_NAME` to fail.  Rather
than set `MOZ_WIDGET_TOOLKIT` in those tests, we probably should have
been checking `MOZ_MACBUNDLE_NAME` in the first place, since
`MOZ_MACBUNDLE_NAME` is also set only for the browser and not for the JS
shell.  We can also remove the xulrunner codepath, as xulrunner was
removed from the tree several years ago.

Differential Revision: https://phabricator.services.mozilla.com/D75315
2020-05-14 14:58:47 +00:00
Nathan Froyd
35647659d4 Bug 1637665 - make mach run work with the JS shell on OS X; r=firefox-build-system-reviewers,rstewart
We need to skip the xulrunner/browser code (do we even support xulrunner
anymore?) for `--enable-application=js` builds.  `MOZ_WIDGET_TOOLKIT` is
used elsewhere to check for "browserness".

Differential Revision: https://phabricator.services.mozilla.com/D75140
2020-05-13 16:55:55 +00:00
Ricky Stewart
8bfe989824 Bug 1634391 - Include more specific instructions than "consult a build peer" in Mozbuild comments/error messages r=froydnj
The official decision appears to be that we want people to ask questions in the build channel on chat.mozilla.org for queries that require build peer approval, as opposed to emailing specific people directly, filing bugs, etc. Rather than the vague "consult a build peer" suggestion currently in the code, specify exactly what we expect people to do in mozbuild.

Differential Revision: https://phabricator.services.mozilla.com/D74963
2020-05-13 13:40:53 +00:00
Jon Bauman
2bec40dcfe Bug 1637144 - Syntax for different moz.build paths is undocumented. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D74799
2020-05-12 17:33:47 +00:00
Ricky Stewart
f46e54c22a Bug 1636797 - Improve error message when artifacts cannot be downloaded r=froydnj
The current error message leaves you with basically no recourse besides filing a bug if you're already at the latest HEAD. Meanwhile, `mach clobber` will fix it but in doing so you're taking a very blunt sledgehammer to the problem. Instead, I've updated this error message to tell you you can `mach clobber python`. I also removed the explicit reference to "artifact builds" because you can encounter this error outside of artifact builds as well. Finally, I added another reminder that `mach bootstrap` and `mach artifact` don't work for old revisions of central because I keep getting bugs about it and more screaming about how it's unsupported can't hurt.

Differential Revision: https://phabricator.services.mozilla.com/D74732
2020-05-11 20:44:30 +00:00
Mitchell Hentges
b8108d6064 Bug 1632429: Migrate |./mach try| to python 3; r=rstewart,ahal
|./mach try| subcommands are now compatible with both python 2 and 3.

Hand-tested with many combinations of subcommand and subcommand flags.

Updates tryselect unit tests to use Python 3.

Differential Revision: https://phabricator.services.mozilla.com/D73398
2020-05-06 22:17:14 +00:00
Jonathan Watt
e9737ef887 Bug 1636265. Fix the Eclipse CDT build backend (broken by the switch to Python 3). r=botond
Python 3 doesn't allow strings to be written to files opened in binary mode
(it requires a byte array in that case).  As it happens, we should really be
opening these Eclipse config files in text mode since it seems on Windows the
files use Windows line ending characters.  So rather than change the strings
to byte arrays, this patch simply changes the code to open the files in text
mode.

Differential Revision: https://phabricator.services.mozilla.com/D74318
2020-05-08 16:26:35 +00:00
Mitchell Hentges
2e71833471 Bug 1636209: resolves tests that were incorrectly marked as xfail r=tomprince
When handling bug 1632429, I found some tests that worked on Python 2, but not Python 3.
They were marked accordingly as "expected failures". However, my system version of Python
is 3.8, while CI (and a non-trivial number of devs, probably) use 3.6.

Some of these tests marked as xfail were actually still working on versions of Python until 3.8.

The failure of this test was due to a change in default tarfile format. Explicitly setting this
format makes the tests pass in all relevant python versions.

Differential Revision: https://phabricator.services.mozilla.com/D74337
2020-05-07 23:41:35 +00:00