Граф коммитов

9762 Коммитов

Автор SHA1 Сообщение Дата
Csoregi Natalia 63a9b1da37 Backed out changeset 333391f911e5 (bug 1602482) for toolchains bustage. CLOSED TREE 2021-02-12 18:14:44 +02:00
Calixte Denizet 169e0b5a38 Bug 1602482 - Remove use of ___custom_llvm_gcov_flush r=marco,dmajor
Because of conflicts between gcov_flush from gcc and the one from llvm, we renamed llvm one into ___custom_llvm_gcov_flush.
Since we switched to clang for linux ccov builds, this workaround is now useless.

Differential Revision: https://phabricator.services.mozilla.com/D104990
2021-02-12 14:45:24 +00:00
Mike Hommey 27dfa198c6 Bug 1685764 - Switch all tasks using the cross-releng tooltool manifest to the corresponding toolchain task. r=firefox-build-system-reviewers,dmajor
In the case of toolchain tasks, the tooltool download script already
extracted the SDK in $MOZ_FETCHES_DIR, so no adjustment was required.
Only a Firefox mozconfig needs adaptation.

Differential Revision: https://phabricator.services.mozilla.com/D104646
2021-02-11 22:06:20 +00:00
David Major 1499c8a490 Bug 1692234 - Allow new pass manager with ubsan on clang 10.0.1+ r=firefox-build-system-reviewers,mhentges
The hang in 10.0.0 was fixed in trunk 11 and backported to 10.0.1.

Differential Revision: https://phabricator.services.mozilla.com/D104836
2021-02-11 17:13:09 +00:00
Mike Hommey a7b2fb4104 Bug 1691865 - Clean up stdc++compat after bug 1634204. r=firefox-build-system-reviewers,dmajor
Bug 1634204 bumped the maximum version of symbols allowed in our
dependency upon libstdc++, which effectively makes some of the
stdc++compat code dead. We can now remove it.

Differential Revision: https://phabricator.services.mozilla.com/D104617
2021-02-10 21:14:52 +00:00
Mike Hommey 7ae7a72a38 Bug 1690937 - Build clang itself using a sysroot. r=firefox-build-system-reviewers,sheehan,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D104128
2021-02-09 00:44:01 +00:00
Mike Hommey d1be2e98e1 Bug 1690934 - Adjust clang for use with sysroots. r=firefox-build-system-reviewers,sheehan,mhentges
When using the --sysroot argument to clang, clang changes where it
searches for libraries in its own directory, and excludes the lib and
lib32 subdirectories. So we need to move the gcc files to a place where
it does look (and that it also looks without --sysroot).

We however still keep a copy of libstdc++ in the lib directory for
runtime purposes.

Differential Revision: https://phabricator.services.mozilla.com/D104123
2021-02-08 20:06:40 +00:00
Mike Hommey 4e004f1b25 Bug 1690757 - Build the clang aarch64 cross toolchain as a repack of clang + compiler-rt. r=firefox-build-system-reviewers,andi,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D104013
2021-02-04 14:52:00 +00:00
Cosmin Sabou 39960420a1 Bug 1686114 - Lint fix on build-clang.py. a=lint-fix 2021-01-29 15:43:10 +02:00
Tom Ritter 7aba583f22 Bug 1686114: Fix build-clang.py's --skip-checkout argument r=glandium DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D101397
2021-01-13 22:49:52 +00:00
Mike Hommey 49a54d790b Bug 1689284 - Default to opt-level=2 for Rust code. r=firefox-build-system-reviewers,sheehan,mhentges
We used to only push to opt-level=2 on --enable-release builds, to make
local builds faster with opt-level=1. Years later, it seems opt-level=2 makes no noticeable
difference in build times vs. opt-level=1, neither on my Threadripper
workstation at -j64 or my M1 Macbook Air at -j4.

That's one less difference to carry.

Differential Revision: https://phabricator.services.mozilla.com/D103266
2021-01-28 16:47:37 +00:00
Kevin Jacobs f9716bc8ab Bug 1688685 - land NSS 92dcda94c1d4 UPGRADE_NSS_RELEASE, r=bbeurdouche
2021-01-22  Kevin Jacobs  <kjacobs@mozilla.com>

	* automation/abi-check/previous-nss-release, lib/nss/nss.h,
	lib/softoken/softkver.h, lib/util/nssutil.h:
	Set version numbers to 3.62 Beta
	[680ec01577b9]

2021-01-23  Kevin Jacobs  <kjacobs@mozilla.com>

	* tests/chains/scenarios/nameconstraints.cfg,
	tests/libpkix/certs/NameConstraints.ipaca.cert,
	tests/libpkix/certs/NameConstraints.ocsp1.cert:
	Bug 1686134 - Renew two chains libpkix test certificates. r=rrelyea

	[3ddcd845704c]

2021-01-25  Kevin Jacobs  <kjacobs@mozilla.com>

	* gtests/common/testvectors/hpke-vectors.h,
	gtests/pk11_gtest/pk11_hpke_unittest.cc, lib/pk11wrap/pk11hpke.c,
	lib/pk11wrap/pk11hpke.h, lib/pk11wrap/pk11pub.h:
	Bug 1678398 - Update HPKE to draft-07. r=mt

	This patch updates HPKE to draft-07. A few other minor changes are
	included:
	- Refactor HPKE gtests for increased parameterized testing.
	- Replace memcpy calls with PORT_Memcpy
	- Serialization tweaks to make way for context Export/Import (D99277).

	This should not be landed without an ECH update, as fixed ECH test
	vectors will otherwise fail to decrypt.

	[e0bf8cadadc7]

	* automation/abi-check/expected-report-libnss3.so.txt,
	gtests/pk11_gtest/pk11_hpke_unittest.cc, lib/nss/nss.def,
	lib/pk11wrap/pk11hpke.c, lib/pk11wrap/pk11pub.h:
	Bug 1678398 - Add Export/Import functions for HPKE context. r=mt

	This patch adds and exports two new HPKE functions:
	`PK11_HPKE_ExportContext` and `PK11_HPKE_ImportContext`, which are
	used to export a serialized HPKE context, then later reimport that
	context and resume Open and Export operations. Only receiver
	contexts are currently supported for export (see the rationale in
	pk11pub.h).

	One other change introduced here is that `PK11_HPKE_GetEncapPubKey`
	now works as expected on the receiver side.

	If the `wrapKey` argument is provided to the Export/Import
	functions, then the symmetric keys are wrapped with AES Key Wrap
	with Padding (SP800-38F, 6.3) prior to serialization.

	[8bcd12ab3b34]

	* automation/abi-check/expected-report-libssl3.so.txt,
	gtests/ssl_gtest/libssl_internals.c,
	gtests/ssl_gtest/libssl_internals.h,
	gtests/ssl_gtest/ssl_extension_unittest.cc,
	gtests/ssl_gtest/tls_ech_unittest.cc, lib/ssl/ssl3con.c,
	lib/ssl/ssl3ext.c, lib/ssl/ssl3ext.h, lib/ssl/sslexp.h,
	lib/ssl/sslimpl.h, lib/ssl/sslsecur.c, lib/ssl/sslsock.c,
	lib/ssl/sslt.h, lib/ssl/tls13con.c, lib/ssl/tls13con.h,
	lib/ssl/tls13ech.c, lib/ssl/tls13ech.h, lib/ssl/tls13exthandle.c,
	lib/ssl/tls13exthandle.h, lib/ssl/tls13hashstate.c,
	lib/ssl/tls13hashstate.h:
	Bug 1681585 - Update ECH to Draft-09. r=mt

	This patch updates ECH implementation to draft-09. Changes of note
	are:

	- Acceptance signal derivation is now based on the handshake secret.
	- `config_id` hint changes from 32B to 8B, trial decryption added on
	the server.
	- Duplicate code in HRR cookie handling has been consolidated into
	`tls13_HandleHrrCookie`.
	- `ech_is_inner` extension is added, which causes a server to indicate
	ECH acceptance.
	- Per the above, support signaling ECH acceptance when acting as a
	backend server in split-mode (i.e. when there is no other local
	Encrypted Client Hello state).

	[ed07a2e2a124]

2021-01-24  Kevin Jacobs  <kjacobs@mozilla.com>

	* cmd/selfserv/selfserv.c:
	Bug 1681585 - Add ECH support to selfserv. r=mt

	Usage example: mkdir dbdir && cd dbdir certutil -N -d . certutil -S
	-s "CN=ech-public.com" -n ech-public.com -x -t "C,C,C" -m 1234 -d .
	certutil -S -s "CN=ech-private-backend.com" -n ech-private-
	backend.com -x -t "C,C,C" -m 2345 -d . ../dist/Debug/bin/selfserv -a
	ech-public.com -a ech-private-backend.com -n ech-public.com -n ech-
	private-backend.com -p 8443 -d dbdir/ -X publicname:ech-public.com
	(Copy echconfig from selfserv output and paste into the below
	command) ../dist/Debug/bin/tstclnt -D -p 8443 -v -A
	tests/ssl/sslreq.dat -h ech-private-backend.com -o -N <echconfig> -v

	[92dcda94c1d4]

Differential Revision: https://phabricator.services.mozilla.com/D102982
2021-01-26 15:30:01 +00:00
Nick Alexander 3d0d39d82c Bug 1675848 - Part 2: Add "BackgroundTasksSelector" to static component category registration. r=mhentges,nika
For simplicity, this implements just on in `NO_TASKS` (the default) or
on in `ALL_TASKS` (opt-in).  This disables all category registrations
when in background task mode; we'll selectively re-enable things as
appropriate.

The flag constants were chosen to smoothly extend to a (16-)bit set in
the future, should we want to add a `JUST_TASKS("task", "other-task")`
option in the future.

This also adds ython tests for gen_static_components.py exercising
categories, simply 'cuz it's easiest to see what this adds in such
tests.  Functional tests will follow in patches that actually
implement the new background tasks functionality.

Differential Revision: https://phabricator.services.mozilla.com/D96654
2021-01-25 23:44:49 +00:00
David Major bc943f076f Bug 1688292 - Fix non-unified build errors in netwerk/cache2/ r=necko-reviewers,valentin
This is a drive-by fix while I was looking into something else.

Differential Revision: https://phabricator.services.mozilla.com/D102795
2021-01-25 12:23:13 +00:00
Daniel Le 7f474f9d91 Bug 1684672 - Update mentions of macOS SDK v10.11 to v10.12. r=glandium DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D100591
2021-01-21 12:47:01 +00:00
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
Kevin Jacobs 1eb47f6133 Bug 1684061 - land NSS 97ef009f7a78 UPGRADE_NSS_RELEASE, r=bbeurdouche
2020-12-11  Kevin Jacobs  <kjacobs@mozilla.com>

	* automation/abi-check/expected-report-libssl3.so.txt, automation/abi-
	check/previous-nss-release, lib/nss/nss.h, lib/softoken/softkver.h,
	lib/util/nssutil.h:
	Set version numbers to 3.61 Beta
	[f277d2674c80]

	* gtests/<...>
	Bug 1677207 - Update Google Test to release-1.10.0 r=bbeurdouche

	./gtests/google_test/update.sh release-1.10.0 && hg remove -A && hg
	add gtests/google_test/*

	[89141382df45]

	* gtests/<...>
	Bug 1677207 - Replace references to TestCase, which is deprecated,
	with TestSuite r=bbeurdouche

	grep -rl --exclude-dir=google_test INSTANTIATE_TEST_CASE_P gtests |
	xargs sed -i '' s/INSTANTIATE_TEST_CASE_P/INSTANTIATE_TEST_SUITE_P/g
	grep -rl --exclude-dir=google_test SetUpTestCase gtests | xargs sed
	-i '' s/SetUpTestCase/SetUpTestSuite/g

	[e15b78be87fa]

	* gtests/ssl_gtest/ssl_ciphersuite_unittest.cc,
	gtests/ssl_gtest/ssl_debug_env_unittest.cc,
	gtests/ssl_gtest/ssl_extension_unittest.cc,
	gtests/ssl_gtest/ssl_loopback_unittest.cc,
	gtests/ssl_gtest/ssl_renegotiation_unittest.cc,
	gtests/ssl_gtest/ssl_resumption_unittest.cc,
	gtests/ssl_gtest/ssl_version_unittest.cc,
	gtests/ssl_gtest/tls_ech_unittest.cc:
	Bug 1677207 - Use GTEST_SKIP in ssl_gtests. r=bbeurdouche

	[0772f1bf5fd6]

2020-12-17  Robert Relyea  <rrelyea@redhat.com>

	* gtests/common/testvectors/ike-aesxcbc-vectors.h,
	gtests/common/testvectors/ike-sha1-vectors.h,
	gtests/common/testvectors/ike-sha256-vectors.h,
	gtests/common/testvectors/ike-sha384-vectors.h,
	gtests/common/testvectors/ike-sha512-vectors.h,
	gtests/common/testvectors_base/test-structs.h,
	gtests/pk11_gtest/manifest.mn, gtests/pk11_gtest/pk11_gtest.gyp,
	gtests/pk11_gtest/pk11_ike_unittest.cc, lib/softoken/sftkike.c:
	Bug 1682071 IKE Quick mode IPSEC give you incorrect keys if you are
	asking for keys smaller than the hash size.

	IKE Appendix B fixes.

	This patch fixes 2 problems.

	 If you run either ike v1 App B or quick mode asking for a key with
	length

	mod macsize = 0, you will generate an extra block that's not used
	and overwrites the end of the buffer.

	 If you use quick mode, the function incorrectly subsets the
	existing key

	rather than generating a new key. This is correct behavior for
	Appendix B, where appendix B is trying to take a generated key and
	create a new longer key (with no diversification, just transform the
	key into something that's longer), so if you ask for a key less than
	or equal to, then you want to just subset the original key. In quick
	mode you are taking a base key and creating a set of new keys based
	on additional data, so you want to subset the generated data. This
	patch only subsets the original key if you aren't doing quickmode.

	Full test vectors have now been added for all ike modes in this
	patch as well (previously we depended on the FIPS CAVS tests to test
	ike, which covers basic IKEv1, IKEv1_psk, and IKEv2 but not IKEv1
	App B and IKE v1 Quick mode).

	[f4995c9fa185]

2020-12-18  Robert Relyea  <rrelyea@redhat.com>

	* gtests/common/testvectors/rsa_pkcs1_2048_test-vectors.h,
	gtests/common/testvectors/rsa_pkcs1_3072_test-vectors.h,
	gtests/common/testvectors/rsa_pkcs1_4096_test-vectors.h,
	gtests/freebl_gtest/Makefile, gtests/freebl_gtest/manifest.mn,
	gtests/freebl_gtest/rsa_unittest.cc, gtests/manifest.mn,
	gtests/pk11_gtest/pk11_rsaencrypt_unittest.cc,
	gtests/pk11_gtest/pk11_rsaoaep_unittest.cc, lib/freebl/alghmac.c,
	lib/freebl/alghmac.h, lib/freebl/rsapkcs.c:
	Bug 1651411 New tlsfuzzer code can still detect timing issues in RSA
	operations.

	This patch defeats Bleichenbacher by not trying to hide the size of
	the decrypted text, but to hide if the text succeeded for failed.
	This is done by generating a fake returned text that's based on the
	key and the cipher text, so the fake data is always the same for the
	same key and cipher text. Both the length and the plain text are
	generated with a prf.

	Here's the proposed spec the patch codes to:

	 1. Use SHA-256 to hash the private exponent encoded as a big-
	endian integer to a string the same length as the public modulus.
	Keep this value secret. (this is just an optimisation so that the
	implementation doesn't have to serialise the key over and over
	again) 2. Check the length of input according to step one of
	https://tools.ietf.org/html/rfc8017#section-7.2.2 3. When provided
	with a ciphertext, use SHA-256 HMAC(key=hash_from_step1,
	text=ciphertext) to generate the key derivation key 4. Use SHA-256
	HMAC with key derivation key as the key and a two-byte big- endian
	iterator concatenated with byte string "length" with the big- endian
	representation of 2048 (0x0800) as the bit length of the generated
	string.
	      - Iterate this PRF 8 times to generate a 256 byte string 5. initialise
	the length of synthetic message to 0 6. split the PRF output into 2
	byte strings, convert into big-endian integers, zero- out high-order
	bits so that they have the same bit length as the octet length of
	the maximum acceptable message size (k-11), select the last integer
	that is no larger than (k-11) or remain at 0 if no integer is
	smaller than (k-11); this selection needs to be performed using a
	side-channel free operators 7. Use SHA-256 HMAC with key derivation
	key as the key and a two-byte big-endian iterator concatenated with
	byte string "message" with the big-endian representation of k*8
	      - use this PRF to generate k bytes of output (right-truncate last HMAC
	call if the number of generated bytes is not a multiple of SHA-256
	output size) 8. perform the RSA decryption as described in step 2 of
	section 7.2.2 of rfc8017 9. Verify the EM message padding as
	described in step 3 of section 7.2.2 of rfc8017, but instead of
	outputting "decryption error", return the last l bytes of the
	"message" PRF, when l is the selected synthetic message length using
	the "length" PRF, make this decision and copy using side-channel
	free operation

	[fc05574c7399]

2020-12-22  Robert Relyea  <rrelyea@redhat.com>

	* gtests/freebl_gtest/rsa_unittest.cc,
	gtests/pk11_gtest/pk11_rsaoaep_unittest.cc, lib/freebl/alghmac.c,
	lib/freebl/rsapkcs.c:
	Restore lost portion of the bleichenbacher timing batch that
	addressed review comments. All the review comments pertained to
	actual code comments, so this patch only affects the comments.
	[fcebe146314e]

2020-12-22  Kevin Jacobs  <kjacobs@mozilla.com>

	* lib/dev/devslot.c:
	Bug 1682863 - Revert nssSlot_IsTokenPresent to 3.58 after ongoing Fx
	hangs with slow PKCS11 devices. r=bbeurdouche

	This patch reverts the `nssSlot_IsTokenPresent` changes made in bug
	1663661 and bug 1679290, restoring the version used in NSS 3.58 and
	earlier. It's not an actual `hg backout` because the comment in
	lib/dev/devt.h is worth keeping. While removing the nested locking
	did resolve the hang for some (most?) third-party modules, problems
	remain with some slower tokens after an even further relaxation of
	the locking, which defeats the purpose of addressing the races in
	the first place.

	The crash addressed by these patches was caused by the Intermediate
	Preloading Healer in Firefox, which has been disabled. We clearly
	have insufficient test coverage for third-party modules, and now
	that osclientcerts is enabled in Fx Nightly, any problems caused by
	these and similar changes is unlikely to be reported until Fx Beta,
	well after NSS RTM. I think the best option at this point is to
	simply revert NSS.

	[97ef009f7a78] [tip]

Differential Revision: https://phabricator.services.mozilla.com/D100401
2020-12-23 19:54:31 +00:00
James Graham b0ee167ce1 Bug 1683161 - Update mach venv path to include pywebsocket, r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D100054
2020-12-17 21:37:56 +00:00
David Major a70c653eb4 Bug 1681540 - Regenerate linker order files, December 2020 edition r=firefox-build-system-reviewers,mhentges
Since bug 1632542 we have a new major clang version, several new versions worth of rustc, new pass manager during LTO, and of course eight months worth of code change. Time for a refresh. Same process as the earlier bug.

Differential Revision: https://phabricator.services.mozilla.com/D99243
2020-12-17 18:24:50 +00:00
Tarek Ziadé 4c874857ed Bug 1682829 - Automate a fuzzing smoke test in the CI r=decoder
Adds a smoke test script we can use in the CI to smoke test Firefox prior to
bigger tests.

Differential Revision: https://phabricator.services.mozilla.com/D100008
2020-12-17 13:22:16 +00:00
Connor Sheehan 7e2347b01a Bug 1681560: install native packages using requirements files with pinned hashes r=firefox-build-system-reviewers,mhentges
At the moment installing Python packages with native code is done by calling
`pip install <package>` and does not enforce any SHA hash for installed
dependencies, nor does it enforce a specific version to be installed.

This commit adds `requirements.in` and `requirements.txt` files for native
packages and changes these packages to be installed by running `pip install`
and passing the requirements file for the package. This allows us to pin the
SHA of the various dependencies. The `.txt` files are generated using
`pip-compile`.

We also add the new requirements files to the sparse profile for `mach`.

Differential Revision: https://phabricator.services.mozilla.com/D99912
2020-12-16 21:02:02 +00:00
Sebastian Hengst a3e7021190 Backed out 2 changesets (bug 1588710) for frequent crashes on Linux x64 debug affecting Try pushes (bug 1679994). a=backout
Backed out changeset f0b02db01894 (bug 1588710)
Backed out changeset e45001cddaf4 (bug 1588710)
2020-12-16 11:58:47 +01:00
Dave Townsend dca627418f Bug 1682608: Allow building with macOS SDK 11.1. r=mhentges
Differential Revision: https://phabricator.services.mozilla.com/D99819
2020-12-15 23:45:06 +00:00
David Major e169ac43d1 Bug 1682611 - Update clang-plugin for removal of ast_type_traits namespace in clang 12 r=static-analysis-reviewers,andi
In clang 11, the contents of `ast_type_traits` were moved to the `clang` namespace, but forwarders were kept to give a grace period for downstreams.

In this week's clang 12, the forwarders have been removed, and our builds will break.

Thanks to upstream kindly allowed this transition period, we can simply do the rename now to prepare for clang 12, and existing clang 11 builds still work.

Differential Revision: https://phabricator.services.mozilla.com/D99817
2020-12-15 19:30:51 +00:00
David Major 43a2ab175a Bug 1682405 - Clean up unused clang toolchains (mostly clang-9) r=firefox-build-system-reviewers,mhentges
At this point it's pretty clear that we won't be reverting to clang-9.

This doesn't remove everything with clang-9 in the name. I did a mark-and-sweep GC by hand so this only removes unused entries. Some are still active, e.g. linux64-clang-9 is used to build a number of misc helper tools.

Differential Revision: https://phabricator.services.mozilla.com/D99721
2020-12-15 17:46:10 +00:00
Kartik Gautam f7ffcd09fb Bug 1679758 - Remove trailing empty lines r=sylvestre,marionette-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D99595
2020-12-15 10:34:54 +00:00
David Major 1fe4ed4c98 Bug 1682345 - Mention LLVM's build guide in toolchains.rst r=Gankro DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D99702
2020-12-14 18:30:22 +00:00
Chris H-C a0efcbcf74 Bug 1673660 - C++ and JS API for Glean Custom Pings r=janerik,webidl,smaug
Covers adding the new JS global `GleanPings` for JS, the new structs for C++ at
mozilla::glean_pings, ping-id and string-table-index codegen, the usual
boilerplate for JS and C++ stuff, and tests.

Unresolved:
* What happens if we call this on a non-parent process?
  (This isn't a supported mode of operation)

Differential Revision: https://phabricator.services.mozilla.com/D98671
2020-12-14 16:50:07 +00:00
Dragana Damjanovic 96b916ebe1 Bug 1682262 - Update neqo to 0.4.18 and bindgen to 0.56 r=necko-reviewers,emilio,valentin
Differential Revision: https://phabricator.services.mozilla.com/D99665
2020-12-14 18:38:49 +00:00
Sylvestre Ledru e69fa3515b 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
2020-12-14 16:02:52 +00:00
Sylvestre Ledru 5ee117be90 Bug 1588710 - Add missing upstream llvm patch to fix alloc(0) r=firefox-build-system-reviewers,dmajor
From upstream repo:
a1e0363c7402f7aa58e24e0e6dfa447ebabc1910 to bbe6cbbed8c7460a7e8477373b9250543362e771

Differential Revision: https://phabricator.services.mozilla.com/D99681
2020-12-14 16:02:52 +00:00
Dimi Lee 2f037f6fb4 Bug 1582499 - P3. Test insecure warning is not shown when the url of top-level and iframe are both local ip r=sfoster
Depends on D99042

Differential Revision: https://phabricator.services.mozilla.com/D99043
2020-12-09 10:46:36 +00:00
Dorel Luca 7320ae982a Backed out changeset f3aaf04fce3b (bug 1679758) for Devtool failures in browser_styleeditor_syncAddProperty.js. CLOSED TREE 2020-12-13 16:38:21 +02:00
Kartik Gautam caf549c200 Bug 1679758 - Remove trailing empty lines r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D99595
2020-12-13 13:28:30 +00:00
Razvan Maries 0bcf81557b Merge autoland to mozilla-central a=merge 2020-12-11 11:32:14 +02:00
Razvan Maries 3651e41fe4 Backed out 2 changesets (bug 1675676) for sending crash reports on wrong host. a=backout DONTBUILD
Backed out changeset 2bfbb6e4c5dd (bug 1675676)
Backed out changeset bee2ef0fc0e7 (bug 1675676)
2020-12-11 11:22:27 +02:00
Mike Hommey d79dcf5161 Bug 1623520 - Switch Windows asan and fuzzing builds to cross-builds. r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D79417
2020-12-11 05:06:12 +00:00
David Major af9e11f761 Bug 1623520 - Add the asan unpoison patch to clang-cl-2stage r=firefox-build-system-reviewers,glandium
This is needed for cross-compiled win64-asan builds.

Differential Revision: https://phabricator.services.mozilla.com/D99411
2020-12-11 05:06:12 +00:00
Christian Holler a0ed2c7425 Bug 1680837 - Fix libFuzzer gyp flags for nICEr. r=dmajor
The gyp flag logic in nICEr is supposed to ensure that the code is instrumented
for libFuzzer because we have a related fuzzing target. However, libFuzzer
instrumentation must be completely disabled for TSan due to incompatibility.
The current logic fails in doing so and incorrectly falls back to legacy
trace-pc instrumentation causing the TSan fuzzing build to fail on startup.

Differential Revision: https://phabricator.services.mozilla.com/D99351
2020-12-10 18:29:11 +00:00
Butkovits Atila e405e7af27 Bug 1675676- Lint fix. a=fix. CLOSED TREE 2020-12-10 09:44:21 +02:00
Edmund Wong d9f8f4beaa Bug 1675676 - Add --with-crashreporter-url for ac_add_options to allow specifying alternative crash-stats server url. r=glandium,gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D96322
2020-12-08 11:38:38 +00:00
Mike Hommey a5ae57fe22 Bug 1681441 - Update valgrind package to Debian's 3.16.1. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D99182
2020-12-09 15:50:05 +00:00
David Major 56fdf285db Bug 1681582 - Disable Rust CFG on aarch64-windows r=firefox-build-system-reviewers,mhentges
This is bug 1639318 all over again except from Rust rather than C++. It's the same symptom, nsXPTCStub vtables aren't marked as valid targets.

In the earlier bug we disabled CFG for C++ on ARM64. Let's do the same for Rust. According to that bug, "It's not clear why this doesn't happen on x86 builds. Given priorities, I can't really justify investigating this, although I suspect that fixing the underlying issue would be pretty much bug 1483885."

Differential Revision: https://phabricator.services.mozilla.com/D99278
2020-12-10 01:27:38 +00:00
Mike Hommey 2dd02bb64b Bug 1681406 - Require 10.12 SDK for the build. r=firefox-build-system-reviewers,dmajor
Bug 1680152 updated automation to use the 10.12 SDK, and shortly after,
bug 1678174 introduced a change that broke the build with the 10.11 SDK.
Considering we haven't actually supported running on macos 10.11 and
earlier since Firefox 79, and that still supporting building with the
10.11 SDK would mean adding and maintaining code that, in practice,
would never be used by users, I think it is fair at this point that we
just drop support for the 10.11 SDK entirely.

Differential Revision: https://phabricator.services.mozilla.com/D99181
2020-12-09 13:26:36 +00:00
Alexis Beingessner c7d78f4a93 Bug 1680124 - add example patch file for rust builds. r=dmajor
This is step 1 to make the docs here better, as discussed. Another followup
will come in a day or two to update the text/links of the docs to refer to
this and the latest version of repack-rust.

Differential Revision: https://phabricator.services.mozilla.com/D99128
2020-12-08 19:53:17 +00:00
Tom Ritter 9293bfdb80 Bug 1677797 - Change autoconf to avoid using a hard-coded file descriptor r=glandium
In Bug 1671424 we changed the way we configure firefox and it broke the codeql database
generation job.	This job wraps the entire build	process	in a way similar to
  codeql --command="./mach build"

Specifically, the previous way we executed the configure shell script made codeql
disable itself because it was named configure (codeql disables itself during
configuration.)

codeql injects via LD_PRELOAD, and it opens a configuration file and a logging file
(getting fd 3 and 4 respectively.)

autoconf grabs file descriptor 4 and uses it a temporary redirection point either
to a file or stdout. When it does so, it closes	the original file descriptor 4 and
points it at the new location, which also affects the codeql code, resulting in
undesired logging output going into the configure script.

Because this file descriptor trick is only used to avoid duplicating a few lines of
code, I removed the trick and duplicated the code.

Differential Revision: https://phabricator.services.mozilla.com/D98642
2020-12-08 22:04:09 +00:00
Markus Stange 14e860be47 Bug 1680557 - Suggest more concrete paths to .mozbuild on Windows. r=mhentges DONTBUILD
This matches the other paths further down in the same document.
I'm also adding some quotes because I was getting an "unknown target" error without them, but I'm not sure if the missing quotes were the reason or whether it just happened to succeed on the next try.

Depends on D98673

Differential Revision: https://phabricator.services.mozilla.com/D98674
2020-12-07 16:56:30 +00:00
Markus Stange 13075b5579 Bug 1680557 - Suggest `SCCACHE_START_SERVER=1` instead of `--start-server` because `--start-server` spawns and detaches a separate server process. r=mhentges DONTBUILD
See https://github.com/mozilla/sccache/issues/772#issuecomment-639058251 .

Differential Revision: https://phabricator.services.mozilla.com/D98673
2020-12-07 16:56:26 +00:00
David Major 30f8312443 Bug 1680826 - Update MSVC compat version in build-clang.py r=firefox-build-system-reviewers,mhentges
In https://reviews.llvm.org/D92515, clang-12 bumps the build requirement to MSVC version 19.14.

We've already updated well past that (most recently bug 1485224) but build-clang.py never got the memo.

Differential Revision: https://phabricator.services.mozilla.com/D98806
2020-12-04 20:43:30 +00:00
David Major 6cacd7d64b Bug 1632866 - Enable Control Flow Guard for Rust r=nalexander
This flag has been stabilized as of rust 1.47.0.

Differential Revision: https://phabricator.services.mozilla.com/D94128
2020-12-04 17:38:28 +00:00
Emilio Cobos Álvarez 04229a0075 Bug 1680080 - Optimize proc macros / build dependencies. r=glandium,firefox-build-system-reviewers,mhentges
On a very parallel debug build, I see a long time just waiting for
bindgen / style compilation / geckoservo.

Turns out that a bunch of this is just proc macros / build scripts.

Optimizing it saves between 10 and 17 seconds of my debug build. We
might want to consider running bindgen much like cbindgen rather than
rebuilding it all the time, which should help a lot more, but my guess
is that this should still help with the pretty hot custom derives that
the style crate runs.

This needs rust 1.41, so the requirement for tools/crashreporter needs
to be bumped as a consequence. To make things simpler, it was bumped
to 1.47 while we're at it.

Differential Revision: https://phabricator.services.mozilla.com/D98366
2020-12-04 01:35:51 +00:00
Bogdan Tara 5669c53aa8 Merge mozilla-central to autoland a=merge 2020-12-03 06:57:18 +02:00
Cosmin Sabou 642f3833de Backed out changeset abafe6c923eb (bug 1588710) for frequently causing tests to fail on Try (bug 1679994. a=backout 2020-12-03 01:16:03 +02:00
Mike Hommey 5bfd115c9a Bug 1680152 - Fixup: Bump deployment target to 10.12 when building clang.
Differential Revision: https://phabricator.services.mozilla.com/D98544
2020-12-02 22:43:11 +00:00
Mike Hommey 12679da6a0 Bug 1680152 - Bump macos SDK to 10.12. r=spohl,firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D98421
2020-12-02 21:50:28 +00:00
Mike Hommey f1d7e7f48c Bug 1680152 - Bump macos deployment target to 10.12. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D98404
2020-12-02 12:45:54 +00:00
David Major 87237b867f Bug 1680057 - New PM LTO: Don't take the elif block on Windows r=firefox-build-system-reviewers,mhentges
Windows being Windows, with its own spellings for everything, let's stay within the WINNT block regardless of whether we meet the compiler requirement.

Differential Revision: https://phabricator.services.mozilla.com/D98355
2020-12-02 17:02:01 +00:00
David Major df33d22907 Bug 1680126 - Remove unused if-constexpr patches to clang-tidy r=firefox-build-system-reviewers,mhentges DONTBUILD
These files were orphaned by bug 1625884.

Differential Revision: https://phabricator.services.mozilla.com/D98389
2020-12-02 07:53:57 +00:00
Mike Hommey 72cc842ad5 Bug 1671545 - Require at least rustc 1.47.0 to build. r=firefox-build-system-reviewers,dmajor
And remove the rust 1.43 toolchain, now it's not used anymore.

Differential Revision: https://phabricator.services.mozilla.com/D93733
2020-12-02 00:01:56 +00:00
Alexis Beingessner e2c5b3cbbe Bug 1680124 - Document Rust builds (and add some pointers/links for clang ones). r=dmajor
Differential Revision: https://phabricator.services.mozilla.com/D98386
2020-12-01 23:55:34 +00:00
Mitchell Hentges f785b29cf3 Bug 1680051: Ignore error when removing old psutil directory r=firefox-build-system-reviewers,dmajor
Don't fail to run all mach commands when old psutil directory
cannot be removed.

Glandium mentioned that there shouldn't be any negative effects from the
old directory lingering.

Differential Revision: https://phabricator.services.mozilla.com/D98352
2020-12-01 17:40:10 +00:00
Andrew Osmond 5edd4fabe8 Bug 1678917 - Make glxtest fail more gracefully. r=rmader
If we encounter a single error in glxtest, we typically bail immediately
with one liner message. This patch makes it put more effort into
returning what information it is able to, as well as the current error
messages. If certain errors are correlated to specific devices, it would
be useful if we had the information to make the connection.

Differential Revision: https://phabricator.services.mozilla.com/D97861
2020-12-01 11:52:14 +00:00
Sylvestre Ledru 0d6e8b2156 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
2020-12-01 08:01:41 +00:00
David Major 80a968491f Bug 1679845 - Check linker instead of OS target for LTO new pass manager check r=glandium
Per request in D97372

Differential Revision: https://phabricator.services.mozilla.com/D98215
2020-12-01 04:33:19 +00:00
Sylvestre Ledru 042903ae82 Bug 1588710 - clang stack clash - Cherry-pick an upstream fix r=firefox-build-system-reviewers,mhentges,dmajor
See https://bugs.llvm.org/show_bug.cgi?id=48007#c6

-----
Fix limit behavior of dynamic alloca

When the allocation size is 0, we shouldn't probe. Within [1,  PAGE_SIZE], we
should probe once etc.

This fixes https://bugs.llvm.org/show_bug.cgi?id=47657

(cherry picked from commit 9573c9f2a363da71b2c07a3add4e52721e6028a0)

Also contains the patches:
aac36687f7
bbe6cbbed8

These 3 patches have been merged in the 11 branch
and should be part of the 11.0.1 release
-----

Differential Revision: https://phabricator.services.mozilla.com/D97566
2020-11-30 16:41:20 +00:00
Ricky Stewart d2ecfce0a4 Bug 1666347 - Delete assorted dead code after removal of vendored `psutil` r=firefox-build-system-reviewers,rstewart
Most of the deletions here come from bug 1481612, the `--with-windows-wheel` option to `mach vendor python`, which according to that commit message "is very single-purpose: it's intended to let us vendor an unpacked
wheel for psutil on Windows". Since vendoring `psutil` is something we're no longer doing, we can safely just delete that added code.

Differential Revision: https://phabricator.services.mozilla.com/D90919
2020-11-27 16:21:07 +00:00
Ricky Stewart 34344a8073 Bug 1661624 - Include `psutil` in the `mach` `virtualenv`s r=firefox-build-system-reviewers,rstewart
Install `psutil` when setting up the `mach` `virtualenv`s and stop importing the in-tree version in the build.

Nothing in-tree currently assumes or mandates the installation of `psutil` (all uses of `psutil` are guarded with imports of the form `try : import psutil; except ImportError: psutil = None`), so there's no back-incompatibility concerns here. There will be an awkward period where telemetry will be lacking CPU/disk data for everyone until they re-run `mach bootstrap` or `mach create-mach-environment`, but that will come back as people gradually update their `virtualenv`s.

An alternative to circumvent that issue is REQUIRING that `psutil` be installed by adding an assertion in `mach` that `psutil` can be found (allowing us to remove all the conditional logic in-tree around whether `psutil` is installed), but I wouldn't claim that we're ready to do that and deal with whatever fallout might occur.

Differential Revision: https://phabricator.services.mozilla.com/D90914
2020-11-27 21:05:00 +00:00
David Major 8f8ea43ab6 Bug 1677742 - Followups for new pass manager LTO r=glandium
Code review followups for 1675600: Restrict the use of new pass manager during LTO to builds where we're using the new pass manager in general, and (on Windows) where lld-link is new enough to understand the flag.

Differential Revision: https://phabricator.services.mozilla.com/D97372
2020-11-21 02:13:04 +00:00
Mike Hommey be6372ad52 Bug 1678154 - Only set --target=arm64-apple-darwin when building with Xcode clang. r=firefox-build-system-reviewers,dmajor
Upstream clang supports --target=aarch64-apple-darwin, and that matches
what config.sub canonicalizes to, and thus what the default toolchain
prefix ends up being, so it's better to use aarch64-apple-darwin when
not compiling with Xcode clang.

Differential Revision: https://phabricator.services.mozilla.com/D97698
2020-11-20 02:12:51 +00:00
Mike Hommey c90e00940b Bug 1678291 - Default to 11.0 as the macos target for aarch64. r=firefox-build-system-reviewers,mhentges
There is no earlier SDK that supports it. It seems Xcode clang doesn't
care (maybe it defaults to 11.0 is MACOSX_DEPLOYMENT_TARGET is too low?),
but upstream clang does.

Differential Revision: https://phabricator.services.mozilla.com/D97565
2020-11-19 19:21:02 +00:00
Mike Hommey 18704e0274 Bug 1678291 - Default to use private frameworks from the SDK. r=firefox-build-system-reviewers,mhentges
And don't set it via mozconfig. The default to /System/Library/PrivateFrameworks
may also not have matched the used SDK previously, so the new default is
better.

Differential Revision: https://phabricator.services.mozilla.com/D97564
2020-11-19 20:25:20 +00:00
Mike Hommey f68de9784d Bug 1678291 - Don't set BINDGEN_CFLAGS in mac mozconfig. r=firefox-build-system-reviewers,mhentges
This hasn't been necessary since bug 1526857.

Differential Revision: https://phabricator.services.mozilla.com/D97563
2020-11-19 15:40:55 +00:00
Kevin Jacobs 54a13dccf2 Bug 1677548 - land NSS 3eacb92e9adf UPGRADE_NSS_RELEASE, r=jcj
2020-11-18  Kevin Jacobs  <kjacobs@mozilla.com>

	* lib/ssl/ssl3con.c, lib/ssl/tls13con.c, lib/ssl/tls13ech.c:
	Bug 1654332 - Fixup a10493dcfcc9: copy ECHConfig.config_id with
	socket r=jcj

	A late review change for ECH was for the server to compute each
	ECHConfig `config_id` when set to the socket, rather than on each
	connection. This works, but now we also need to copy that config_id
	when copying a socket, else the server won't find a matching
	ECHConfig to use for decryption.

	[3eacb92e9adf] [tip]

2020-11-17  Kevin Jacobs  <kjacobs@mozilla.com>

	* automation/abi-check/expected-report-libssl3.so.txt,
	cmd/tstclnt/tstclnt.c, cpputil/tls_parser.h,
	gtests/ssl_gtest/libssl_internals.c,
	gtests/ssl_gtest/libssl_internals.h, gtests/ssl_gtest/manifest.mn,
	gtests/ssl_gtest/ssl_auth_unittest.cc,
	gtests/ssl_gtest/ssl_custext_unittest.cc,
	gtests/ssl_gtest/ssl_extension_unittest.cc,
	gtests/ssl_gtest/ssl_gtest.gyp,
	gtests/ssl_gtest/ssl_tls13compat_unittest.cc,
	gtests/ssl_gtest/tls_agent.cc, gtests/ssl_gtest/tls_agent.h,
	gtests/ssl_gtest/tls_connect.cc, gtests/ssl_gtest/tls_connect.h,
	gtests/ssl_gtest/tls_ech_unittest.cc,
	gtests/ssl_gtest/tls_esni_unittest.cc,
	gtests/ssl_gtest/tls_filter.cc, gtests/ssl_gtest/tls_filter.h,
	lib/ssl/SSLerrs.h, lib/ssl/manifest.mn, lib/ssl/ssl.gyp,
	lib/ssl/ssl3con.c, lib/ssl/ssl3ext.c, lib/ssl/ssl3ext.h,
	lib/ssl/ssl3exthandle.c, lib/ssl/ssl3exthandle.h,
	lib/ssl/ssl3prot.h, lib/ssl/sslencode.c, lib/ssl/sslencode.h,
	lib/ssl/sslerr.h, lib/ssl/sslexp.h, lib/ssl/sslimpl.h,
	lib/ssl/sslinfo.c, lib/ssl/sslsecur.c, lib/ssl/sslsock.c,
	lib/ssl/sslt.h, lib/ssl/tls13con.c, lib/ssl/tls13con.h,
	lib/ssl/tls13ech.c, lib/ssl/tls13ech.h, lib/ssl/tls13esni.c,
	lib/ssl/tls13esni.h, lib/ssl/tls13exthandle.c,
	lib/ssl/tls13exthandle.h, lib/ssl/tls13hashstate.c,
	lib/ssl/tls13hashstate.h:
	Bug 1654332 - Update ESNI to draft-08 (ECH). r=mt

	This patch adds support for Encrypted Client Hello (draft-ietf-tls-
	esni-08), replacing the existing ESNI (draft -02) support.

	There are five new experimental functions to enable this:

	 - SSL_EncodeEchConfig: Generates an encoded (not BASE64) ECHConfig
	given a set of parameters.
	  - SSL_SetClientEchConfigs: Configures the provided ECHConfig to the
	given socket. When configured, an ephemeral HPKE keypair will be
	generated for the CH encryption.
	  - SSL_SetServerEchConfigs: Configures the provided ECHConfig and
	keypair to the socket. The keypair specified will be used for HPKE
	operations in order to decrypt encrypted Client Hellos as they are
	received.
	  - SSL_GetEchRetryConfigs: If ECH is rejected by the server and
	compatible retry_configs are provided, this API allows the
	application to extract those retry_configs for use in a new
	connection.
	  - SSL_EnableTls13GreaseEch: When enabled, non-ECH Client Hellos will
	have a "GREASE ECH" (i.e. fake) extension appended. GREASE ECH is
	disabled by default, as there are known compatibility issues that
	will be addressed in a subsequent draft.

	The following ESNI experimental functions are deprecated by this
	update:

	 - SSL_EncodeESNIKeys
	  - SSL_EnableESNI
	  - SSL_SetESNIKeyPair

	 In order to be used, NSS must be compiled with
	`NSS_ENABLE_DRAFT_HPKE` defined.

	[a10493dcfcc9]

	* lib/ssl/ssl3con.c, lib/ssl/sslencode.c, lib/ssl/sslencode.h,
	lib/ssl/tls13con.c, lib/ssl/tls13con.h:
	Bug 1654332 - Buffered ClientHello construction. r=mt

	This patch refactors construction of Client Hello messages. Instead
	of each component of the message being written separately into
	`ss->sec.ci.sendBuf`, we now construct the message in its own
	sslBuffer. Once complete, the entire message is added to the sendBuf
	via `ssl3_AppendHandshake`.

	`ssl3_SendServerHello` already uses this approach and it becomes
	necessary for ECH, where we use the constructed ClientHello to
	create an inner ClientHello.

	[d40121ba59ba]

2020-11-13  J.C. Jones  <jjones@mozilla.com>

	* automation/abi-check/expected-report-libnss3.so.txt, automation/abi-
	check/expected-report-libnssutil3.so.txt, automation/abi-check
	/previous-nss-release, lib/nss/nss.h, lib/softoken/softkver.h,
	lib/util/nssutil.h:
	Set version numbers to 3.60 Beta
	[5e7b37609f22]

Differential Revision: https://phabricator.services.mozilla.com/D97492
2020-11-19 18:28:18 +00:00
Kris Wright 410eb5ffc8 Bug 1676906 - Remove unnecessary names in ThreadAllows.txt r=andi
Sometimes thread names bit rot in the list because there is no checker in place to ensure they are still active. The threads I removed have either:
	-Been converted to use the background thread pool
	-Been removed entirely
	-Been renamed
And they no longer require entries in the list.

Differential Revision: https://phabricator.services.mozilla.com/D96846
2020-11-19 16:00:56 +00:00
David Major c1d61912d3 Bug 1677839 - Re-allow new pass manager on aarch64-windows builds r=firefox-build-system-reviewers,mhentges
The SEH unwind info problem no longer happens because nowadays bug 1631929 prevents the code pattern that led to it. I've confirmed that bug 1626951's bustage doesn't come back, both in regular and beta-simulation builds.

This cleanup will allow me to reverse the dependency in bug 1677742 and have `lto` depend on `new_pass_manager_flags`.

Differential Revision: https://phabricator.services.mozilla.com/D97362
2020-11-17 22:25:32 +00:00
Mike Hommey abd6c007c3 Bug 1677651 - Report exact version of clang for last known Xcode. r=firefox-build-system-reviewers,mhentges
Currently, we report "10.0.0.or.more" for the latest release of Xcode,
but we know it's 10.0.0 for sure, which is when the clang version
reported by Xcode is exactly 12.0.0. We know that in the past a bump of
LLVM has always been accompanied with a bump of the minor version, so we
expect no LLVM version bump until at least 12.0.1.

Differential Revision: https://phabricator.services.mozilla.com/D97241
2020-11-17 15:56:31 +00:00
Andi-Bogdan Postelnicu e9fbba867c Bug 1666550 - Update `clang-tools` to `clang-11`. r=dmajor
Differential Revision: https://phabricator.services.mozilla.com/D97137
2020-11-17 15:04:14 +00:00
Andi-Bogdan Postelnicu aac5ac29dc Bug 1626555 - Add `dom/xul` to the list of non-unified-build-compatible directories. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D97197
2020-11-17 09:28:10 +00:00
David Major c7dcbe9387 Bug 1675600 - Use the new pass manager during LTO r=firefox-build-system-reviewers,glandium
Currently, in LTO builds, we use the new pass manager during the initial translation to bitcode but not for the final optimization during linking.

On Linux, we can enable the new pass manager during LTO with a plugin option. I've landed a patch upstream to allow it on Windows as well, which is included here.

Switching the pass manager brings speed improvements on its own, but it also reduces code size by ~6%, which we can use a portion of as budget to increase the import limit (via the hot multiplier) for even more speed improvements.

Differential Revision: https://phabricator.services.mozilla.com/D96108
2020-11-17 04:07:54 +00:00
Andi-Bogdan Postelnicu 927d2292fd Bug 1626555 - Add `dom/xlst` to the list of non-unified-build-compatible directories. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D97192
2020-11-16 19:57:48 +00:00
Andi-Bogdan Postelnicu ce6a5ee2f7 Bug 1626555 - Add `dom/xml` to the list of non-unified-build-compatible directories. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D97191
2020-11-16 19:57:45 +00:00
Andi-Bogdan Postelnicu 25816ebd9a Bug 1626555 - Add `dom/xhr` to the list of non-unified-build-compatible directories. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D97187
2020-11-16 19:57:35 +00:00
Andi-Bogdan Postelnicu 0c905d6304 Bug 1626555 - Add `dom/worklet` to the list of non-unified-build-compatible directories. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D97175
2020-11-16 19:57:25 +00:00
Andi-Bogdan Postelnicu 65e3d61d13 Bug 1626555 - Add `dom/workers` to the list of non-unified-build-compatible directories. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D97170
2020-11-16 19:57:14 +00:00
Andi-Bogdan Postelnicu 522be9da14 Bug 1626555 - Add `dom/webgpu` to the list of non-unified-build-compatible directories. r=sg,kvark
Differential Revision: https://phabricator.services.mozilla.com/D97166
2020-11-16 19:57:04 +00:00
Noemi Erli f24bd4fcff Backed out 4 changesets (bug 1666345, bug 1661624, bug 1667152, bug 1666347) for causing mochitest failures CLOSED TREE
Backed out changeset 8ce536574e74 (bug 1666347)
Backed out changeset 7cc5b13a3bf6 (bug 1666345)
Backed out changeset e112876ba18b (bug 1661624)
Backed out changeset 0f03ce337449 (bug 1667152)
2020-11-16 21:06:12 +02:00
Ricky Stewart 96400f472d Bug 1666347 - Delete assorted dead code after removal of vendored `psutil` r=firefox-build-system-reviewers,mhentges
Most of the deletions here come from bug 1481612, the `--with-windows-wheel` option to `mach vendor python`, which according to that commit message "is very single-purpose: it's intended to let us vendor an unpacked
wheel for psutil on Windows". Since vendoring `psutil` is something we're no longer doing, we can safely just delete that added code.

Differential Revision: https://phabricator.services.mozilla.com/D90919
2020-11-13 19:18:03 +00:00
Ricky Stewart d8119e6288 Bug 1661624 - Include `psutil` in the `mach` `virtualenv`s r=firefox-build-system-reviewers,mhentges
Install `psutil` when setting up the `mach` `virtualenv`s and stop importing the in-tree version in the build.

Nothing in-tree currently assumes or mandates the installation of `psutil` (all uses of `psutil` are guarded with imports of the form `try : import psutil; except ImportError: psutil = None`), so there's no back-incompatibility concerns here. There will be an awkward period where telemetry will be lacking CPU/disk data for everyone until they re-run `mach bootstrap` or `mach create-mach-environment`, but that will come back as people gradually update their `virtualenv`s.

An alternative to circumvent that issue is REQUIRING that `psutil` be installed by adding an assertion in `mach` that `psutil` can be found (allowing us to remove all the conditional logic in-tree around whether `psutil` is installed), but I wouldn't claim that we're ready to do that and deal with whatever fallout might occur.

Differential Revision: https://phabricator.services.mozilla.com/D90914
2020-11-13 20:21:45 +00:00
Razvan Maries bd8ba64c9d Backed out 2 changesets (bug 1626555) as per Andi's request. CLOSED TREE
Backed out changeset 22e23d9340a2 (bug 1626555)
Backed out changeset 02ea10ade875 (bug 1626555)
2020-11-16 18:45:15 +02:00
Andi-Bogdan Postelnicu 2b26dd3b3b Bug 1626555 - Add `dom/workers` to the list of non-unified-build-compatible directories. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D97170
2020-11-16 15:56:30 +00:00
Andi-Bogdan Postelnicu 575adf71a5 Bug 1626555 - Add `dom/webgpu` to the list of non-unified-build-compatible directories. r=sg,kvark
Differential Revision: https://phabricator.services.mozilla.com/D97166
2020-11-16 15:37:09 +00:00
Andi-Bogdan Postelnicu bfa29c9f3f Bug 1626555 - Add `dom/websocket` to the list of non-unified-build-compatible directories. r=sg
Depends on D97121

Differential Revision: https://phabricator.services.mozilla.com/D97122
2020-11-16 10:23:00 +00:00
Andi-Bogdan Postelnicu c3630ad787 Bug 1626555 - Add `dom/webshare` to the list of non-unified-build-compatible directories. r=sg
Depends on D97120

Differential Revision: https://phabricator.services.mozilla.com/D97121
2020-11-16 10:22:47 +00:00
Andi-Bogdan Postelnicu 9259dbc890 Bug 1626555 - Add `dom/webidl` to the list of non-unified-build-compatible directories. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D97120
2020-11-16 10:22:34 +00:00
David Major 864a71324c Bug 1677147 - Update build-clang.py for "llvmbuildectomy" r=firefox-build-system-reviewers,mhentges
A recent change upstream [0] removed llvm-build, so we can't test for its files anymore.

[0] 9218ff50f9

Differential Revision: https://phabricator.services.mozilla.com/D97017
2020-11-14 03:15:54 +00:00
Mihai Alexandru Michis 06103d0e92 Backed out 3 changesets (bug 1666345, bug 1667152, bug 1661624) for causing mochitest timeouts.
CLOSED TREE

Backed out changeset baa1f7a615e4 (bug 1666345)
Backed out changeset b6646baa866d (bug 1661624)
Backed out changeset e4d550db6037 (bug 1667152)
2020-11-13 22:14:45 +02:00
Mihai Alexandru Michis 57a979f85c Backed out changeset d1dd480fd638 (bug 1666347) for causing mochitest timeouts. 2020-11-13 21:13:25 +02:00
Mitchell Hentges 967783d0db Bug 1676915: Add documentation page about Unified Builds r=firefox-build-system-reviewers,mstange,dmajor DONTBUILD
Describe what unified builds are and how they can cause innocuous
changes to cause unexpected compilation failures.

Differential Revision: https://phabricator.services.mozilla.com/D96907
2020-11-13 17:16:33 +00:00
Ricky Stewart 22ac8c5585 Bug 1666347 - Delete assorted dead code after removal of vendored `psutil` r=firefox-build-system-reviewers,mhentges
Most of the deletions here come from bug 1481612, the `--with-windows-wheel` option to `mach vendor python`, which according to that commit message "is very single-purpose: it's intended to let us vendor an unpacked
wheel for psutil on Windows". Since vendoring `psutil` is something we're no longer doing, we can safely just delete that added code.

Differential Revision: https://phabricator.services.mozilla.com/D90919
2020-11-12 18:02:10 +00:00
Ricky Stewart 69321f149f Bug 1661624 - Include `psutil` in the `mach` `virtualenv`s r=firefox-build-system-reviewers,mhentges
Install `psutil` when setting up the `mach` `virtualenv`s and stop importing the in-tree version in the build.

Nothing in-tree currently assumes or mandates the installation of `psutil` (all uses of `psutil` are guarded with imports of the form `try : import psutil; except ImportError: psutil = None`), so there's no back-incompatibility concerns here. There will be an awkward period where telemetry will be lacking CPU/disk data for everyone until they re-run `mach bootstrap` or `mach create-mach-environment`, but that will come back as people gradually update their `virtualenv`s.

An alternative to circumvent that issue is REQUIRING that `psutil` be installed by adding an assertion in `mach` that `psutil` can be found (allowing us to remove all the conditional logic in-tree around whether `psutil` is installed), but I wouldn't claim that we're ready to do that and deal with whatever fallout might occur.

Differential Revision: https://phabricator.services.mozilla.com/D90914
2020-11-13 03:03:33 +00:00
Mitchell Hentges eef15c6006 Bug 1676951: Improve "on Windows" * 2 sentence r=smacleod DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D96904
2020-11-12 20:39:19 +00:00
smolnar 1e6e466d99 Backed out 4 changesets (bug 1666347, bug 1667152, bug 1661624, bug 1666345) for causing mingw bustage. CLOSED TREE
Backed out changeset 19f707f5c097 (bug 1666347)
Backed out changeset 3732ee259759 (bug 1666345)
Backed out changeset 353d3c9e74b9 (bug 1661624)
Backed out changeset a651515586a8 (bug 1667152)
2020-11-12 19:55:58 +02:00
Ricky Stewart 15a9bfbe36 Bug 1666347 - Delete assorted dead code after removal of vendored `psutil` r=firefox-build-system-reviewers,mhentges
Most of the deletions here come from bug 1481612, the `--with-windows-wheel` option to `mach vendor python`, which according to that commit message "is very single-purpose: it's intended to let us vendor an unpacked
wheel for psutil on Windows". Since vendoring `psutil` is something we're no longer doing, we can safely just delete that added code.

Differential Revision: https://phabricator.services.mozilla.com/D90919
2020-10-27 21:15:08 +00:00
Ricky Stewart 55f90afcca Bug 1661624 - Include `psutil` in the `mach` `virtualenv`s r=firefox-build-system-reviewers,mhentges
Install `psutil` when setting up the `mach` `virtualenv`s and stop importing the in-tree version in the build.

Nothing in-tree currently assumes or mandates the installation of `psutil` (all uses of `psutil` are guarded with imports of the form `try : import psutil; except ImportError: psutil = None`), so there's no back-incompatibility concerns here. There will be an awkward period where telemetry will be lacking CPU/disk data for everyone until they re-run `mach bootstrap` or `mach create-mach-environment`, but that will come back as people gradually update their `virtualenv`s.

An alternative to circumvent that issue is REQUIRING that `psutil` be installed by adding an assertion in `mach` that `psutil` can be found (allowing us to remove all the conditional logic in-tree around whether `psutil` is installed), but I wouldn't claim that we're ready to do that and deal with whatever fallout might occur.

Differential Revision: https://phabricator.services.mozilla.com/D90914
2020-11-12 15:58:05 +00:00
David Major 02b04550c6 Bug 1676669 - Trim some context on downgrade-mangling-error.patch for clang-12 r=firefox-build-system-reviewers,rstewart
Some of the surrounding lines recently changed so the patch refuses to apply. We can live with less context so I'd rather trim it than make a new clang-12 version of this patch.

Differential Revision: https://phabricator.services.mozilla.com/D96725
2020-11-11 16:19:25 +00:00
Sylvestre Ledru c7deb74f61 Bug 1670807 - Look for gm4 in addition to m4 r=firefox-build-system-reviewers,rstewart
Differential Revision: https://phabricator.services.mozilla.com/D94305
2020-11-10 19:19:31 +00:00
Butkovits Atila 5e745619d9 Backed out changeset f38410c45877 (bug 1670807) for linting failures. CLOSED TREE 2020-11-10 20:37:44 +02:00
Sylvestre Ledru 8340ccd1e1 Bug 1670807 - Look for gm4 in addition to m4 r=firefox-build-system-reviewers,rstewart
Differential Revision: https://phabricator.services.mozilla.com/D94305
2020-11-10 18:05:58 +00:00
Andi-Bogdan Postelnicu 6121332b48 Bug 1626555 - Add `dom/webbrowserpersist` to the list of non-unified-build-compatible directories. r=sg
Depends on D96590

Differential Revision: https://phabricator.services.mozilla.com/D96593
2020-11-10 16:18:01 +00:00
Andi-Bogdan Postelnicu 649fe4a141 Bug 1626555 - Add `dom/webauthn` to the list of non-unified-build-compatible directories. r=sg
Depends on D96586

Differential Revision: https://phabricator.services.mozilla.com/D96590
2020-11-10 16:32:16 +00:00
Andi-Bogdan Postelnicu 265193a613 Bug 1626555 - Add `dom/vr` to the list of non-unified-build-compatible directories. r=sg
Depends on D96573

Differential Revision: https://phabricator.services.mozilla.com/D96586
2020-11-10 16:08:48 +00:00
Andi-Bogdan Postelnicu 446acb4cea Bug 1626555 - Add `dom/url` to the list of non-unified-build-compatible directories. r=sg
Depends on D96572

Differential Revision: https://phabricator.services.mozilla.com/D96573
2020-11-10 13:43:07 +00:00
Andi-Bogdan Postelnicu ff9bb66d6f Bug 1626555 - Add `dom/u2f` to the list of non-unified-build-compatible directories. r=sg
Depends on D96571

Differential Revision: https://phabricator.services.mozilla.com/D96572
2020-11-10 13:43:05 +00:00
Andi-Bogdan Postelnicu 9c73ee47bf Bug 1626555 - Add `dom/tests` to the list of non-unified-build-compatible directories. r=sg
Depends on D96570

Differential Revision: https://phabricator.services.mozilla.com/D96571
2020-11-10 13:42:06 +00:00
Andi-Bogdan Postelnicu 3e53bbe010 Bug 1626555 - Add `dom/system` to the list of non-unified-build-compatible directories. r=sg
Depends on D96569

Differential Revision: https://phabricator.services.mozilla.com/D96570
2020-11-10 13:41:58 +00:00
Andi-Bogdan Postelnicu b9bd386da7 Bug 1626555 - Add `dom/svg` to the list of non-unified-build-compatible directories. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D96569
2020-11-10 13:44:03 +00:00
Emilio Cobos Álvarez 440671e906 Bug 1676307 - Search for sccache in the toolchain search path. r=firefox-build-system-reviewers,mhentges
So that ac_add_options --with-ccache=sccache just works.

Differential Revision: https://phabricator.services.mozilla.com/D96501
2020-11-10 13:11:49 +00:00
Emilio Cobos Álvarez 1fe5a936f7 Bug 1676307 - Move compiler wrapper config after toolchain search path definition. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D96500
2020-11-10 12:54:10 +00:00
Bogdan Tara 1bda053029 Backed out 2 changesets (bug 1676307) for stackwalk related bustage CLOSED TREE
Backed out changeset 3b7922a9af19 (bug 1676307)
Backed out changeset 74e377213d81 (bug 1676307)
2020-11-10 14:42:43 +02:00
Emilio Cobos Álvarez c2b9d3eb7f Bug 1676307 - Search for sccache in the toolchain search path. r=firefox-build-system-reviewers,mhentges
So that ac_add_options --with-ccache=sccache just works.

Differential Revision: https://phabricator.services.mozilla.com/D96501
2020-11-10 12:10:47 +00:00
Emilio Cobos Álvarez 73c892ab3f Bug 1676307 - Move compiler wrapper config after toolchain search path definition. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D96500
2020-11-10 12:09:05 +00:00
Andi-Bogdan Postelnicu 06adde3adb Bug 1626555 - Add `dom/storage` to the list of non-unified-build-compatible directories. r=sg
Depends on D96442

Differential Revision: https://phabricator.services.mozilla.com/D96530
2020-11-10 12:00:30 +00:00
Andi-Bogdan Postelnicu e70abab259 Bug 1626555 - Add `dom/smil` to the list of non-unified-build-compatible directories. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D96442
2020-11-10 11:20:23 +00:00
Andi-Bogdan Postelnicu d81fefc9bc Bug 1626555 - Add `dom/serviceworkers` to the list of non-unified-build-compatible directories. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D96441
2020-11-10 11:55:00 +00:00
Mike Hommey af02c91f37 Bug 1665754 - Setup an Apple silicon macos build. r=firefox-build-system-reviewers,dmajor
Baby steps. This adds an unsigned non-universal Apple silicon-only macos
build.

Differential Revision: https://phabricator.services.mozilla.com/D96339
2020-11-10 08:46:22 +00:00
Mike Hommey cc86146345 Bug 1676290 - Don't use a toolchain prefix when cross-compiling from mac to mac. r=firefox-build-system-reviewers,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D96477
2020-11-09 23:43:56 +00:00
Andi-Bogdan Postelnicu 5e91efd61f Bug 1626555 - Add `dom/security` to the list of non-unified-build-compatible directories. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D96427
2020-11-09 21:03:52 +00:00
Brindusan Cristian ca85f574a0 Backed out changeset 3a087ad91d30 (bug 1626555) for build bustages. CLOSED TREE 2020-11-09 21:09:33 +02:00
Andi-Bogdan Postelnicu 6ffdaf663d Bug 1626555 - Add `dom/security` to the list of non-unified-build-compatible directories. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D96427
2020-11-09 17:57:01 +00:00
Andi-Bogdan Postelnicu 6c639eb537 Bug 1626555 - Add `dom/script` to the list of non-unified-build-compatible directories. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D96401
2020-11-09 16:50:39 +00:00
Andi-Bogdan Postelnicu 04b093b6a4 Bug 1626555 - Add `dom/res` to the list of non-unified-build-compatible directories. r=sg
Depends on D96398

Differential Revision: https://phabricator.services.mozilla.com/D96399
2020-11-09 12:24:01 +00:00
Andi-Bogdan Postelnicu eddf5c3167 Bug 1626555 - Add `dom/reporting` to the list of non-unified-build-compatible directories. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D96398
2020-11-09 12:14:27 +00:00
Mike Hommey af94e85e8d Bug 1675675 - Only put mach_bootstrap paths in PYTHONPATH for mach python --no-virtualenv. r=firefox-build-system-reviewers,rstewart
With PYTHONPATH containing other directories, such as the python ones,
bad things can happen when the python script that is being run then
goes on to subprocess.Popen a python process for a different virtualenv,
or a different version, or whatever.

Differential Revision: https://phabricator.services.mozilla.com/D96155
2020-11-06 17:30:58 +00:00
Andrew Halberstadt 331bc892dd Bug 1675319 - [manifestparser] Properly support multiline skip-if statements, r=jmaher,extension-reviewers,zombie
This supports one manifestparser expression per line in the 'skip-if',
'fail-if' and 'run-if' keys. As a side effect the:

    skip-if = foo ||
        bar

syntax is no longer supported. Instead it can be:

    skip-if =
        foo  # bug 123
        bar  # bug 456

Differential Revision: https://phabricator.services.mozilla.com/D95927
2020-11-05 19:55:08 +00:00
Mitchell Hentges 0bf01c3c96 Bug 1670264: Validate detected Java directory to ensure it's a JDK r=nalexander
Also consolidates bootstrap and configure Java-detection logic so
there's less surprises.

Differential Revision: https://phabricator.services.mozilla.com/D94664
2020-11-03 23:32:43 +00:00
Steve Fink cb4e64b5f5 Bug 1666108 - Eliminate -Wimplicit-function-declaration warnings r=firefox-build-system-reviewers,glandium
Differential Revision: https://phabricator.services.mozilla.com/D95092
2020-11-04 00:54:57 +00:00
Kartikaya Gupta 2fd4f2fc5c Bug 1418001 - Generate analysis for file inclusions. r=asuth,andi
This introduces a new mangled symbol of the form FILE_<hash>. It's defined
on line 1 of each visited source file, and it's referenced in places that
the preprocessor tells us there was an #include. Both angle-bracket includes
and quote includes are supported here.

Differential Revision: https://phabricator.services.mozilla.com/D95529
2020-11-03 15:57:32 +00:00
Kartikaya Gupta a979c5ff70 Bug 1418001 - Refactor to allow visitIdentifier callers to pass a full SourceRange. r=asuth,andi
In the next patch I'll want to be able to provide the entire source rather than
having visitIdentifier just use the token at `Loc`. The existing call sites
create a SourceRange from the SourceLocation and indicate (by not setting the
LocRangeEndValid flag) that the visitIdentifier function should retain it's
old behaviour of using the token to figure out the range.

Depends on D95527

Differential Revision: https://phabricator.services.mozilla.com/D95528
2020-11-02 20:38:37 +00:00
Kartikaya Gupta b28eaef8b0 Bug 1418001 - Refactor to make file type detection more explicit. r=asuth,andi
This extracts a relativizePath function that normalizes a file path to be
relative to the source/objdir, and returns the type of the file.

Differential Revision: https://phabricator.services.mozilla.com/D95527
2020-11-02 20:38:36 +00:00
David Major 5fde4e00e2 Bug 1674907 - Clean up C++17 ifdefs in TestNoRefcountedInsideLambdas.cpp r=static-analysis-reviewers,sg
I'll need to update this file for clang-12, and in order to prevent the need for adding more of these ifdefs, let's just assume they are true and remove the checks. Our codebase has been on C++17 for a while now.

Differential Revision: https://phabricator.services.mozilla.com/D95592
2020-11-03 09:25:50 +00:00
Ricky Stewart 119ff36277 Bug 1674498 - Remove references to `jarsigner` from `configure` and delete the `debug_sign_tool` r=geckoview-reviewers,nalexander,snorp
This is no longer used by Android devs.

Differential Revision: https://phabricator.services.mozilla.com/D95417
2020-11-02 16:50:56 +00:00
Andi-Bogdan Postelnicu e685a3df8c Bug 1626555 - Add `dom/power` to the list of non-unified-build-compatible directories. r=sg
Depends on D95169

Differential Revision: https://phabricator.services.mozilla.com/D95170
2020-10-29 16:22:53 +00:00
Andi-Bogdan Postelnicu 7411bbd17a Bug 1626555 - Add `dom/plugins` to the list of non-unified-build-compatible directories. r=sg
Depends on D95168

Differential Revision: https://phabricator.services.mozilla.com/D95169
2020-10-29 16:22:45 +00:00
Andi-Bogdan Postelnicu b710a4fe2a Bug 1626555 - Add `dom/permission` to the list of non-unified-build-compatible directories. r=sg
Depends on D95167

Differential Revision: https://phabricator.services.mozilla.com/D95168
2020-10-29 16:21:52 +00:00
Andi-Bogdan Postelnicu e10c399e77 Bug 1626555 - Add `dom/performance` to the list of non-unified-build-compatible directories. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D95167
2020-10-29 17:37:02 +00:00
Andi-Bogdan Postelnicu 9495897723 Bug 1626555 - Add `dom/payments` to the list of non-unified-build-compatible directories. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D95155
2020-10-29 16:15:45 +00:00
Andi-Bogdan Postelnicu 89f454c02b Bug 1626555 - Add `dom/{notification, offline}` to the list of non-unified-build-compatible directories. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D95154
2020-10-29 15:21:57 +00:00
Andi-Bogdan Postelnicu fea9419ddc Bug 1626555 - Add `dom/network` to the list of non-unified-build-compatible directories. r=sg
Depends on D95145

Differential Revision: https://phabricator.services.mozilla.com/D95153
2020-10-29 15:21:44 +00:00
Andi-Bogdan Postelnicu 53ece981b4 Bug 1626555 - Add `dom/midi` to the list of non-unified-build-compatible directories. r=sg
Depends on D95137

Differential Revision: https://phabricator.services.mozilla.com/D95145
2020-10-29 15:24:40 +00:00
Andi-Bogdan Postelnicu c952a3b5d0 Bug 1626555 - Add `dom/messagechannel` to the list of non-unified-build-compatible directories. r=sg
Depends on D95057

Differential Revision: https://phabricator.services.mozilla.com/D95137
2020-10-29 14:15:23 +00:00
Andi-Bogdan Postelnicu adc9f3324c Bug 1626555 - Add `dom/media/` to the list of non-unified-build-compatible directories. r=sg
Depends on D95056

Differential Revision: https://phabricator.services.mozilla.com/D95057
2020-10-29 08:56:37 +00:00