Commit Graph

7473 Commits

Author SHA1 Message Date
arthur.iakab
1ee75a928a Merge inbound to mozilla-central a=merge 2018-09-19 05:18:50 +03:00
Mike Hommey
26306f585f Backout changeset b0abf5269c25 (bug 1492037) to give time to toolchains to build without blocking other landings. 2018-09-19 07:01:33 +09:00
Mike Hommey
76f0ade076 Bug 1492037 - Build clang with LLVM as a shared library. r=froydnj
Doing so changes the size of the compressed toolchain archive from ~280M
to ~120M, and the decompressed size from ~1500M to ~675M. This will
reduce the overhead of decompression during builds.

As we ship llvm-symbolizer as part of ASan builds, we do need it to
still statically link against LLVM, which we do with a small patch.

CCTools-port needs to be rebuilt in some cases of clang changes, which
this one of, so touch the script so that it happens.

Differential Revision: https://phabricator.services.mozilla.com/D6117
2018-09-19 07:00:38 +09:00
Ted Mielczarek
115b2651d5 Bug 1490463 - part 3 - remove BUILD_TOOLS from config.mk; r=mshal
BUILD_TOOLS was only ever used for things that another variable provides
equally well.  Removing BUILD_TOOLS means that we can remove win_srcdir
and WIN_TOP_SRC as well.
2018-09-18 16:02:22 -04:00
Ted Mielczarek
de99592416 Bug 1399870 - make DEFFILE a Path instead of a string; r=gps
All but one of the current uses of DEFFILE use `SRCDIR + '/file.def'` to
get a srcdir-relative path anyway, and the other one wants an
objdir-relative path, so using Path makes everything clearer.

This makes it more straightforward to translate the paths for the WSL
build.
2018-09-18 15:50:19 -04:00
Mike Hommey
f8798bbeb2 Bug 1487622 - Refactor the clang plugin wrt attributes r=andi
- We forcefully remove annotations from the AST so that they don't end
up impacting codegen.
- We change the API such that we use identifiers instead of strings,
reducing the chances of typo errors.

Differential Revision: https://phabricator.services.mozilla.com/D5493

--HG--
extra : moz-landing-system : lando
2018-09-18 13:03:33 +00:00
Mike Hommey
cdd1898856 Bug 1491236 - Always enable unwind tables on *nix r=froydnj
We were already always enabling it on builds with frame pointers on
Android. We now extend this to builds without frame pointers, helping
with client-side stacktracing for crashes.

It's also the default on many platforms, such as x86-64, whether frame
pointer are enabled or not and on x86 with GCC. Somehow, it's not the
case for x86 with clang, so this makes clang builds the same as GCC
builds in that regard.

On ARM, we were always omitting frame pointers because of a GCC bug, but
we've not been using GCC for Android builds for a long time (and the GCC
bug was actually fixed in 4.7 and backported to 4.6, making it fixed in
all versions of GCC we support).

Differential Revision: https://phabricator.services.mozilla.com/D6110

--HG--
extra : moz-landing-system : lando
2018-09-18 21:48:28 +00:00
Ted Mielczarek
e11506c714 bug 1490325 - write sccache log directly to artifact directory, make logs slightly more verbose. r=mshal
This patch makes it so we write the sccache log directly to the artifact
directory, so that it will be uploaded even if the build fails. It also makes
the log slightly more verbose. Both of these should help with diagnosing
sccache failures in CI.

The sccache log will no longer be explicitly gzip compressed, but some
Taskcluster client implementations will store it as gzip compressed.

Differential Revision: https://phabricator.services.mozilla.com/D6187

--HG--
extra : moz-landing-system : lando
2018-09-18 20:02:17 +00:00
Chris Manchester
00c9b67c32 Bug 1485187 - Document known failure scenarios for Tup automation builds. r=mshal
Differential Revision: https://phabricator.services.mozilla.com/D5709

--HG--
extra : moz-landing-system : lando
2018-09-18 15:09:24 +00:00
Masatoshi Kimura
480bad1d12 Bug 1490654 - Drop support for MSVC 2017 Update 6. r=froydnj 2018-09-16 22:22:31 +09:00
Dorel Luca
7a91966c10 Merge mozilla-inbound to mozilla-central. a=merge 2018-09-15 12:46:59 +03:00
Mike Hommey
61e6bceefa Bug 1490549 - Fix some comments r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D5916

--HG--
extra : moz-landing-system : lando
2018-09-15 01:14:29 +00:00
Mike Hommey
9f4a67977e Bug 1491140 - Count non-elfhacked relocations size when comparing to original size r=froydnj
When checking whether the new relocations sizes are going to be a win, we
need to account for the fact that there are non-elfhacked relocation
remaining.

Differential Revision: https://phabricator.services.mozilla.com/D5837

--HG--
extra : moz-landing-system : lando
2018-09-14 13:16:25 +00:00
Mike Hommey
682d2bd651 Bug 1491198 - Don't enable LTO on artifact builds r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D5836

--HG--
extra : moz-landing-system : lando
2018-09-14 17:33:45 +00:00
Mike Hommey
410b4939d9 Bug 1490549 - Make configure choose clang by default on all platforms r=froydnj
Now that we ship builds using clang on all platforms, pick it during
configure. It is still possible to opt-in to building other compilers by
setting CC/CXX (or even only CC) to the desired compiler.

Depends on D5829

Differential Revision: https://phabricator.services.mozilla.com/D5637

--HG--
extra : moz-landing-system : lando
2018-09-14 18:01:23 +00:00
Mike Hommey
1beed8c891 Bug 1490549 - Change how host compilers are found r=froydnj
Before this change, we'd derive a host compiler and handle things as if
HOST_CC/HOST_CXX had been passed. With this change, we change the list
of compilers that are tested with check_prog instead.

Depends on D5828

Differential Revision: https://phabricator.services.mozilla.com/D5829

--HG--
extra : moz-landing-system : lando
2018-09-14 17:40:52 +00:00
shindli
0c0c6fddd8 Backed out changeset aae4f349fa58 (bug 1479503) per developer's request on IRC a=backout
--HG--
rename : taskcluster/docker/static-analysis-build/Dockerfile => taskcluster/docker/infer-build/Dockerfile
2018-09-14 16:35:23 +03:00
Brindusan Cristian
99cbc0aec3 Merge inbound to mozilla-central. a=merge 2018-09-14 12:53:25 +03:00
Robert Bartlensky
af9de513f7 Bug 1479503: Check infer in ./mach static-analysis autotest. r=nalexander
Adds infer to ./mach static-analysis autotest.

Differential Revision: https://phabricator.services.mozilla.com/D5692

--HG--
rename : taskcluster/docker/infer-build/Dockerfile => taskcluster/docker/static-analysis-build/Dockerfile
extra : moz-landing-system : lando
2018-09-13 20:58:03 +00:00
Jim Chen
6ce80dbdc4 Bug 1480834 - 5. Keep target flag when building for Android on Linux; r=glandium
Currently, when building for Android x86-64 on Linux x86-64, we drop the
'--target' flag, which causes the build to fail. This patch adds a check
for OS mismatch, so we keep the '--target' flag in this situation.

Differential Revision: https://phabricator.services.mozilla.com/D4483
2018-09-13 12:09:26 -04:00
Jim Chen
d968bd5148 Bug 1480834 - 2. Add x86-64 build support; r=nalexander
Add x86-64 as an option for Android builds in the build system.

Differential Revision: https://phabricator.services.mozilla.com/D4480
2018-09-13 12:09:25 -04:00
Jim Chen
054f1436df Bug 1480834 - 0. Drop mips and update NDK platform to 16; r=jchen
Differential Revision: https://phabricator.services.mozilla.com/D5602
2018-09-13 12:09:24 -04:00
Chris Peterson
e58c4d5a41 Bug 1490575 - Remove Mulet comments from build files. r=froydnj
Mulet was a Firefox OS simulator that is no longer supported: https://wiki.mozilla.org/Mulet

Differential Revision: https://phabricator.services.mozilla.com/D5735

--HG--
extra : rebase_source : d077c88b8446d0491b4af0dfe2198c4b980fa279
extra : source : 41301ab98bd094235b6995b18bcaa521f221c5f1
2018-09-11 23:07:32 -07:00
Thomas P.
ac7fc2f5a6 Bug 1474488: add --enable-undefined-sanitizer with custom checks r=froydnj 2018-09-11 02:47:23 +00:00
Masatoshi Kimura
762361579f Bug 1485224 - Update Windows builders to VS 2017 15.8.4 and Windows SDK 17134. r=glandium
--HG--
extra : rebase_source : 15906168b0e2e2d545ea841cb3e11e7102bc9b39
2018-09-07 07:15:19 +09:00
Henrik Skupin
c8659bd663 Bug 905404 - [pgo] Add custom profile data in testing/profiles/profileserver. r=ahal
Add extra preferences for the profileserver script on-top of
the ones as inheritted from unittests.

--HG--
extra : rebase_source : 02d3297134e82c2425fc4c6c939cc5d0cc4a2c13
extra : histedit_source : 07f699b0ff8bec2a6eda7705a0fa13fb3b352f98
2018-09-06 08:47:46 +02:00
Ted Mielczarek
201bd292e7 Bug 1384557 - move _DEPEND_CFLAGS+CL_INCLUDES_PREFIX to toolchain.configure, ignore {CC,CXX}_WRAPPER when using sccache; r=glandium
Currently mozconfig.cache overrides a few build options for sccache.
This patch moves them into toolchain.configure so that the build system
will set them properly when sccache is in use.  Additionally,
{CC,CXX}_WRAPPER are set in config.mk, so just avoid setting them when
sccache is in use.
2018-09-14 12:12:34 -04:00
Daniel Varga
8eac4fe0d9 Merge mozilla-central to mozilla-inbound 2018-09-13 05:50:34 +03:00
Mike Hommey
0a7e03bf20 Bug 1490542 - Remove the Linux LTO builds. r=froydnj
Now that Linux PGO builds also do LTO and all the Linux builds use
clang, there's not much use for separate LTO builds.

Differential Revision: https://phabricator.services.mozilla.com/D5632
2018-09-13 11:23:24 +09:00
Mike Hommey
d60c232a5e Bug 1490618 - Use the right variable name for the new ASTMatcher API check r=froydnj
This will make the result properly displayed.

Differential Revision: https://phabricator.services.mozilla.com/D5659

--HG--
extra : moz-landing-system : lando
2018-09-12 12:18:13 +00:00
David Major
8a61079eb7 Bug 1489096: Use clang 7.0.0rc3 for Windows builds. r=glandium 2018-09-11 23:57:29 -04:00
Mike Hommey
1e441ae694 Bug 1481721 - Switch Linux nightlies and PGO builds to clang r=froydnj
And enable LTO on CI builds using clang + PGO.

Differential Revision: https://phabricator.services.mozilla.com/D4991

--HG--
extra : moz-landing-system : lando
2018-09-11 22:52:29 +00:00
Mike Hommey
335daba18f Bug 1490218 - Disable sccache on PGO builds r=dmajor
Currently, sccache doesn't work at all with clang-cl (PGO or not, bug
1476604), and newer versions of sccache that do the right thing for PGO
flags with clang have other problems (see bug 1484897).

The benefit of sccache on PGO+LTO builds is however limited (the
profile-use half of the build doesn't benefit at all, and since it does
LTO as well, it's the most time-consuming part of the build), so in
order not to further block switching Linux builds to clang, let's just
disable sccache on PGO builds for now (the earlier we can switch to
clang, the more time it leaves to catch any problem that causes).

Differential Revision: https://phabricator.services.mozilla.com/D5509

--HG--
extra : moz-landing-system : lando
2018-09-11 22:44:09 +00:00
Cosmin Sabou
6294a344fe Merge mozilla-central to mozilla-inbound. a=merge 2018-09-11 13:17:29 +03:00
Cosmin Sabou
de7676288a Merge mozilla-inbound to mozilla-central. a=merge 2018-09-11 13:06:37 +03:00
Andreas Tolfsen
07dcb317a5 bug 1471281: build: make asan depend on --help; r=froydnj
The asan definition needs to depend on --help for the --enable-geckodriver
flag to depend on it through geckodriver_default.
2018-09-11 10:40:30 +01:00
Margareta Eliza Balazs
e620c683cb Backed out 2 changesets (bug 1474488) for causing failures in build/src/obj-firefox/dist/include/mozilla/Assertions.h CLOSED TREE
Backed out changeset ffce46424c69 (bug 1474488)
Backed out changeset e4b9fa5f7592 (bug 1474488)
2018-09-11 10:59:28 +03:00
Tom Ritter
0f09d86a83 Bug 1489205 In expandlibs.m4, use the Windows form only when we are compiling on Windows r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D5172

--HG--
extra : moz-landing-system : lando
2018-09-11 03:20:06 +00:00
Robert Longson
63cb9a2572 Bug 1482196 - Increase minimum clang version to 3.9 r=froydnj 2018-09-10 18:59:07 +01:00
Thomas P.
357f9deb02 Bug 1474488 - add --enable-undefined-sanitizer with custom checks. r=froydnj 2018-09-11 02:47:23 +00:00
Daniel Varga
1539df295b Merge mozilla-inbound to mozilla-central a=merge 2018-09-08 06:53:43 +03:00
Mike Hommey
f1afe5ceec Bug 1489340 - Remove xpcom/typelib r=froydnj
Nothing is using the xpt module anymore, which means we can remove it,
as well as the runtests.py script that runs its test, and the
integration of those tests in the build system.

Depends on D5221

Differential Revision: https://phabricator.services.mozilla.com/D5223

--HG--
extra : moz-landing-system : lando
2018-09-07 13:55:38 +00:00
Sylvestre Ledru
6791a1aed7 Bug 1486759 - Cherry pick a lld fix to fix the Windows entry point r=dmajor
Not waiting for rc3 or final from llvm because the issue is pretty severe

Differential Revision: https://phabricator.services.mozilla.com/D5124

--HG--
extra : moz-landing-system : lando
2018-09-07 13:05:31 +00:00
Mike Hommey
cd06f032af Bug 1079662 - Always enable PIE. r=froydnj
Last attempt, a few years ago, blatantly failed because nautilus (the
GNOME file manager) can't start PIE executables, which look like shared
libraries, and that it thus considers not being executables.

Downstreams don't actually have the problem, because users won't be
launching Firefox from a file manager, but for mozilla.org builds, it is
a problem because users would download, then extract, and then likely
try to run the Firefox executable from a file manager.

So for mozilla.org builds, we still need to find a way around the
nautilus problem.

A .desktop file could be a solution, but .desktop files have not
actually been designed for this use case, which leads to:
- having to use an awful one-liner shell wrapper to derive the path
  to the executable from that of the .desktop file,
- not even being able to associate an icon,
- the .desktop file not being copiable to a location where .desktop
  files would normally go, because it would then fail to find the
  executable.

Another possibility is to go back to using a shell wrapper, but that's
not entirely appealing.

What we chose here is similar, where we have a small `firefox` wrapper
that launches the real `firefox-bin` (which is still leftover from those
old times where we had a shell wrapper, for reasons).

The small `firefox` wrapper is a minimalist C executable that just
finds the path to the `firefox-bin` executable and executes it with the
same args it was called with. The wrapper is only enabled when the
MOZ_NO_PIE_COMPAT environment variable is set, which we only take into
account on Linux. The variable is only really meant to be used for
mozilla.org builds, for the nautilus problem. Downstreams will just pick
the default, which is changed to build PIE.

On other platforms, PIE was already enabled by default, so we just
remove the --enable-pie configure flag.

Differential Revision: https://phabricator.services.mozilla.com/D5109
2018-09-08 07:41:21 +09:00
Mike Hommey
ee56e638a0 Bug 1079662 - Always pass -rdynamic when linking with sanitizers. r=froydnj
When building executables as PIE, and because we use -Bsymbolic, which
symbols are exported from an executable varies based on the libraries
it's directly linked against, to fulfil their symbol needs. So when a
library depends on e.g. ASAN runtime symbols, and the linker finds that,
it will keep those ASAN symbols in the executable for the library. And
drop the other, unused symbols.

But when the executable then dlopen()s a library (e.g. shlibsign loading
libfreebl) that uses another set of ASAN symbols, including symbols that
none of the direct dependencies of the executable need, dlopen() fails
because of the missing symbols.

It's not currently an apparent problem because we don't enable PIE, and
we build Gecko executables with -rdynamic already (for mozjemalloc). But
we don't build non-Gecko executables this way (like shlibsign).

Differential Revision: https://phabricator.services.mozilla.com/D5108
2018-09-08 07:41:21 +09:00
Mike Hommey
a5cbd7bc7e Bug 1489001 - Move most of mozconfig.linux to mozconfig.unix. r=froydnj
Bug 1487330 made mozconfig.asan use mozconfig.linux, but while that
worked out fine, it turns out that we do have mac builds using
e.g. mozconfig.asan, and that those can break when doing linux-specific
changes to mozconfig.linux.


--HG--
rename : build/unix/mozconfig.linux => build/unix/mozconfig.unix
2018-09-08 07:41:19 +09:00
Mike Hommey
d974ecd01d Bug 1488632 - Don't disable the clang plugin on ASAN builds. r=dmajor
Somehow, bug 1488631 "fixes" the test failure that the original landing
of bug 1487330 caused.

Differential Revision: https://phabricator.services.mozilla.com/D5001
2018-09-08 06:51:22 +09:00
Mike Hommey
88314c2170 Bug 1488631 - Remove annotations that the clang plugin doesn't handle. r=andi
As per bug 1487622, annotations have side effects on codegen, one of
which changes a leak signature that the wpt harness doesn't match
against its whitelist anymore.

Interestingly, while looking at the issue, I found multiple moz_*
annotations that weren't actually looked for by the clang plugin,
making them useless. Even more interestingly, removing them changes
codegen in such a way that the leak signature mentioned above is not
altered anymore.

Differential Revision: https://phabricator.services.mozilla.com/D5000
2018-09-08 06:49:48 +09:00
Margareta Eliza Balazs
f79a9159ca Backed out 2 changesets (bug 1485224) for perma bc3 failures e.g.: Error getting fileid for Z:\task_1536750533ad] WARNING: NS_ENSURE_TRUE CLOSED TREE
Backed out changeset fe2c607f4af7 (bug 1485224)
Backed out changeset f7a6e536532e (bug 1485224)
2018-09-12 15:37:19 +03:00
Masatoshi Kimura
c7adec1ec3 Bug 1485224 - Update Windows builders to VS 2017 Update 8 and Windows SDK 17134. r=glandium
--HG--
extra : source : 2face0081dbf1ba256f6f533eea8b865e8360b78
2018-09-07 07:15:19 +09:00