Commit Graph

4262 Commits

Author SHA1 Message Date
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
Axel Hecht
509e84e17b Bug 1635481, workaround python and virtualenv, r=firefox-build-system-reviewers,rstewart
Differential Revision: https://phabricator.services.mozilla.com/D74207
2020-05-07 15:38:14 +00:00
Ricky Stewart
933b3522b8 Bug 1633156 - Don't emit cached table files from ply r=glandium
`ply`, [by design](https://github.com/dabeaz/ply/issues/79), does not produce reproducible table files; hence bug 1633156. (Note that this was *always* true, but only became a problem once we switched to Python 3, which has more unpredictable dict iteration order than Python 2.7, at least prior to [3.7](https://docs.python.org/3/whatsnew/3.7.html#summary-release-highlights).)

In any other circumstance I would consider submitting a patch to `ply` to fix this, but as of the [in-progress version 4.0 of the library](https://github.com/dabeaz/ply/blob/master/CHANGES), it doesn't even emit this cached data any more, and indeed the [latest version of the code](1fac9fed64/ply) doesn't even call `open()` at all except to do logging or to read the text data to be parsed from `stdin`. So if we were going to pin our future on `ply` and upgrade to later versions of the library in the future, we would have to live in a world where `ply` doesn't generate cached table files for us anyway.

Emitting the cached table files so later build steps can consume them is an "optimization", but it's not clear exactly how much actual value that optimization provides overall. Quoth the `CHANGES` file from that repository:

```
PLY no longer writes cached table files.  Honestly, the use of
the cached files made more sense when I was developing PLY on
my 200Mhz PC in 2001. It's not as much as an issue now. For small
to medium sized grammars, PLY should be almost instantaneous.
```

In practice, I have found this to be true; namely, `./mach build pre-export export` takes just about as long on my machine after this patch as it did before, and in a try push I performed, there's no noticeable performance regression from applying this patch. In local testing I also found that generating the LALR tables in calls to `yacc()` takes about 0.01s on my machine generally, and we generate these tables a couple dozen times total over the course of the `export` tier now. This isn't *nothing*, but in my opinion it's also not nearly long enough where it would be a concern given how long `export` already takes.

That `CHANGES` file also stresses that if caching this data is important, we have the option of doing so via `pickle`. If and when we decide that re-enabling this optimization is valuable for us, we should take control of this process and perform the generation in such a way that we can guarantee reproducibility.

Differential Revision: https://phabricator.services.mozilla.com/D73484
2020-05-07 00:39:28 +00:00
Ricky Stewart
7fa6493c9c Bug 1635585 - Run compilation/test_warnings.py under Python 3 r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D73970
2020-05-06 19:36:57 +00:00
Andi-Bogdan Postelnicu
94b15f6444 Bug 1635795 - Activate virtualenv for mach static-analysis. r=rstewart,marco
Differential Revision: https://phabricator.services.mozilla.com/D74058
2020-05-06 16:47:15 +00:00
Nathan Froyd
68154b269c Bug 1635229 - output relative paths in XPIDL-generated source files; r=asuth,glandium,mccr8
We currently generate absolute paths in all of our XPIDL-generated
source files, which is not so great for several reasons (deterministic
generation of files across machines, Searchfox analysis logic, shared
compilation caches, etc.).  Let's generate paths that still indicate
where you should be looking, but are identical across compilations,
objdirs, etc.

Differential Revision: https://phabricator.services.mozilla.com/D73747
2020-05-06 10:56:58 +00:00
Mike Hommey
435b446654 Bug 1634204 - Bump glibc and libstdc++ runtime requirement to resp. 2.17 and 3.4.19 (4.8.1). r=froydnj
Combined with the upcoming upgrade of the build environment to Debian 8,
which is also going to upgrade the Gtk+3 requirement to 3.14, of the
major Linux distros Firefox currently supports running on, this removes
runtime support for:
- Fedora 20 and earlier (EOLed in 2015),
- OpenSUSE 13.1 and earlier (EOLed in 2016),
- Debian 7 (EOLed in 2018),
- Ubuntu 14.04 (EOLed in 2019).

Some of them might actually be supported in practice because the Gtk+3
requirement might be more relaxed than 3.14, but figuring that out is not
worth the effort.

Differential Revision: https://phabricator.services.mozilla.com/D73783
2020-05-06 02:41:20 +00:00
Mike Hommey
5cef88b2f1 Bug 1634204 - Allow newer versions of symbols if they are weakly linked. r=froydnj
We currently check that the binaries we ship are not using symbol
versions of system libraries that would not be available on some older
systems. In some cases, however, we may get dependencies on newer symbol
versions in the form of weak symbols, that are checked for at runtime.
This happens with __cxa_thread_atexit_impl when building against a glibc
newer than 2.18, and the supporting code in Rust libstd actually checks
at runtime whether the weak symbol is resolved before using it.

Differential Revision: https://phabricator.services.mozilla.com/D73782
2020-05-06 02:00:13 +00:00
Csoregi Natalia
5da0fac6d9 Backed out changeset eb1b773902c3 (bug 1635229) for bustages on xpidl/runtests.py. CLOSED TREE 2020-05-06 05:05:41 +03:00
Nathan Froyd
c2d1969d66 Bug 1635229 - output relative paths in XPIDL-generated source files; r=asuth,glandium,mccr8
We currently generate absolute paths in all of our XPIDL-generated
source files, which is not so great for several reasons (deterministic
generation of files across machines, Searchfox analysis logic, shared
compilation caches, etc.).  Let's generate paths that still indicate
where you should be looking, but are identical across compilations,
objdirs, etc.

Differential Revision: https://phabricator.services.mozilla.com/D73747
2020-05-06 01:35:30 +00:00
Ricky Stewart
0015091b18 Bug 1633039 - Don't check for Python 2 in configure r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D72895
2020-05-05 16:02:02 +00:00
Ricky Stewart
56c10c5aa2 Bug 1633037 - Remove all remaining references to $(PYTHON) across Makefiles r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D72894
2020-05-05 20:32:23 +00:00
Ricky Stewart
4d4b22b3de Bug 1599658 - Delete previous definition of py_action in Makefiles. Now py_action calls into Python 3 and py3_action doesn't exist. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D72487
2020-05-05 20:04:30 +00:00
Ricky Stewart
fd72a5d35e Bug 1633016 - Remove a bunch of references to PYTHON(2) in Makefiles r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D72479
2020-05-05 19:53:22 +00:00
Ricky Stewart
3749c34fb4 Bug 1632916 - Run JS/web-platform/ipdl build machinery in Python 3 r=jgraham,nika,glandium
Differential Revision: https://phabricator.services.mozilla.com/D72478
2020-05-05 20:32:12 +00:00
Ricky Stewart
ea0981892a Bug 1635526 - Activate virtualenv in mach static-analysis autotest r=andi
After bug 1633039, we won't be guaranteed to have the `init` virtualenv already created after running a build, so `static-analysis autotest` needs to make sure it's created all by itself. This results in failures like [this](https://treeherder.mozilla.org/#/jobs?repo=autoland&selectedTaskRun=WDRF1EzDRA6jPqPb60X5Pw-0&revision=332ce0963b4e92d68b0de25860debb7694dc38d5).

Differential Revision: https://phabricator.services.mozilla.com/D73924
2020-05-05 18:31:34 +00:00
Ricky Stewart
9855279a32 Bug 1635519 - Delete test_graph.py r=froydnj
This isn't useful now that the Tup backend is deleted.

Differential Revision: https://phabricator.services.mozilla.com/D73919
2020-05-05 18:07:19 +00:00
Ricky Stewart
8ffbec29d9 Bug 1635491 - Delete tup backend and mach analyze r=froydnj
It's not maintained and doesn't work as-is. If we want to revive it we can grab it from source control later, but in the meantime it's just confusing and it comes up in search results even though we never look for it.

Also delete `mach analyze` which depends on the existence of a Tup backend.

Differential Revision: https://phabricator.services.mozilla.com/D73911
2020-05-05 17:28:07 +00:00
Razvan Maries
3b592b6add Backed out changeset 5cf7e2bc5640 (bug 1635491) as per Ricky's request for Lint failure. CLOSED TREE 2020-05-05 19:57:33 +03:00
Ricky Stewart
cdac3a2e15 Bug 1635491 - Delete tup backend and mach analyze r=froydnj
It's not maintained and doesn't work as-is. If we want to revive it we can grab it from source control later, but in the meantime it's just confusing and it comes up in search results even though we never look for it.

Also delete `mach analyze` which depends on the existence of a Tup backend.

Differential Revision: https://phabricator.services.mozilla.com/D73911
2020-05-05 16:32:42 +00:00
Andi-Bogdan Postelnicu
54f965e51e Bug 1634050 - [clang-format] When analyzing files outside of the tree take along the appropriate .clang-format file as well. r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D73053
2020-04-30 16:46:26 +00:00
Bogdan Tara
f137fa0613 Backed out 6 changesets (bug 1632916, bug 1599658, bug 1633037, bug 1633039, bug 1633016, bug 1632920) for SA bustages CLOSED TREE
Backed out changeset 332ce0963b4e (bug 1633039)
Backed out changeset a9904cbc40d9 (bug 1633037)
Backed out changeset d06b0ec349f8 (bug 1599658)
Backed out changeset 8fd300cad80f (bug 1633016)
Backed out changeset f8820941c703 (bug 1632916)
Backed out changeset ac9c2c8746ed (bug 1632920)
2020-05-02 01:49:29 +03:00
Ricky Stewart
035981e445 Bug 1633039 - Don't check for Python 2 in configure r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D72895
2020-04-30 15:23:51 +00:00
Ricky Stewart
69685d8ab5 Bug 1633037 - Remove all remaining references to $(PYTHON) across Makefiles r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D72894
2020-05-01 16:19:21 +00:00
Ricky Stewart
0daacc12c3 Bug 1599658 - Delete previous definition of py_action in Makefiles. Now py_action calls into Python 3 and py3_action doesn't exist. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D72487
2020-04-30 15:27:13 +00:00
Ricky Stewart
bb4e86d85a Bug 1633016 - Remove a bunch of references to PYTHON(2) in Makefiles r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D72479
2020-04-30 15:25:22 +00:00
Ricky Stewart
d990224458 Bug 1632916 - Run JS/web-platform/ipdl build machinery in Python 3 r=jgraham,nika,glandium
Differential Revision: https://phabricator.services.mozilla.com/D72478
2020-05-01 16:31:21 +00:00