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

616 Коммитов

Автор SHA1 Сообщение Дата
Mike Hommey eb3e595496 Bug 1724145 - Set ac_cv_path_AS for old-configure too. r=firefox-build-system-reviewers,andi
There are two different codepaths in old-configure for AS, and one of
them uses ac_cv_prog_AS and the other ac_cv_path_AS. We thus need to set
both.

Differential Revision: https://phabricator.services.mozilla.com/D121828
2021-08-05 08:13:45 +00:00
Mike Hommey 535ec6ed75 Bug 1722442 - Fix the logic that determines when a sysroot was bootstrapped. r=firefox-build-system-reviewers,andi
Bug 1721514 broke what was done in bug 1694884.

Differential Revision: https://phabricator.services.mozilla.com/D120926
2021-07-29 22:23:44 +00:00
Butkovits Atila f746b6734e Bug 1721514 - fix black lint failure CLOSED TREE 2021-07-22 02:48:19 +03:00
Mike Hommey 6f6b4a5e21 Bug 1721514 - Use bootstrapped sysroot when it's there. r=firefox-build-system-reviewers,andi
We do that with everything else (i.e. clang, cbindgen, etc.). We weren't
doing it for sysroots because the support was experimental and the path
was independent of the target, so there was no guarantee that the
sysroot would actually work for the target. As that's not the case
anymore, we can go with more consistency with the bootstrapped
toolchains.

Differential Revision: https://phabricator.services.mozilla.com/D120417
2021-07-21 21:00:14 +00:00
Bob Owen b2d767fbb9 Bug 1716024 p2: Flag all binaries apart from firefox, xpcshell and plugin-container as CET compatible. r=glandium
We will only run the processes in CET compatible modules only mode when not
using the JIT code. So marking xul.dll as compatible should be OK.

Differential Revision: https://phabricator.services.mozilla.com/D117551
2021-07-19 07:36:19 +00:00
Mike Hommey 3b541bbb87 Bug 1720806 - Enable sysroot bootstrapping by default. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D120045
2021-07-16 20:59:36 +00:00
Mike Hommey 5ac51ef77d Bug 1720806 - Avoid multiple calls to toolchain_task_definitions during configure. r=firefox-build-system-reviewers,mhentges
Bug 1692137 added code that would end up calling
toolchain_task_definitions twice, once for each of host and target.
With the recent changes from bug 1719229, that is not useful anymore.
We also don't need the toolchain prefixes for toolchains on unsupported
hosts (which were useful before bug 1719229 for the target sysroots).

Differential Revision: https://phabricator.services.mozilla.com/D120044
2021-07-16 20:59:35 +00:00
Mike Hommey 9aa3587bbf Bug 1694884 - Fail configure when using --*-system-* options with a bootstrapped sysroot. r=firefox-build-system-reviewers,mhentges
The bootstrapped sysroot doesn't contain all the system libraries that
would allow these options to be supported.

Differential Revision: https://phabricator.services.mozilla.com/D120043
2021-07-16 20:51:27 +00:00
Mike Hommey 487119e349 Bug 1719229 - Allow the build system to use a sysroot for the host part of the build. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D119847
2021-07-14 08:54:43 +00:00
Mike Hommey 162f9b6800 Bug 1719229 - Rename the bootstrappable sysroot toolchains. r=firefox-build-system-reviewers,andi
In cross-compilation setups (x86_64 host, i686 or aarch64 target), we're
going to need two sysroots. Obviously, we need the sysroot paths to be
different in that case, so the sysroot path themselves need to contain
some distinctive name, and we'll use the `target.toolchain` name for
that (the target triplet with the vendor/machine stripped out).

Because the path name needs to be reflected in the artifact name as well
as the toolchain name, we also change them.

And because the current prefix in the toolchain name is now redundant
with the suffix, we remove the prefix, and allow the bootstrapping
mechanism to try toolchains without the prefix.

Differential Revision: https://phabricator.services.mozilla.com/D119846
2021-07-14 08:54:43 +00:00
Mike Hommey 841e1d8a06 Bug 1717585 - Switch --enable-bootstrap on by default on central. r=firefox-build-system-reviewers,mhentges
As there are some things to solve first for the sysroot, we don't enable
the sysroot bootstrap unless --enable-bootstrap is given explicitly. The
default will still bootstrap everything else when building on central.

Differential Revision: https://phabricator.services.mozilla.com/D118450
2021-06-22 23:36:28 +00:00
Nick Alexander bef7042147 Bug 1524662 - Add --enable-path-remapping producing compiled objects with generic paths. r=glandium
For "c" (i.e., gcc, clang, and clang-cl), this configures the
`-f{debug,macro}-path-prefix` flags.  We'd prefer to use
`-ffile-path-prefix`, but it seems that `clang-cl` does not recognize
that flag.

For "rust" (i.e., rustc/cargo), this configures `--remap-path-prefix`.

This is one step toward getting `sccache` hits across source and
object directories.

Differential Revision: https://phabricator.services.mozilla.com/D113065
2021-06-10 17:08:06 +00:00
Dmitry Bezhetskov 6fdb9a9637 Bug 1713081 - Fix to use the default clang from upstream for SM WASI. r=glandium
To compile SM to .wasm we need to use clang from wasi-sdk, this patch
allows us to use default clang-12 from mozilla's repo.
We remove usage of rpath-link flag because wasm-ld doesn't support it,
enable single thread model because wasi is single threaded
and finally add <unistd.h> becase it is forbidden to use read/write/lseek
without this header.

Differential Revision: https://phabricator.services.mozilla.com/D116207
2021-06-02 06:00:10 +00:00
Mitchell Hentges 0ff1bef46b Bug 1707953: Remove macOS SDK maximum version check r=firefox-build-system-reviewers,glandium
The maximum version check has caused more unnecessary failed
builds (for freshly up-to-date devs) than helpful guards against
tough-to-diagnose issues.

Differential Revision: https://phabricator.services.mozilla.com/D113675
2021-05-04 15:07:09 +00:00
Mike Hommey 6736f91ada Bug 1704580 - Move various rust-related configure items to rust.configure. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D112157
2021-04-20 00:33:58 +00:00
Chris Fallin e888f83b57 Bug 1701603 part 1 - Support WASI as a new target for compilation. r=glandium
Add new OS - WASI and new processor - wasm32 to the SM's build system.

Differential Revision: https://phabricator.services.mozilla.com/D110067
2021-04-08 08:02:15 +00:00
Mike Hommey 0ea5ad6742 Bug 1698706 - Always add PIC flags to C{,XX}FLAGS. r=firefox-build-system-reviewers,andi,sheehan,mhentges
The build always uses them anyways, but configure tests don't, and some
of them fail as a consequence in some cases (example: when UBsan is
enabled, all AC_LANG_CPLUSPLUS + AC_CHECK_FUNCS tests fail). We also had
similar problems in the past, such as bug 1513605.

By adding the PIC flags to CFLAGS and CXXFLAGS, we ensure old-configure
tests use the flags as well.

While here, we also remove DSO_CFLAGS, which was always empty, and we
stop passing -fPIC to wasm compiles, because it has no effect there.

Differential Revision: https://phabricator.services.mozilla.com/D108560
2021-03-17 02:27:22 +00:00
Csoregi Natalia 1fe0f680de Backed out changeset 86089c4629b5 (bug 1698706) for spidermonkey bustage. CLOSED TREE 2021-03-17 03:48:31 +02:00
Mike Hommey 473d31abfb Bug 1698706 - Always add PIC flags to C{,XX}FLAGS. r=firefox-build-system-reviewers,andi,sheehan,mhentges
The build always uses them anyways, but configure tests don't, and some
of them fail as a consequence in some cases (example: when UBsan is
enabled, all AC_LANG_CPLUSPLUS + AC_CHECK_FUNCS tests fail). We also had
similar problems in the past, such as bug 1513605.

By adding the PIC flags to CFLAGS and CXXFLAGS, we ensure old-configure
tests use the flags as well.

While here, we also remove DSO_CFLAGS, which was always empty, and we
stop passing -fPIC to wasm compiles, because it has no effect there.

Differential Revision: https://phabricator.services.mozilla.com/D108560
2021-03-17 01:27:39 +00:00
Mike Hommey d7fbde7802 Bug 1688803 - Make ~/.cargo/bin take precedence over $PATH similarly to bootstrap paths. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D107585
2021-03-11 21:42:45 +00:00
Christian Holler 4cf2f28556 Bug 1689597 - Add Fuzzilli support to the build system. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D103467
2021-03-11 12:13:21 +00:00
Calixte Denizet b1457ae0bc Bug 1696060 - Fix lint issue in toolchain.configure (follow-up of bug 1524932) r=marco DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D107037
2021-03-03 09:16:05 +00:00
Calixte Denizet 63cb543361 Bug 1524932 - Don't instrument some files when doing ccov. r=marco
Some files don't need to be instrumented since we don't care about their coverage (e.g. /usr/include/* on linux).

Differential Revision: https://phabricator.services.mozilla.com/D107003
2021-03-02 21:54:40 +00:00
Mike Hommey 28c8a64a50 Bug 1694784 - Add a flag allowing to pick a sysroot manually. r=firefox-build-system-reviewers,sheehan,mhentges
Spidermonkey package builds don't have MOZ_AUTOMATION set (for good
reasons), which means they don't automatically get the sysroot through
MOZ_FETCHES_DIR. We need a way for that particular build to set its
sysroot.

Because the setup for sysroot is more elaborated than adding --sysroot
to C{,XX}FLAGS, it's more convenient to have an option for this.

And while at it, we might as well make that a full-fledged option,
although, we only make it available when targetting Linux (although it
could be useful for other OSes, but there's overlap with other options
on Android, and Mac, so for now, Linux-only will do).

This also allows to pass --without-sysroot along with
--enable-bootstrap, where the bootstrapped sysroot is not used.

Differential Revision: https://phabricator.services.mozilla.com/D106352
2021-03-02 02:06:36 +00:00
Mike Hommey 1afcdbc6aa Bug 1693725 - Make --enable-bootstrap install missing toolchains. r=firefox-build-system-reviewers,andi,sheehan,mhentges
This means --enable-bootstrap now is the same as what
--enable-bootstrap=install currently does. --enable-bootstrap=install is at the
same time desupported.
We also remove --enable-bootstrap=update, which is not worth supporting.

Differential Revision: https://phabricator.services.mozilla.com/D105719
2021-02-24 02:13:10 +00:00
Mike Hommey dfb8c396a6 Bug 1693723 - Pass bootstrap path in one piece to bootstrap_{,search_}path. r=firefox-build-system-reviewers,andi,mhentges
It will make upcoming changes simpler.

Differential Revision: https://phabricator.services.mozilla.com/D105717
2021-02-24 02:01:32 +00:00
Mike Hommey 6f57e893ff Bug 1694344 - Fix --with-ccache after bug 1693689. r=firefox-build-system-reviewers,sheehan,mhentges
Because --with-ccache without a value fulfills a @depends_if, we need to
check for the length. And because we check the length, we can just use a
@depends.

Differential Revision: https://phabricator.services.mozilla.com/D106084
2021-02-23 20:52:00 +00:00
Mike Hommey 23f4404e5f Bug 1693689 - Avoid bootstrapping toolchains unless needed. r=firefox-build-system-reviewers,andi,sheehan,mhentges
- Only bootstrap sccache when building with --with-ccache=sccache or
  CCACHE=sccache
- Don't bootstrap dump_syms or nasm on builds that don't compile

Differential Revision: https://phabricator.services.mozilla.com/D105704
2021-02-23 03:34:04 +00:00
Mike Hommey fbbe02d958 Bug 1692940 - Remove build system support for yasm. r=firefox-build-system-reviewers,dmajor
Differential Revision: https://phabricator.services.mozilla.com/D105432
2021-02-23 01:26:46 +00:00
Mike Hommey 5479923a50 Bug 1692940 - Change the logic to check for nasm. r=firefox-build-system-reviewers,dmajor
Instead of preemptively check for it, and then check if it's good enough to
build AV1, only check for (and bootstrap) nasm when building AV1 requires
it.

At the same time, we future-proof the code to be able to handle multiple
things requiring nasm, which we're going to add shortly.

Differential Revision: https://phabricator.services.mozilla.com/D105425
2021-02-23 01:26:43 +00:00
Mike Hommey d7cb5b686b Bug 1692940 - Revert bug 1508419. r=firefox-build-system-reviewers,andi,dmajor
Back when bug 1508419 landed, we weren't using a bootstrapped nasm. It
is less useful now that we are.

Differential Revision: https://phabricator.services.mozilla.com/D105424
2021-02-23 01:26:43 +00:00
Mike Hommey fa35a4b8c7 Bug 1692939 - Turn namespace() into a builtin in python configure. r=firefox-build-system-reviewers,mhentges
This removes the need for some --help dependencies.

Differential Revision: https://phabricator.services.mozilla.com/D105263
2021-02-18 22:44:40 +00:00
Mike Hommey 5e19605601 Bug 1692939 - Add sorted() as an allowed builtin in python configure. r=firefox-build-system-reviewers,mhentges
It has no side effects and is safe to use in the configure sandbox.

Differential Revision: https://phabricator.services.mozilla.com/D105262
2021-02-18 22:44:39 +00:00
Mike Hommey 7190ea756d Bug 1563571 - Still try lld when the compiler can't find a linker on its own. r=firefox-build-system-reviewers,andi,dmajor
Differential Revision: https://phabricator.services.mozilla.com/D104964
2021-02-16 21:24:53 +00:00
Mike Hommey 008596f701 Bug 1692945 - Remove unused [YN]ASM variables. r=firefox-build-system-reviewers,andi,dmajor
None of HAVE_NASM, HAVE_YASM, NASM_MAJOR_VERSION and NASM_MINOR_VERSION are
used. Also, the YASM variable is not necessary for old-configure anymore.

Differential Revision: https://phabricator.services.mozilla.com/D105269
2021-02-16 21:17:06 +00:00
Mitchell Hentges a3eb85e571 Bug 1687980: Make macOS quickstart docs more concise r=sylvestre,mhoye
* Puts the docs in order, so that contributors aren't jumping to the
  middle of the page to install system tools, then back to the top to
  clone Firefox.
* Removes docs on MacPorts since it's being removed in bug 1688263.
* Removes step to manually install brew packages since that happens
   automatically in bootstrap now.
* Simplifies mercurial installation docs
* Removes unnecessary mozconfig-tweaking instructions
* Removes almost-always-unnecessary DEFINE and troubleshooting
  information.

Differential Revision: https://phabricator.services.mozilla.com/D102973
2021-02-16 17:48:11 +00:00
Mike Hommey 5f86b697af Bug 1692137 - Allow local linux builds to use a bootstrapped sysroot. r=firefox-build-system-reviewers,andi,mhentges
Bug 1690930 added sysroots that can be bootstrapped. With this change,
we allow --enable-bootstrap=install to pull the right sysroot for the
configured target, and --enable-bootstrap to update it if it was already
there.

Differential Revision: https://phabricator.services.mozilla.com/D104797
2021-02-12 20:31:49 +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
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 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 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
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
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
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