Commit Graph

4838 Commits

Author SHA1 Message Date
Sylvestre Ledru
442b5579cf Bug 1383966 - Give the result of the linker detection to OS_LDFLAGS r=glandium
MozReview-Commit-ID: 2zKZtKWMaIs

--HG--
extra : rebase_source : 905206f550feda15c9d317b7281be179effcffae
2017-07-25 07:14:14 +02:00
Tom Prince
f5e17a64ce Bug 1381955 - Don't override RUSTFLAGS to set rust's debuginfo; r=glandium
MozReview-Commit-ID: HevATvXusvE

--HG--
extra : rebase_source : c85d378e9168ffbdd7384710055db6a1806e7a03
2017-07-17 17:13:19 -06:00
Mike Hommey
ef1d3c7153 Bug 1367940 - Pass the make jobserver file descriptors down to cargo. r=gps
cargo 1.19, and later cargo 1.20/rustc 1.19 gained support for the make
jobserver. But that doesn't work unless make passes the jobserver file
descriptors down to subprocesses, which it only does when there is a +
prefixing commands.

--HG--
extra : rebase_source : a00ffb7edb358243ac7b9469941ec6fb5ad84885
2017-07-13 20:07:49 +09:00
Mike Shal
29be674102 Bug 1380381 - Set rust debuginfo=1 for cross-OSX builds; r=glandium a=kwierso to reopen this CLOSED TREE
This is similar to bug 1301751, where something in rust seems to trigger errors
running dsymutil to generate debug symbols in OSX. We can set debuginfo=1 for
these builds as a temporary workaround for now, while we work on a more
permanent solution in rust and/or dsymutil. debuginfo=1 still gives us enough
info for stack traces, although without line info. debuginfo=2 would be useful
for debugging, but is irrelevant to crash reports.

MozReview-Commit-ID: DdA00GzVfWg

--HG--
extra : amend_source : 47d3573042098194a07f9b473e4a02c86a1eba7c
2017-07-13 18:49:10 -04:00
Mike Hommey
ed863255b4 Bug 1378592 - Remove MOZ_REPLACE_MALLOC_LINKAGE. r=froydnj
MOZ_REPLACE_MALLOC_LINKAGE was added back when there were problems with
getting weak references working properly for replace-malloc.

Versions of OSX < 10.6 needed flat namespace, but aren't supported
anymore.

Versions of Xcode < 4.5 required flat namespace + a dummy library in
order to produce proper weak references. There is virtually nobody still
building with such an ancient toolchain.

Keeping those around doesn't /really/ hurt, except recent versions of
Xcode don't expose dyldinfo in /usr/bin, used for the configure test.
Consequently, MOZ_REPLACE_MALLOC_LINKAGE ended up being set to use the
dummy library setup, which, by using flat namespace, now causes harm in
bug 1356701, causing bug 1378332.

--HG--
extra : rebase_source : e3edc1f2cf905943c33fafeb631f2f88fc87167e
2017-07-06 10:26:04 +09:00
Nathan Froyd
c4db85fbe1 Bug 1378440 - part 2 - add mach cargo check; r=rillian
Cargo recently introduced the `cargo check` command for shortening the
edit-compile cycle when working on large programs.  Since we don't
really support invoking `cargo` directly, let's wire up this command to
`mach`.  Gecko developers can then `mach cargo check` to ensure their
changes typecheck.
2017-07-05 14:19:31 -04:00
Nathan Froyd
d73da35d6b Bug 1378440 - part 1 - make Cargo invocation macro more generic; r=rillian
All the machinery we set up for `cargo build` is equally useful for
other commands, such as `cargo check`.  Let's refactor things so that
it's easy to reuse said machinery for `cargo check`.
2017-07-05 14:19:31 -04:00
Nathan Froyd
2c6c66c145 Bug 1377971 - part 3 - honor LIB_IS_C_ONLY in more cases; r=glandium
We currently only honor LIB_IS_C_ONLY for cases where we set a
LIBRARY (and, implicitly, REAL_LIBRARY) and FORCE_SHARED_LIB.  For many
libraries, such as the libraries from NSS, we never set LIBRARY, which
leads to not setting REAL_LIBRARY, which leads to not honoring
LIB_IS_C_ONLY.  This practice has not been harmful thus far (except
perhaps linking in more things than necessary to our NSS shared
libraries), but on some platforms, linking with the C++ compiler will
drag in more things than we would like.

Consulting LIBRARY first should not be necessary; checking
FORCE_SHARED_LIB should be enough to tell us if we're building a shared
library for the purposes of honoring LIB_IS_C_ONLY.
2017-07-05 14:05:10 -04:00
Nicholas Nethercote
b003a6a704 Bug 1377803 - Remove an unnecessary plarena.h #include in WebRTC. r=drno,glandium.
We can avoid the symbol visibility problem by putting
sanitizer/asan_interface.h in the config/system-headers.

--HG--
extra : rebase_source : bc81a81ef8970c3544febf06631740208583c7fa
2017-07-04 09:58:38 +10:00
Nathan Froyd
87007ca0f2 Bug 1377157 - remove VCINSTALLDIR from cargo's environment when running in MozillaBuild; r=ted.mielczarek
Stable Rust currently has logic similar to the following for finding the
linker on Windows:

  if VCINSTALLDIR in os.env:
    search for things in PATH
    if found, return, otherwise fallthrough

  look for MSVC installations of various kinds

For our current MozillaBuild setup where we clear out PATH prior to
invoking Cargo, this works: even though VCINSTALLDIR is set and we
(unsuccessfully) search through an empty PATH, we'll still fallback to
looking for MSVC installations.

Beta Rust has altered this search strategy:

  if VCINSTALLDIR in os.env:
    search for things in PATH
    return the result of the search, regardless of success

  look for MSVC installations of various kinds

Note that in the above logic, if VCINSTALLDIR is set, we are only going
to try looking in PATH for an appropriate linker.  Since PATH is empty
in our current MozillaBuild setup, beta Rust will therefore fail to find
the correct linker.  This failure causes numerous problems.

Since Firefox is already trying to "clean" the environment that Cargo is
invoked in, we should work a little bit harder by unsetting VCINSTALLDIR
entirely, and simply force Rust to search for known MSVC installations.
Making this change makes stable and beta Rust behave identically.

(We don't have to worry about this distinction in automation, because
the "cleaning" code is only activated when we detect a MozillaBuild
shell.)
2017-06-29 13:41:57 -04:00
Nicolas B. Pierron
702d71cbd0 Bug 1376921 - Remove mips from the list of checked MacroAssemblers. r=tcampbell 2017-06-29 18:49:10 +00:00
André Bargull
f277dc9e4b Bug 1353650 - Part 4: Update to ICU 59. rs=Waldo
--HG--
extra : rebase_source : bb1dcedef639ae3a9ee76521d8f9212831918ce4
2017-04-19 07:00:05 -07:00
André Bargull
cbcc8cbf51 Bug 1353650 - Part 3.1: Add unicode/unistr.h to system-headers to unbreak system-ICU builds. r=glandium
--HG--
extra : rebase_source : 05956804a24ddd1aa21aaa79b726102b9160186c
2017-05-11 01:30:09 -07:00
André Bargull
f57a277cd5 Bug 1353650 - Part 2: Update ICU stubdata build file for ICU 59. r=Waldo
--HG--
extra : rebase_source : 7d52b78212ae7973cbf6e68debdcce4c5336f7c3
2017-04-05 13:42:09 +02:00
Jeff Gilbert
58ae26fbc7 Bug 1376057 - Replace MSVC wrappers with std::exception::_Set_raise_handler. - r=froydnj
MozReview-Commit-ID: MG5c4bzDlI
2017-06-27 11:51:34 -07:00
Ted Mielczarek
94c9fe93f2 bug 1357825 - use sccache for caching Rust compilation. r=froydnj
MozReview-Commit-ID: 84PCmiVBlrV

--HG--
extra : rebase_source : ae23d383a1a2057d7027a4a6ffc9cfa4e3e15fcf
extra : histedit_source : 031e0d29f15b07208a08aba477d7bc9ca5a3f196
2017-05-01 11:58:45 -04:00
Chris Manchester
479795876a Bug 1370695 - Remove build system code handling binary components. r=glandium
MozReview-Commit-ID: BKHWR34vWsu

--HG--
extra : rebase_source : d870a222d393479bb8ede2aaec571299488806c0
2017-06-13 16:01:45 -07:00
Henri Sivonen
763d66dd51 Bug 1261841 part 4 - Add a configuration option for enabling explicit SIMD in Rust. r=froydnj.
MozReview-Commit-ID: ICifcJ9499a
2017-06-13 13:24:19 +03:00
ffxbld
120e57745f Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2017-06-12 13:48:15 +01:00
Ryan VanderMeulen
9b7a73b65a Merge m-c to autoland. a=merge
UPGRADE_NSPR_RELEASE UPGRADE_NSS_RELEASE

--HG--
extra : amend_source : a59e53ba2f8db608f613f21ad6da2b5be8814aa4
2017-06-07 22:55:56 -04:00
Marco Castelluccio
adc55303d4 Bug 1322803 - Allow setting additional rustflags via mozconfig. r=ted
--HG--
extra : rebase_source : 996d0e0f9ac85c10ad7b188585e823da74407384
2017-06-06 01:05:10 +01:00
Petr Sumbera
65cd55b48b Bug 1354576 - Allow to build NSPR on Solaris again. r=ted 2017-05-30 01:36:00 -07:00
Makoto Kato
9aa2fd8eed Bug 1364023 - Remove LOCALE_SNAME define for ICU build. r=glandium
Since we set WINVER=601 after dropping Windows XP support, it is unnecessary to define LOCALE_SNAME.  So, we should remove it to remove compiler warning.

MozReview-Commit-ID: EawbHAznXNA

--HG--
extra : histedit_source : d3157300315052048756c22ac2c999523d28679d
2017-06-05 14:13:16 +09:00
Petr Sumbera
1528ff18ca Bug 1369061 - Add Solaris atomic.h to system-headers. r=glandium
--HG--
extra : rebase_source : 688bb5e4532a83fad0d27067e8146c5839fc7d25
2017-05-31 07:39:41 -07:00
Masatoshi Kimura
755eb30580 Bug 1370511 - Suppress more warnings from MSVC when compiling ICU. r=ted.mielczarek
MozReview-Commit-ID: 6N48ksCMnyn

--HG--
extra : rebase_source : 02130293e25495f8bed3c00e580ae50d9ae548fc
2017-06-06 21:06:42 +09:00
Andreas Tolfsen
e2e6d226e5 Bug 1368264 - Fix missing RUST_PROGRAMS entry in if-condition r=froydnj
Final target Rust programs are currently not picked up and
symlinked/copied to ${objdir}/dist/bin because the RUST_PROGRAMS output
variable is missing from the if-condition.

This change causes Rust binaries from RUST_PROGRAMS to be placed alongside
the other final target programs.

MozReview-Commit-ID: 5OIH1UMmCq2

--HG--
extra : rebase_source : cfcff21e9371b920c895ad27df344008962d7471
2017-06-01 20:08:27 +01:00
Nathan Froyd
0fe161627a Bug 1368177 - quote {LIB,}CLANG_PATH for cargo; r=rillian
These paths can contain spaces, particularly if they point into
${HOME}/.mozbuild on Windows.  If people are bold enough to use the
Windows packages from llvm.org, the LLVM packages are installed by
default into C:\Program Files\LLVM, so paths from there would contain
spaces as well.
2017-05-28 17:13:30 -04:00
Ralph Giles
40e81c774e Bug 1365993 - Don't pass mac frameworks to cargo linker. r=froydnj
Procedural macros for rust are compiled as dynamic libraries.
The compiler subsequently loads those libraries at runtime
when it compiles crates which make use of them.

We pass the generic LDFLAGS to our linker wrapper which ensures
cargo links static libraries with the correct flags. However
this also means that any final system dependency libraries
end up linked into the procedural macro dynamic libraries
whether they use them or not.

When building on macOS 10.7, this causes a SIGTRAP when dlopen
calls CFInitialize for system libraries like Cocoa off the main
thread. We believe this is a macOS bug, reported fixed in macOS 10.9.
https://openradar.appspot.com/7209349

Work around the issue by stripping those libraries and Frameworks
from the linker flags we pass to cargo. We could do a more careful
job of parsing and removing all -framework and -lfoo arguments
inside the linker script, but since this is a temporary issue
while we're using older build machines, I thought just stripping
them once in the build system was simpler.

MozReview-Commit-ID: CGXD8ARvojj

--HG--
extra : rebase_source : 33f28e8fbafb43dbdd257d9162a6e792fca79e51
2017-05-25 14:49:32 -07:00
Ryan VanderMeulen
22d214ae4b Merge autoland to m-c. a=merge 2017-05-23 10:32:42 -04:00
Bruce Sun
30306bfc32 Bug 1358023: (2/2) Build freetype2 by using moz.build; r=glandium 2017-05-22 12:02:14 +08:00
Gregory Szorc
2b1957d1e5 Bug 1361172 - Rewrite code for finding files in VCS checkout; r=glandium
We're getting an intermittent failure running `hg manifest` in CI. I
have no clue why.

What I do know is that we now have the mozversioncontrol Python package
for containing utility code for interacting with version control. It is
slightly more robust and I'm willing to support it more than I am
check_utils.py.

This commit adds a new API to our abstract repository class to obtain the
files in the working directory by querying version control.

Since I suspect cwd was coming into play in automation, I've also
added a utility function to mozversioncontrol to attempt to find
a version control checkout from the current working directory. It
simply traces ancestor paths looking for a .hg or .git directory.

Finally, I've ported all callers of the now-deleted API to the new
one. The old code had some "../.." paths in it, meaning it only
worked when cwd was just right. Since we resolve the absolute path
to the checkout and store it on the repo object, I've updated the
code so it should work no matter what cwd is as long as a repo can
be found. I'm not 100% confident I found all consumers assuming cwd.
But it's a start.

I'm not 100% confident this will fix the intermittent issues in CI. But
at least we should get a better error message and at least we'll be
running less hacky code.

MozReview-Commit-ID: AmCraHXcTEX

--HG--
extra : rebase_source : 815ae369776577ad374333920fd645d412a55148
2017-05-18 16:06:49 -07:00
Xidorn Quan
fed3d8d65c Bug 1336540 - Move config info from build_gecko.rs to a toml file in gecko. r=emilio
MozReview-Commit-ID: 9w9UX38YMUt

--HG--
extra : source : 36bcb2c10614c9b9f597f13d302953f9af14f928
extra : amend_source : 8ac25556385e64fe8fae425ccc9bfdc1cbcc49ef
2017-05-19 12:51:48 +10:00
Wes Kocher
090e554ce2 Backed out 2 changesets (bug 1336540) for build bustage a=backout
Backed out changeset 1bef3928a127 (bug 1336540)
Backed out changeset 42feca9f0e17 (bug 1336540)

MozReview-Commit-ID: 8NH4gZcDy6E
2017-05-18 18:11:12 -07:00
Xidorn Quan
029693f013 Bug 1336540 part 1 - Move config info from build_gecko.rs to a toml file in gecko. r=emilio
MozReview-Commit-ID: 9w9UX38YMUt

--HG--
extra : rebase_source : 36bcb2c10614c9b9f597f13d302953f9af14f928
2017-05-19 10:25:36 +10:00
Iris Hsiao
0bbdca7c50 Merge mozilla-central to autoland
--HG--
rename : memory/mozjemalloc/jemalloc.c => memory/mozjemalloc/mozjemalloc.cpp
2017-05-18 14:15:19 +08:00
Nathan Froyd
4d16361faf Bug 1365668 - turn off select warnings for ICU; r=ted.mielczarek
We don't really care about these warnings, and they're just cluttering
the build.
2017-05-17 14:50:08 -04:00
Jon Coppeard
e26d8d5744 Bug 1361458 - Generate the phase tree for GC statistics recording ahead of time r=sfink 2017-05-17 10:37:18 +01:00
Sebastian Hengst
0c5a87d59f Backed out changeset 36f2908f6650 (bug 1361458) for crashing [@ js::GCMarker::drainMarkStack], e.g. in devtools' devtools/client/debugger/new/test/mochitest/browser_dbg-sourcemaps.js. r=backout 2017-05-17 12:53:58 +02:00
Jon Coppeard
03c00562c3 Bug 1361458 - Generate the phase tree for GC statistics recording ahead of time r=sfink 2017-05-17 10:37:18 +01:00
Makoto Kato
456d320877 Bug 1364840 - Part 1. Add sys/auxv.h to system-headers. r=glandium
gfx/skia/skia/src/core/SkCpu.cpp might use sys/auxv.h to detect CPU feature.  So we should add it to system-headers

MozReview-Commit-ID: SijyUYvLgn

--HG--
extra : rebase_source : 0b509c2f5b4f3272578ae511e9c69cf6b0999c42
2017-05-15 18:30:49 +09:00
Ralph Giles
f56cb16c14 Bug 1336153 - Remove MOZ_RUST. r=ted
We now have code that unconditionally requires the rust
compiler and are committed to adding more. Remove this
last vestige of conditional support.

MozReview-Commit-ID: EK6FBnAbR

--HG--
extra : rebase_source : 6efda10a74f9ca0482304c2b1ffe6941e42138f8
2017-05-09 11:36:13 -07:00
Lee Salzman
20ac00c192 Bug 1350262 - implement prime rehash policy compat for unordered_map and unordered_set in libstdc++. r=glandium
MozReview-Commit-ID: 1zlGjRMKcBM
2017-05-09 22:15:18 -04:00
Iris Hsiao
0b748916e8 merge mozilla-inbound to mozilla-central a=merge 2017-05-08 11:11:20 +08:00
Nathan Froyd
60baca157f Bug 1362516 - disable custom Cargo linker for TSan builds; r=rillian,f=bwc
For all the same reasons as why we disable the linker for ASan builds.
2017-05-05 16:53:37 -04:00
Ralph Giles
67df295692 Bug 1314147 - Add --enable-av1 configure switch. r=froydnj
Build system switch for optional inclusion of libaom
for support of the Alliance for Open Media AV1 video
codec.

MozReview-Commit-ID: 2C4o1ogRS9v

--HG--
extra : rebase_source : d4a68f1fc4654895f62a905666f0b75726e20e7f
2017-04-18 09:08:18 -07:00
Nick Alexander
744e5386aa Bug 1361418 - Remove Java Addons from Firefox for Android. r=sebastian
The Java Addons mechanism never got traction and is not Web Extensions
compatible.  Removing it simplifies the product and the build system.

MozReview-Commit-ID: ABUxkqqMISa

--HG--
extra : rebase_source : 346f88882774f072316714cf637a54d771d81a9a
2017-05-02 11:49:16 -07:00
Gregory Szorc
3712aeca37 Bug 1304508 - Remove makefile mkdir testing; r=ted
Several years ago, joey starting writing a handful of unit tests for
primitives in our make files. IIRC a lot of the impetus behind this
work was to flush out bugs between GNU make and pymake.

AFAICT the only survivor of these tests today is check_mkdir.py. The
test is a one-off and has been a bit fragile over the years,
contributing technical debt along the way. And as part of removing the
last references to pymake in automation, it is once again showing
itself and failing in a way that has to do with the way the test
is written and not an issue with the code it is testing. Enough is
enough. This commit removes the test and eliminates the technical
debt. I don't think it will be missed.

MozReview-Commit-ID: 3OzurtFbcyD

--HG--
extra : rebase_source : 6d3cf6121c90e9c47948862b8c4117bb1d3e5afd
2017-04-26 13:27:37 -07:00
Nathan Froyd
d3325ce1a2 Bug 1329737 - part 3 - use an alternate linker for Cargo invocations; r=rillian
For linking static libraries, rustc will use whatever `cc` it finds (or
the equivalent on Windows).  For our purposes, however, `cc` is not what
we use to link and we may have additional options we would like to pass
to the linker.

To do this, we need to tell Cargo about our alternate linker (currently
only used for target compilations, on the theory that the host compiler
rustc finds is probably good enough) and we also need to pass our linker
options into the process.  We do this with environment variables, which
is not a great solution, but works surprisingly well.

This alternate linker is disabled for ASan builds due to peculiar
crashes when running Rust build scripts and for Windows, because we
don't do any interesting cross-compiling there.
2017-04-28 14:06:41 -04:00
Nathan Froyd
67c11f7395 Bug 1329737 - part 2 - turn CARGO_BUILD into a callable function; r=rillian
This change paves the way for injecting target- or host-specific
environment variables for a particular `cargo build` invocation.  Doing
this is not strictly necessary: all of our current `cargo build`
invocations use mostly target-specific environment
variables (e.g. PKG_CONFIG_ALLOW_CROSS).  But separating things out
makes the code notationally cleaner and also avoids weirdness when
target==host.
2017-04-28 14:06:42 -04:00
Tom Ritter
f8c3899ea0 Bug 1353541 Fix rustc in MinGW build r=froydnj,ted
rustc generates .lib files for its libraries when compiling for Windows
(even using MinGW on Linux). But MinGW expects .a files. So we add in
rust-specific prefix and suffixes so MinGW builds can find the libs that
rustc generates. (And the RUST_LIB- variables default to the same vales
as the LIB_ variables otherwise.)

MozReview-Commit-ID: ClsA0YuJaxh

--HG--
extra : rebase_source : 7b46460c94ceb34b7a5a302ce91d3f1dca600041
2017-04-26 12:08:59 -05:00