Commit Graph

9597 Commits

Author SHA1 Message Date
Geoff Brown
fc9db06c35 Bug 1685878 - Remove remoteautomation.py; r=jmaher
remoteautomation.py is an old collection of code used by android mochitest and android reftest;
it survived the removal of automation.py. This patch removes remoteautomation.py, moving the
majority of the functionality to a new class in mozdevice. Some features are simplified or
removed, and the remainder moved into the remote mochitest/reftest harnesses.

Differential Revision: https://phabricator.services.mozilla.com/D102239
2021-01-20 17:00:18 +00:00
Mike Hommey
66a79a59fe Bug 1553230 - Allow to opt-in to automatically update some bootstrapped toolchains. r=firefox-build-system-reviewers,nalexander,mhentges
This adds a --enable-bootstrap build flag that will automatically update
cbindgen, node, clang, sccache, nasm, wine, lucetc, dump_syms, pdbstr,
and winchecksec if they are already installed in ~/.mozbuild.

Eventually, we'll want to allow to install toolchains that weren't
already install, but one step at a time.

This explicitly doesn't cover rustc, which is its own can of worms, or
android-{ndk,sdk}, which are not installed via toolchain artifacts
currently.

Differential Revision: https://phabricator.services.mozilla.com/D101723
2021-01-15 22:15:51 +00:00
Mike Hommey
ef2cc26ea5 Bug 1686646 - Don't pass --with-clang-path or --with-libclang-path in mozconfigs. r=firefox-build-system-reviewers,dmajor
Configure already figures those properly from $CC.

Differential Revision: https://phabricator.services.mozilla.com/D101722
2021-01-15 04:33:11 +00:00
Mike Hommey
5552bc3c4a Bug 1686646 - In mozconfigs, don't set paths to tools configure can now find on its own. r=firefox-build-system-reviewers,dmajor
Differential Revision: https://phabricator.services.mozilla.com/D101721
2021-01-15 04:33:09 +00:00
Mike Hommey
4ed35480e2 Bug 1686646 - Look for more tools in MOZ_FETCHES_DIR. r=firefox-build-system-reviewers,dmajor
This will allow to find them on automation without setting anything in
mozconfigs.

Differential Revision: https://phabricator.services.mozilla.com/D101720
2021-01-15 04:33:01 +00:00
Mike Hommey
8362a57bed Bug 1686646 - Use more targeted search paths for each tool. r=firefox-build-system-reviewers,dmajor
Instead of adding all possible tool paths from ~/.mozbuild, we only
add the relevant paths for each of the tools we search for.

Differential Revision: https://phabricator.services.mozilla.com/D101718
2021-01-15 04:26:05 +00:00
Mike Hommey
de6099304e Bug 1686646 - Separate out Rust compiler search path. r=firefox-build-system-reviewers,dmajor
Differential Revision: https://phabricator.services.mozilla.com/D101717
2021-01-15 04:26:03 +00:00
Mike Hommey
22956f8151 Bug 1686646 - Separate out MSVC compiler search path. r=firefox-build-system-reviewers,dmajor
We don't need to check the MSVC compiler directory for more than a few
programs.

Differential Revision: https://phabricator.services.mozilla.com/D101716
2021-01-15 04:26:01 +00:00
Mike Hommey
2033eb7bed Bug 1686646 - Remove host_toolchain_search_path. r=firefox-build-system-reviewers,dmajor
The only thing that varies between toolchain_search_path and
host_toolchain_search_path is the path to the MSVC C/C++ compiler and
tools, because MSVC has a different compiler for each platform, and host
and target platforms may differ (when e.g. compiling for arm64 on
x86_64).

However, we don't use the MSVC compiler anymore, and the only thing we
use its path for is the assembler, which we don't use for host things
(and we don't have a HOST_AS), and to derive the path to some system
headers/SDK.

Differential Revision: https://phabricator.services.mozilla.com/D101714
2021-01-15 04:25:56 +00:00
Mike Hommey
ea136c68b4 Bug 1686646 - Move --enable-release and DEVELOPER_OPTIONS to top-level moz.configure. r=firefox-build-system-reviewers,dmajor
Differential Revision: https://phabricator.services.mozilla.com/D101713
2021-01-15 04:25:54 +00:00
Mike Hommey
80cec70afd Bug 1686646 - Don't set NODEJS in mozconfigs. r=firefox-build-system-reviewers,dmajor
The code in nodeutil.py, used by configure, already looks in MOZ_FETCHES_DIR.

Differential Revision: https://phabricator.services.mozilla.com/D101712
2021-01-15 04:25:53 +00:00
Mike Hommey
2989908f9d Bug 1686646 - Remove TOOLTOOL_DIR from mozconfigs where it is unused. r=firefox-build-system-reviewers,dmajor
Differential Revision: https://phabricator.services.mozilla.com/D101711
2021-01-15 04:25:45 +00:00
Mike Hommey
a9c5e28258 Bug 1480005 - Move NM to python configure. r=firefox-build-system-reviewers,nalexander
There is only one place where it's used:
config/check_vanilla_allocations.py, which is only executed from
js/src/build/Makefile.in on the condition that the build is targeting
Linux and not LTO. But the LTO test is actually outdated, because we
don't build with `-flto`, but `-flto=thin`, so the exclusion doesn't
work anymore.

There is however no AC_CHECK_PROG, and we currently rely on NM to be
given, or fall back to "nm", which works in most cases, except LTO with
clang. It works on CI because in LTO builds we explicitly set NM to
llvm-nm (which can output symbols from LLVM bitcode objects), but we
could also do that automatically.

So we add a full detection of nm/llvm-nm to python configure, and limit
it to Linux, since we only ever use it there.

Differential Revision: https://phabricator.services.mozilla.com/D101681
2021-01-14 20:17:08 +00:00
Mike Hommey
3a558130b5 Bug 1480005 - Remove check for RANLIB. r=firefox-build-system-reviewers,nalexander
It hasn't been used since bug 569597 and bug 1295937.

Differential Revision: https://phabricator.services.mozilla.com/D101680
2021-01-14 03:40:45 +00:00
Mike Hommey
647145eef9 Bug 1480005 - Look for llvm-ar for AR when compiling with clang. r=firefox-build-system-reviewers,nalexander
And stop setting AR to llvm-ar in mozconfigs.

Differential Revision: https://phabricator.services.mozilla.com/D101679
2021-01-14 03:41:39 +00:00
Mike Hommey
a160c92089 Bug 1480005 - Always use llvm-lib when targetting Windows. r=firefox-build-system-reviewers,dmajor
The linker is always lld-link, as we don't support MSVC anymore, so the
fallback to "lib" is never used.

Differential Revision: https://phabricator.services.mozilla.com/D101678
2021-01-14 15:41:30 +00:00
Rob Wu
2506b7584c Bug 1680862 - Use fixed cwd in old.configure for m4 includes r=mhentges
js/src/aclocal.m4 contains includes starting with `../../`.
As explained in https://bugzilla.mozilla.org/show_bug.cgi?id=1680862#c8,
m4 will first try to resolve this path relative to the working directory
and only if that path doesn't exists, fall back to the location set by
`localdir` (from `-I`).

The working directory is usually MOZ_OBJDIR, an immediate subdirectory
of topsrcdir, so `../../` resolves to a location outside of topsrcdir.
Usually, that path does not exist, and m4 falls back to `localdir` that
was passed via `-I`.

But if that path existed and is incompatible with the current Gecko
checkout, then the build will fail (see bug report). To prevent this
from happening, this patch fixes the working directory to `localdir`,
so that m4 will immediately find the expected file.

Differential Revision: https://phabricator.services.mozilla.com/D101500
2021-01-14 18:15:12 +00:00
Aki Sasaki
d409537a62 Bug 1686615 - replace pgo certs. r=kjacobs
via `./mach python build/pgo/genpgocert.py` per https://bugzilla.mozilla.org/show_bug.cgi?id=1525191#c1

Differential Revision: https://phabricator.services.mozilla.com/D101697
2021-01-14 17:35:18 +00:00
David Major
23d6295ae9 Bug 1686516 - Remove unused files clang-win64.json and clang-win64-2stage.json r=firefox-build-system-reviewers,mhentges DONTBUILD
I missed these in bug 1682405.

Additionally, after this removal, llvmorg-10-init-5191-ga84b200e604-windows-pgo.patch also becomes unused, so it is deleted too.

Differential Revision: https://phabricator.services.mozilla.com/D101633
2021-01-13 19:17:04 +00:00
Mitchell Hentges
82dd2c68f0 Bug 1686279: Support Python 3.6 with glean_parser r=sheehan
glean_parser depends on `iso8601`, but only on Python <= 3.6.
Add the `iso8601` hash to our frozen dependency hash list accordingly.

Differential Revision: https://phabricator.services.mozilla.com/D101494
2021-01-12 21:36:11 +00:00
Mitchell Hentges
e7b2115e00 Bug 1685353: Disable -Woverloaded-virtual for GCC r=firefox-build-system-reviewers,sheehan,andi,glandium
In addition to warning on regular methods overloading virtual functions,
GCC also watches for static functions doing such overloads.
:andi confirmed that this is not valuable, so the warning is being
disabled for GCC.

Differential Revision: https://phabricator.services.mozilla.com/D101367
2021-01-12 14:18:22 +00:00
Mitchell Hentges
34e20029c0 Bug 1683213: Don't warn on range-loop-analysis r=sheehan,sg,firefox-build-system-reviewers,andi,glandium
As described in
https://quuxplusone.github.io/blog/2020/08/26/wrange-loop-analysis/
range-loop-analysis warnings sometimes recommend inferior code.

Also removes pragmas that manually disable this warning.

Differential Revision: https://phabricator.services.mozilla.com/D100155
2021-01-11 15:30:45 +00:00
Mike Hommey
96dd8d7fd7 Bug 1685599 - Remove now unused macosx64-clang-9 and linux64-clang-9-macosx-cross toolchains. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D101081
2021-01-08 18:51:53 +00:00
Mike Hommey
b9cdcbef46 Bug 1685599 - Build llvm-symbolizer separately. r=firefox-build-system-reviewers,mhentges
Only sanitizer builds require a native llvm-symbolizer executable.
Ideally, we'd build llvm-symbolizer from scratch, which would be faster,
but for now, let's go the easy route and just extract it from the
corresponding native clang builds.

We don't actually do anything with the llvm-symbolizer executable on
android builds, so we don't install it in $FINAL_TARGET, avoilding
the dependency on android builds (plus, we actually don't have an
android-native llvm-symbolizer, so even if it were already shipped, it
would be the wrong file).

Differential Revision: https://phabricator.services.mozilla.com/D101076
2021-01-08 18:51:52 +00:00
Ryan VanderMeulen
7f6a58e1d3 Bug 1685788 - Add AArch64 as a supported architecture for macOS. r=sylvestre DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D101211
2021-01-08 20:05:03 +00:00
Connor Sheehan
0005a8060d Bug 1684914: stop passing -flto=thin to gcc since it doesn't actually work r=glandium,mhentges
Passing `-flto=thin` worked previously but the value passed was just ignored
and full lto was performed. On newer versions of gcc passing an unknown value
causes failure. So this commit checks if `-flto=thin` is passed and fails with
an error message if so, else full lto is enabled if any other value is passed.

Differential Revision: https://phabricator.services.mozilla.com/D100953
2021-01-08 15:54:54 +00:00
Razvan Maries
891da67475 Backed out 6 changesets (bug 1685599) for WR bustages. CLOSED TREE
Backed out changeset 29eab2f84c77 (bug 1685599)
Backed out changeset 2839d8d39881 (bug 1685599)
Backed out changeset 3ba2f1c048c3 (bug 1685599)
Backed out changeset c7d4ecfc689a (bug 1685599)
Backed out changeset 5483ce4f5f4c (bug 1685599)
Backed out changeset 68fa5ecf205c (bug 1685599)
2021-01-08 09:04:37 +02:00
Sylvestre Ledru
fe296c0858 Bug 1588710 - stack-clash-protection: enable when clang 11.0.1 is used r=firefox-build-system-reviewers,glandium
Differential Revision: https://phabricator.services.mozilla.com/D99759
2021-01-08 02:39:50 +00:00
Mike Hommey
cf3c69ebe4 Bug 1685034 - Add the task-id to the clang version. r=dmajor
Differential Revision: https://phabricator.services.mozilla.com/D100875
2021-01-07 17:07:15 +00:00
Mike Hommey
c3d2cb844a Bug 1685599 - Remove now unused macosx64-clang-9 and linux64-clang-9-macosx-cross toolchains. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D101081
2021-01-08 00:33:35 +00:00
Mike Hommey
3128330c17 Bug 1685599 - Build llvm-symbolizer separately. r=firefox-build-system-reviewers,mhentges
Only sanitizer builds require a native llvm-symbolizer executable.
Ideally, we'd build llvm-symbolizer from scratch, which would be faster,
but for now, let's go the easy route and just extract it from the
corresponding native clang builds.

We don't actually do anything with the llvm-symbolizer executable on
android builds, so we don't install it in $FINAL_TARGET, avoilding
the dependency on android builds (plus, we actually don't have an
android-native llvm-symbolizer, so even if it were already shipped, it
would be the wrong file).

Differential Revision: https://phabricator.services.mozilla.com/D101076
2021-01-07 23:53:19 +00:00
Sylvestre Ledru
760d13f141 Bug 1588710 - Linux/Android: enable -fstack-clash-protection r=tjr,firefox-build-system-reviewers,glandium
This is a new feature in clang (already existing in gcc) provided from version 11.

Not usefull on Mac & Windows and is supported on intel cpu + ppc64 + s390x
https://releases.llvm.org/11.0.0/tools/clang/docs/ReleaseNotes.html#new-compiler-flags

Fedora/Redhat would like to have this option to move from gcc to clang in these
distros.

More on this:
https://blog.qualys.com/vulnerabilities-research/2017/06/19/the-stack-clash
https://pagure.io/fesco/issue/2020
https://reviews.llvm.org/D68720
https://www.phoronix.com/scan.php?page=news_item&px=LLVM-Stack-Clash-Protection-20

It seems that the performance impact is neglible:
https://treeherder.mozilla.org/perfherder/compare?originalProject=try&originalRevision=a47c98b909b61035dae2e1e00883f2ade0fef129&newProject=try&newRevision=62108fa48bd15fe01f1a0f1ffab133af9b4207cc&framework=13

Differential Revision: https://phabricator.services.mozilla.com/D95999
2021-01-07 16:40:09 +00:00
David Major
180d35da9f Bug 1685335 - Update to clang 11.0.1 r=firefox-build-system-reviewers,static-analysis-reviewers,andi,mhentges,sylvestre
In addition to the usual dot-release type of fixes, this also lets us drop a good amount of code that we had patched into our clang 11.

Differential Revision: https://phabricator.services.mozilla.com/D100959
2021-01-07 13:53:53 +00:00
Kartik Gautam
7ae6aea145 Bug 1684173 - Add newline character at end of files when missing r=sylvestre,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D100484
2021-01-07 08:53:08 +00:00
David Major
767a9abd46 Bug 1685165 - Support clang-12 in TestNoRefcountedInsideLambdas.cpp r=static-analysis-reviewers,andi
clang-12 has gained some additional remarks for these code patterns.

Differential Revision: https://phabricator.services.mozilla.com/D100820
2021-01-05 21:47:22 +00:00
Markus Stange
504e820dc5 Bug 1685177 - Update sccache-dist documentation for new config file path. r=mhentges
The config file location on macOS recently changed from `~/Library/Preferences/Mozilla.sccache/config`
to `~/Library/Application Support/Mozilla.sccache/config`, see https://github.com/mozilla/sccache/issues/919.

Differential Revision: https://phabricator.services.mozilla.com/D100822
2021-01-05 22:15:14 +00:00
Andi-Bogdan Postelnicu
8de41d8d26 Bug 1683561 - Make accessibility buildable outside of unified-build environment. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D100212
2021-01-05 09:47:12 +00:00
Bogdan Tara
0f44fec2ac Backed out changeset 9d5f4c9e6fdf (bug 1683213) for nsReadableUtils related bustage CLOSED TREE 2021-01-04 17:44:33 +02:00
Mitchell Hentges
e370b9e0e8 Bug 1677994: Clarify that configure executes progs without using shell r=firefox-build-system-reviewers,dmajor,glandium
Some distros include flags when they specify the location of a binary,
such as: `XARGS=xargs -r`.
This was confusing in `configure`, since:
* We require that environment variables contain only path
  overrides (without flags).
* The error message thrown when configure chokes was unclear: "why
  would `$ xargs -r` fail?"

This patch should make our "path-only" requirement more clear.

Differential Revision: https://phabricator.services.mozilla.com/D100044
2021-01-04 15:18:33 +00:00
Mitchell Hentges
08adbab5c3 Bug 1683213: Don't warn on range-loop-analysis for clang < 10 r=sheehan,sg,firefox-build-system-reviewers,andi,glandium
Old clang shakes its fist when `auto&& item : range` is used with a
range
that returns values instead of references.
Modern `clang` doesn't warn for this scenario, so we disable the
warning.

Also removes pragmas that manually disable this warning.

Differential Revision: https://phabricator.services.mozilla.com/D100155
2021-01-04 15:15:46 +00:00
Andi-Bogdan Postelnicu
0fd4f87a0c Bug 1683557 - Make image buildable outside of unified-build environment. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D100211
2021-01-04 14:20:22 +00:00
Andi-Bogdan Postelnicu
d5cca8c6ff Bug 1683553 - Make hal buildable outside of unified-build environment. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D100210
2021-01-04 14:20:19 +00:00
Andi-Bogdan Postelnicu
7b246e293f Bug 1683551 - Make gfx buildable outside of unified-build environment. r=sg,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D100209
2021-01-04 14:20:17 +00:00
Andi-Bogdan Postelnicu
8f28b5cf01 Bug 1683540 - Make extensions buildable outside of unified-build environment. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D100208
2021-01-04 14:18:58 +00:00
Andi-Bogdan Postelnicu
b6b336c821 Bug 1683534 - Make editor buildable outside of unified-build environment. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D100206
2021-01-04 14:18:50 +00:00
Andi-Bogdan Postelnicu
8dcc17a525 Bug 1683532 - Make docshell buildable outside of unified-build environment. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D100205
2021-01-04 14:18:37 +00:00
Emilio Cobos Álvarez
6f642487cb Bug 1684380 - Fix some configure error code paths. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D100508
2020-12-29 04:24:49 +00:00
Emilio Cobos Álvarez
78414576b9 Bug 1684350 - Update cbindgen to 0.16.0. r=andi
I was waiting for a better reason to do this, because the cbindgen
changes from 0.15.0 to 0.16.0 don't break trunk builds. But since
downstream has updated (see bug 1684180) and there's no reason not to,
let's do this to avoid future churn.

Differential Revision: https://phabricator.services.mozilla.com/D100499
2020-12-28 13:42:06 +00:00
Cosmin Sabou
2978aa00a3 Backed out changeset dbed1cdf588f (bug 1684173) for mochitest plain and devtools failures. a=backout DONTBUILD 2020-12-28 00:43:51 +02:00
Kartik Gautam
775cdec032 Bug 1684173 - Add newline character at end of files when missing r=sylvestre
Depends on D100443

Differential Revision: https://phabricator.services.mozilla.com/D100484
2020-12-27 11:43:41 +00:00