Commit Graph

8280 Commits

Author SHA1 Message Date
Mike Hommey
dc4a97fb4e Bug 1560044 - Allow --with-macos-sdk as an option when cross-compiling on macOS. r=nalexander
Building host tools on macOS require a macOS SDK, but it's currently
not configurable when cross-compiling for e.g. Android.

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

--HG--
extra : moz-landing-system : lando
2019-07-02 23:25:01 +00:00
Mike Hommey
7905091bbe Bug 1528314 - Make configure find an appropriate java via /usr/libexec/java_home on macOS. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D36561

--HG--
extra : moz-landing-system : lando
2019-07-02 23:25:04 +00:00
Andreea Pavel
c92947ecc6 Backed out 5 changesets (bug 1528314, bug 1560044) for build bustages on a CLOSED TREE
Backed out changeset 4a544cd4b035 (bug 1528314)
Backed out changeset 91919cdf9159 (bug 1528314)
Backed out changeset 1271940e91e8 (bug 1560044)
Backed out changeset a5bbaa8c1001 (bug 1560044)
Backed out changeset 7ae0d606f1c6 (bug 1560044)
2019-07-03 02:20:15 +03:00
Mike Hommey
5762785f58 Bug 1528314 - Make configure find an appropriate java via /usr/libexec/java_home on macOS. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D36561

--HG--
extra : moz-landing-system : lando
2019-07-02 17:25:05 +00:00
Mike Hommey
e1e0add912 Bug 1560044 - Make Xcode checks macOS host only. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D36559

--HG--
extra : moz-landing-system : lando
2019-07-02 17:24:04 +00:00
Mike Hommey
65dabdc42b Bug 1560044 - Always use a SDK path on macOS. r=nalexander
The SDK headers may not be installed in /usr/include. The usual response
has been to have people run e.g. `open
/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg`
which is not really sustainable.

This makes builds that happen on a macOS host try to detect their SDK
and use that as a default for --with-macos-sdk, which has the side
effect of enabling the SDK version check in that configuration.

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

--HG--
extra : moz-landing-system : lando
2019-07-02 17:23:23 +00:00
Mike Hommey
4e854757b0 Bug 1560044 - Allow --with-macos-sdk as an option when cross-compiling on macOS. r=nalexander
Building host tools on macOS require a macOS SDK, but it's currently
not configurable when cross-compiling for e.g. Android.

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

--HG--
extra : moz-landing-system : lando
2019-07-02 17:21:54 +00:00
David Major
88ae3f5fcb Bug 1557338 - Fix up TestSprintfLiteral.cpp for warnings on clang trunk r=andi
LLVM r356397 added some new warnings to the compiler that in this file complain about `size argument is too large; destination buffer has size 100, but size argument is 101`.

The easiest path is to just remove those lines; doing so doesn't really weaken the test coverage of the SprintfLiteral checker.

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

--HG--
extra : moz-landing-system : lando
2019-07-01 21:37:44 +00:00
Mihai Alexandru Michis
a2163018a4 Backed out changeset 23973e3a5e95 (bug 1557338) for causing bustages on OS X Cross Compiled. CLOSED TREE 2019-07-02 00:30:06 +03:00
David Major
213d34fa80 Bug 1557338 - Fix up TestSprintfLiteral.cpp for warnings on clang trunk r=andi
LLVM r356397 added some new warnings to the compiler that in this file complain about `size argument is too large; destination buffer has size 100, but size argument is 101`.

The easiest path is to just remove those lines; doing so doesn't really weaken the test coverage of the SprintfLiteral checker.

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

--HG--
extra : moz-landing-system : lando
2019-07-01 18:32:34 +00:00
Andi-Bogdan Postelnicu
247d96a5f4 Bug 1559740 - add separate modules for build, static-analysis and artifacts. r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D36479

--HG--
extra : moz-landing-system : lando
2019-07-01 14:02:20 +00:00
Sylvestre Ledru
da21266863 Bug 1559740 - Move the clang-{format,tidy} and infer declarations into a separate directory r=andi
Differential Revision: https://phabricator.services.mozilla.com/D35187

--HG--
extra : moz-landing-system : lando
2019-07-01 13:57:18 +00:00
Kartikaya Gupta
721a5dbcf4 Bug 1558598 - Ensure mozinfo correctly detects WebRender. r=ahal
I don't know if this covers all the things that use mozinfo (probably not)
but it covers all the suites that use mozinfo and have webrender conditions
in the test manifests (i.e. mochitest and wpt variants).

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

--HG--
extra : moz-landing-system : lando
2019-06-29 09:51:14 +00:00
championshuttler
e2b2c11969 Bug 1536103 - Fix Sphinx Warning - Title Underline too short in 'mach doc' (2). r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D35309

--HG--
extra : moz-landing-system : lando
2019-06-25 12:02:51 +00:00
Cosmin Sabou
20f7fd4c63 Backed out 3 changesets (bug 1559740) for linting errors and android bustages. CLOSED TREE
Backed out changeset 39db36060b8a (bug 1559740)
Backed out changeset df14ac0c2421 (bug 1559740)
Backed out changeset 089e04f53971 (bug 1559740)
2019-06-28 19:40:13 +03:00
Sylvestre Ledru
85ae7943fc Bug 1559740 - Move the clang-{format,tidy} and infer declarations into a separate directory r=andi
Differential Revision: https://phabricator.services.mozilla.com/D35187

--HG--
extra : moz-landing-system : lando
2019-06-28 07:39:48 +00:00
David Major
029c3f2a24 Bug 1561822 - Clean up a workaround for frame pointer flags in aarch64 clang-cl r=froydnj
Glandium pointed out that we're actually using the same flag for both `enable=` and `disable=`. Oops.

It turns out that we don't need this code anymore anyway, since the needed patch got merged to clang 8.0.0 [0], which we now require [1].

[0] https://reviews.llvm.org/rGa576b44d09080661fc9f83a94f66eccb44d5f3ce
[1] https://hg.mozilla.org/integration/autoland/rev/0a49234facf2

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

--HG--
extra : moz-landing-system : lando
2019-06-28 13:55:01 +00:00
Emilio Cobos Álvarez
3d0f056ca7 Bug 1559814 - Update cbindgen. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D36020

--HG--
extra : moz-landing-system : lando
2019-06-26 20:32:41 +00:00
Mike Hommey
ed3910db06 Bug 1560545 - Force-enable wayland support in Linux builds. r=chmanchester
So that we don't end up disabling it by accident.

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

--HG--
extra : moz-landing-system : lando
2019-06-26 06:03:20 +00:00
Cosmin Sabou
58cc56c50f Backed out 3 changesets (bug 1560545) for causing build bustages. CLOSED TREE
Backed out changeset 31177fcc3123 (bug 1560545)
Backed out changeset e3e1ad8d7709 (bug 1560545)
Backed out changeset fd64770f1342 (bug 1560545)
2019-06-26 07:56:47 +03:00
Mike Hommey
54617f4cc0 Bug 1560545 - Force-enable wayland support in Linux builds on automation. r=chmanchester
So that we don't end up disabling it by accident.

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

--HG--
extra : moz-landing-system : lando
2019-06-25 20:22:15 +00:00
Mike Hommey
7d0561299d Bug 1561465 - Remove ELOG. r=nalexander
The condition that enabled ELOG to do something has been broken since
bug 279212 landed two years ago, because MAKEFLAGS doesn't contain the
dash for flags, so looking for "-s" never did anything.

Bug 1560527 changed the condition to !BUILD_VERBOSE_LOG, which as of the
previous commit, does work. This would restore the old behavior, at the
expense of build time, since it involves wrapping in a shell script,
which is not necessarily desirable (and hasn't been done for two years
now)

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

--HG--
extra : moz-landing-system : lando
2019-06-26 02:20:29 +00:00
Mike Shal
9ea52410d9 Bug 1557785 - Fix automatic setting of LTO with clang-cl; r=dmajor
With clang-cl and PGO enabled, toolchain.configure automatically turns
on LTO for compatibility with MSVC. However, MOZ_PGO is set for both the
profile-generate and profile-use builds in a 3-tier PGO setup via
imply_option(), but we only want LTO enabled for the profile-use build
(see bug 1483778).

For 1-tier PGO builds, which are still used by local developers, MOZ_PGO
will be set and --enable-profile-generate will be unset, so LTO will be
automatically enabled. The profiledbuild target in make is responsible
for disabling MOZ_LTO on the profile-generate build.

For 3-tier PGO builds, MOZ_PGO will still be set, so we can skip setting
LTO in configure when --enable-profile-generate is set.

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

--HG--
extra : moz-landing-system : lando
2019-06-25 18:38:15 +00:00
Mike Shal
628c15f57c Bug 1557785 - Allow LLVM_PROFDATA to work even if not explicitly set in the environment; r=firefox-build-system-reviewers,chmanchester
Windows finds llvm-profdata in the PATH, in contrast to Linux or Android
builds that set LLVM_PROFDATA as an environment variable in mozconfigs.
The pgo_profile_path() configure checks should still work in this case.

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

--HG--
extra : moz-landing-system : lando
2019-06-19 22:05:56 +00:00
Mike Shal
5e2e67f17f Bug 1557785 - Hook MOZ_PGO_PROFILE_USE environment variable into common Windows mozconfig; r=firefox-build-system-reviewers,chmanchester
MOZ_PGO_PROFILE_USE is set when the use-pgo attribute is defined in the
task. This environment variable is used to enable --enable-profile-use
and related configure flags.

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

--HG--
extra : moz-landing-system : lando
2019-06-19 22:05:52 +00:00
David Major
df7699c43c Bug 1561350 - Fix libclang detection for clang-cl 9 r=glandium
In the clang-cl 9 case where we have semicolon-separated paths, the `dirs` variable is never read, so the libclang detection fails.

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

--HG--
extra : moz-landing-system : lando
2019-06-25 20:39:01 +00:00
Kartikaya Gupta
870cc36ca1 Bug 1519598 - Add a mach command to import PRs from github. r=kvark,ahal
This is a simple mach command that imports a PR from a whitelisted set
of github repositories into the local m-c clone. It works by downloading
the .patch file from github, splitting the different commits, and
applying those commits to the local repo via the `patch` tool and git/hg
commit. It optionally allows filing a bug or providing a bug number, and
specifying a reviewer.

This is one part of a larger workflow that facilitates landing
contributor patches into m-c when those patches are submitted as PRs.
Other components of the workflow (to be added in the future) will make
it easier to actually test and land the patch.

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

--HG--
extra : moz-landing-system : lando
2019-06-24 20:30:32 +00:00
Petr Sumbera
506f679f53 Bug 1554582 - Solaris SPARC packaging should include libfreebl_64fpu_3.so and libfreebl_64int_3.so r=mshal
Differential Revision: https://phabricator.services.mozilla.com/D32690

--HG--
extra : moz-landing-system : lando
2019-06-19 09:34:51 +00:00
Wes Kocher
dca287e7da Bug 1560077 - Fix typo in sparse checkout docs
Differential Revision: https://phabricator.services.mozilla.com/D35299

--HG--
extra : moz-landing-system : lando
2019-06-19 05:24:56 +00:00
Mike Hommey
5091811073 Bug 1559301 - Straighten up C/C++ standard compiler flags. r=nalexander
- `info.type in ('clang-cl', 'clang', 'gcc')` is always true since MSVC
support was removed.
- For some reason, we didn't enforce C++14 on GCC.

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

--HG--
extra : moz-landing-system : lando
2019-06-14 16:14:50 +00:00
Marian Raiciof
b2b633e095 Bug 1526752 - [mozdevice] Update adb.py and other necessary files to support python3 r=ahal,davehunt
Improve support for Python 3 by running modernize over adb.py and a few other related changes.

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

--HG--
extra : moz-landing-system : lando
2019-06-07 08:44:15 +00:00
Chris Manchester
c74a1fa131 Bug 1558996 - Require rust 1.35 r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D34794

--HG--
extra : moz-landing-system : lando
2019-06-13 06:02:05 +00:00
Bob Clary
2a1c46386f Bug 1559103 - RemoteAutomation should call parent class init first, r=gbrown.
Differential Revision: https://phabricator.services.mozilla.com/D34856

--HG--
extra : moz-landing-system : lando
2019-06-13 13:54:18 +00:00
Mike Hommey
85e29d1e3b Bug 1557583 - Add a --enable-frame-pointers option. r=chmanchester
We've been relying on frame pointers being indirectly enabled via things
like --enable-profiling for some time, but this doesn't scale because
some things may want frame pointers while wanting --disable-profiling.

So we move MOZ_FRAMEPTR_FLAGS to python configure and add a new option
to decide whether to enable frame pointers or not.

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

--HG--
extra : moz-landing-system : lando
2019-06-12 22:30:46 +00:00
Mike Hommey
958968bcdc Bug 1557583 - Move --enable-*-sanitizers options to python configure. r=dmajor
But keep the corresponding logic in sanitize.m4.

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

--HG--
extra : moz-landing-system : lando
2019-06-07 13:08:27 +00:00
Mike Hommey
44e96352da Bug 1557547 - Actively reject clang < 4.0 during configure. r=mshal
Bug 1394825 bumped the minimum version of clang we use on automation,
for the base toolchain jobs, and there's a libclang test for bindgen,
but we should reject the compiler in the first place.

The check to do that works in both C and C++, contrary to the original
3.6 test that was checking a C++ feature ; the test was later changed
for 3.9, using a check that would have worked in both C and C++, but
the C exception was left around. We remove it now.

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

--HG--
extra : moz-landing-system : lando
2019-06-12 22:22:24 +00:00
Jan de Mooij
dc18804805 Bug 1556646 part 2 - Rename JS_POSIX_NSPR to JS_WITHOUT_NSPR and remove --enable-posix-nspr-emulation configure flag. r=sfink,glandium
Stand-alone JS builds now default to without-NSPR on all platforms.

Note that the JS shell builds we do in automation pass --enable-nspr-build so they shouldn't be affected by
the JS shell changes.

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

--HG--
extra : moz-landing-system : lando
2019-06-08 09:10:59 +00:00
Mike Hommey
ff4ab7e28f Bug 1557855 - Use a sensible default for --with-android-ndk. r=nalexander
Use the same logic as for --with-android-sdk to use the NDK downloaded
by mach bootstrap by default.

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

--HG--
extra : moz-landing-system : lando
2019-06-07 22:23:37 +00:00
Mike Hommey
177ad5806d Bug 1557855 - Change how --with-android-sdk is handled. r=nalexander
We make it have a default value only if the corresponding directory exists,
and make it throw a more explicit error when the explicitly given directory
doesn't exist.

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

--HG--
extra : moz-landing-system : lando
2019-06-07 22:20:48 +00:00
Mike Hommey
4b49193e14 Bug 1557855 - Define MOZBUILD_STATE_PATH as an option. r=nalexander
Rather than taking it from the environment every time it's necessary.

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

--HG--
extra : moz-landing-system : lando
2019-06-07 23:25:01 +00:00
Mike Hommey
47925b3f7a Bug 1557507 - Default to lld linker for local builds in more cases. r=nalexander
The current logic is that if the compiler somehow uses gold rather than
BFD ld by default, we let it, but if it uses BFD ld, we default to lld.
When doing Android builds, the compiler finds the linker in the NDK, and
the default `ld` binary is gold. So we currently end up using fold for
Android builds.

Here, we change the logic such that we use lld when the default linker
the compiler uses is either BFD ld or gold. We can't go with "is not
lld" because the other possible kind, ld64, is what we actually want to
use on mac, since lld doesn't support mach-o fully just yet.

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

--HG--
extra : moz-landing-system : lando
2019-06-07 04:43:45 +00:00
Bogdan Tara
12782914a5 Backed out changeset 2d8ad105aac8 (bug 1557507) on Glandium's request CLOSED TREE 2019-06-07 07:38:03 +03:00
Mike Hommey
6b74e0f7de Bug 1557507 - Default to lld linker for local builds in more cases. r=nalexander
The current logic is that if the compiler somehow uses gold rather than
BFD ld by default, we let it, but if it uses BFD ld, we default to lld.
When doing Android builds, the compiler finds the linker in the NDK, and
the default `ld` binary is gold. So we currently end up using gold for
Android builds.

Here, we change the logic such that we use lld when the default linker
the compiler uses is either BFD ld or gold. We can't go with "is not
lld" because the other possible kind, ld64, is what we actually want to
use on mac, since lld doesn't support mach-o fully just yet.

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

--HG--
extra : moz-landing-system : lando
2019-06-07 00:40:53 +00:00
Mike Hommey
7dcedba0bf Bug 1557213 - Don't try to use NDK clang. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D33902

--HG--
extra : moz-landing-system : lando
2019-06-07 00:40:10 +00:00
David Major
5827377048 Bug 1557313 - Update ExplicitOperatorBoolChecker.cpp for clang trunk changes r=andi
https://reviews.llvm.org/rL360311 reworked the handling of `explicit` in `CXXConversionDecl`, and the `isExplicitSpecified()` method no longer exists. We can instead use `isExplicit()` which conveniently works on both old and new clangs. (Before 360311, `isExplicit()` just forwarded to `isExplicitSpecified()`.)

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

--HG--
extra : moz-landing-system : lando
2019-06-06 15:42:25 +00:00
Gerald Squelart
b601187bf1 Bug 1492121 - Suppress dlopen leak triggered by next patch - r=njn
Valgrind report:
```
TEST-UNEXPECTED-FAIL | valgrind-test | 192 bytes in 3 blocks are definitely lost at malloc / dl_open_worker / _dl_catch_error / _dl_open
==2561== 192 bytes in 3 blocks are definitely lost in loss record 348 of 399
==2561==    at 0x4C2B240: malloc+112 (vg_replace_malloc.c:298)
==2561==    by 0x4012919: dl_open_worker+1977 (dl-open.c:457)
==2561==    by 0x400DD55: _dl_catch_error+101 (dl-error.c:178)
==2561==    by 0x4011CC9: _dl_open+185 (dl-open.c:633)
==2561==    by 0x5051F65: dlopen_doit+101 (dlopen.c:67)
==2561==    by 0x400DD55: _dl_catch_error+101 (dl-error.c:178)
==2561==    by 0x50522EB: _dlerror_run+123 (dlerror.c:164)
==2561==    by 0x5051EE0: dlopen@@GLIBC_2.2.5+48 (dlopen.c:88)
==2561==    by 0x1148FC: GetLibHandle (xpcom/glue/standalone/nsXPCOMGlue.cpp:86)
==2561==    by 0x1148FC: ReadDependentCB (xpcom/glue/standalone/nsXPCOMGlue.cpp:136)
==2561==    by 0x1148FC: XPCOMGlueLoad (xpcom/glue/standalone/nsXPCOMGlue.cpp:306)
==2561==    by 0x1148FC: mozilla::GetBootstrap(char const*, mozilla::LibLoadingStrategy)+572 (xpcom/glue/standalone/nsXPCOMGlue.cpp:374)
==2561==    by 0x114213: InitXPCOMGlue(mozilla::LibLoadingStrategy)+131 (browser/app/nsBrowserApp.cpp:223)
==2561==    by 0x113E6B: main+219 (browser/app/nsBrowserApp.cpp:284)
```

Nothing due directly to this patch, so it is likely a dlopen issue.

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

--HG--
extra : moz-landing-system : lando
2019-06-06 06:20:23 +00:00
Mike Hommey
1c5cf6c437 Bug 1519954 - Pick binaries from mach bootstrap first on local developer builds. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D33884

--HG--
extra : moz-landing-system : lando
2019-06-06 01:22:21 +00:00
Mike Hommey
cbb9f80c77 Bug 1556880 - Support GCC ARM preprocessor defines to detect the ARM target. r=chmanchester
Also set `fpu` to None for when we don't find it.

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

--HG--
extra : moz-landing-system : lando
2019-06-05 02:53:01 +00:00
Mike Hommey
985a376afa Bug 1526857 - Improve bindgen configuration wrt clang. r=chmanchester
The current setup for bindgen relies on either finding clang/libclang
from the output of llvm-config, or from the paths given via the
configure flags --with-clang-path/--with-libclang-path.

One _very_ common problem is that the llvm-config we end up using does
not correspond to the clang used for compilation, which has some
undesirable side effect, like failing to build.

So instead of relying on llvm-config, we do the following:
- when the compiler is clang, we just use that
- when the compiler is clang-cl, we use clang from the same directory
- otherwise, we either try to find clang in PATH, or rely on
  --with-clang-path.

Once clang is found, we try to deduce the location of the corresponding
libclang via the output of `clang -print-search-dirs`, or rely on
--with-libclang-path.

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

--HG--
extra : moz-landing-system : lando
2019-06-05 02:48:20 +00:00
Andrew Sutherland
4e20ede87a Bug 1533802 - Sticky nesting for C++, Rust, JS r=kats
These are the changes from https://github.com/mozsearch/mozsearch/pull/212
(including the typo fixes requested today.

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

--HG--
extra : moz-landing-system : lando
2019-06-04 20:49:34 +00:00