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

1310 Коммитов

Автор SHA1 Сообщение Дата
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
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
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
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
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
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
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
Robert O'Callahan 5bfc8d6e8f Bug 279212 - More robust argument detection for ELOG; r=bryner
--HG--
extra : rebase_source : 05a6ef097ceec287091dbce09da551cf0093599d
extra : amend_source : b0cc0b867e8f16bce13f0b41df40bfa48a5ef174
2005-01-21 03:56:31 +00:00
Kartikaya Gupta 0993695398 Bug 1355464 - Only clean out the environment variables that are affected by 32- vs 64-bit builds. r=ted
Instead of using the -i flag to clean out the entire set of environment
variables, we explicitly just clear out the variables that are affected by
32- vs 64-bit builds in vcvars.bat. This still allows cargo to use it's
internal autodetection to do host/target builds as it wants when cross-compiling,
but also allows other things that rely on include directories and so on to
work properly.

MozReview-Commit-ID: 99SECKv1zQa

--HG--
extra : rebase_source : 2c2a7d79201b66ac3262afcc5f060936ca2e8fa2
2017-04-11 13:35:40 -04:00
Nathan Froyd 15f364135a Bug 1358597 - always make Cargo verbose in automation; r=ted.mielczarek
This change brings Cargo closer to what our C/C++ build already does,
and some forms of Cargo failure are only diagnosed when you pass
`--verbose`, so let's eliminate that extra step for people.
2017-04-21 22:25:59 -04:00
Nathan Froyd 2989feb7d7 Bug 1353810 - add a --enable-rust-debug option; r=chmanchester
For people working on Rust code, compiling in debug mode (Cargo's "dev"
profile) is convenient: debug assertions are turned on, optimization is
turned off, and parallel compilation inside of rustc itself can be
used.  These things make the build faster and the debugging experience
more pleasant.

To obtain that currently, one needs to --enable-debug at the Gecko
toplevel, which turns on debug assertions for the entire browser, which
makes things run unreasonably slowly.  So it would be desirable to be
able to turn *off* debug mode for the entirety of the browser, but turn
on debug mode for the Rust code only.

Hence this added switch, --enable-rust-debug, which does what it
suggests and defaults to the value of --enable-debug.  For our own
sanity and because we judge it a non-existent use case, we do not
support --enable-debug --disable-rust-debug.
2017-04-12 21:49:25 -04:00
Chris Manchester 5c47bb8d2e Bug 1337986 - Dump symbols during the compile tier. r=ted
This commit moves symbol dumping to the compile tier, to be run via "syms"
targets. Tracking files are used for the sake of incremental builds, because
dump_syms may genearate multiple outputs whose paths are not known ahead of
time.

Minimal changes to symbolstore.py are made here. More extensive
simplifications will be made in a future commit on the basis of symbolstore.py
handling one file at a time.

MozReview-Commit-ID: 3mOP8A6Y7iM

--HG--
extra : rebase_source : bfe97afcdfc05b9e79f01577701c83e8b00eb4e9
2017-02-10 08:34:08 -08:00
Chris Manchester 4db8e0b54a Bug 1337986 - Generate "syms" targets for directories containing programs or shared libraries. r=glandium
This creates "syms" targets that depend on the corresponding "target" for
directories containing shared libraries or programs. These targets are added
to the main compile graph in automation, and can be invoked through a special
"symbols" target. A future commit will use these targets to dump symbols for
shared libraries and programs during the compile tier.

MozReview-Commit-ID: KLuvmqsK4Zj

--HG--
extra : rebase_source : 8d76b999cb6fac8f11168ac6ebfb58774dfc2d3c
2017-04-10 10:27:49 -07:00
Carsten "Tomcat" Book 3a762886de Merge mozilla-central to mozilla-inbound 2017-04-07 15:33:03 +02:00
Michael Layzell a6f6b4a390 Bug 1320179 - Part 4: MOZ_OBJDIR->MOZ_TOPOBJDIR and update m-c-changes.patch for protobuf changes, r=fitzgen
MozReview-Commit-ID: EPhkF350sGY
2017-04-06 18:37:31 -04:00
Michael Layzell 981693a30f Bug 1320179 - Part 2: Add the nserror rust crate and generate NS_ERROR codes, r=froydnj
MozReview-Commit-ID: FFU6WfEqev
2017-04-06 18:37:25 -04:00
Wes Kocher 1f91b9d155 Backed out 4 changesets (bug 1320179) for causing merge conflicts a=backout
Backed out changeset b8aa677f7452 (bug 1320179)
Backed out changeset 9e2f77570128 (bug 1320179)
Backed out changeset 470d8143b350 (bug 1320179)
Backed out changeset ea4f1b3cc7b1 (bug 1320179)
2017-04-06 15:29:24 -07:00
Michael Layzell c33097aeaa Bug 1320179 - Part 4: MOZ_OBJDIR->MOZ_TOPOBJDIR and update m-c-changes.patch for protobuf changes, r=fitzgen
MozReview-Commit-ID: EPhkF350sGY
2017-04-06 17:37:13 -04:00
Michael Layzell df411f4313 Bug 1320179 - Part 2: Add the nserror rust crate and generate NS_ERROR codes, r=froydnj
MozReview-Commit-ID: FFU6WfEqev
2017-04-06 17:22:08 -04:00
Kartikaya Gupta 8e237884f7 Bug 1350001 - Run cargo in a clean environment when running in a MozillaBuild shell. r=ted
This prevents the variables set in vcvars.bat from causing build failures when
cargo tries to process build scripts in an environment where the default rust
toolchain doesn't match the MozillaBuild shell (in terms of 32-bit or 64-bit).

MozReview-Commit-ID: 5VRnQToYUYf

--HG--
extra : rebase_source : 4ac11f13e17ab04e70c7cb6f60ff46865027f506
2017-04-06 09:59:14 -04:00
Mike Hommey 77e5b564fc Bug 1353640 - Also check sources in the objdir to preprocess generated sources. r=mshal
--HG--
extra : rebase_source : f4334635680d54e730346798450db8722f0443ff
2017-04-05 16:39:51 +09:00
Mike Hommey 91b701d7c6 Bug 1353640 - Use more targetted vpath instead of broad VPATH for preprocessor rules. r=mshal
VPATH applies to everything, but vpath applies to files matching the
pattern it's given.

--HG--
extra : rebase_source : 17339820e34f4d2f3d4ddde1a8a4325e92bfdb9e
2017-04-05 16:36:24 +09:00
Mike Hommey 9939009c87 Bug 1353640 - Avoid the preprocessor rules creating dependency files. r=mshal
--HG--
extra : rebase_source : bb9916f99533f518f1e65d5309130024c9288fb6
2017-04-05 16:33:37 +09:00
Mike Hommey b7fd4125eb Bug 1353640 - Factor the preprocessing rules to avoid all the redundancy. r=mshal
--HG--
extra : rebase_source : 4e45edfc94b06877ce25f1df5832faf61b236f66
2017-04-05 16:31:40 +09:00
Mike Hommey 767a11189c Bug 1353259 - Remove build system parts that generate a dtrace ELF object. r=mshal
The code doing that was already excluding OSX, so we obviously don't
need it on OSX. On FreeBSD, afaict, USDT (userspace dtrace) probes don't
require that extra ELF object. Solaris presumably does, but the 6 years
old bug 702179 says it's not been working for that long, and configure
doesn't support Solaris targets anyways.

Keeping this build system code working past the changes coming in bug
1262241 is not guaranteed and can't be tested, so I'd rather get rid of
effectively dead code rather than trying to maybe not break it while
moving it.

--HG--
extra : rebase_source : b41ab77804c17529e2580ced8e8b5fd302ff7831
2017-04-04 13:30:44 +09:00
Mike Hommey f4f1b7ba10 Bug 1353259 - Remove rules.mk sections depending on DTRACE_LIB_DEPENDENT. r=mshal
Nothing sets DTRACE_LIB_DEPENDENT.

--HG--
extra : rebase_source : adc650b19f1fa3af519d47482998033ccabb83a3
2017-04-04 13:28:11 +09:00
Xidorn Quan 12ae34813a Bug 1348157 - Add RUST_BACKTRACE=1 for cargo build. r=glandium
MozReview-Commit-ID: LOqNlOWZ2fC

--HG--
extra : source : a71fcfc7da72c159537cb3fd5ff9e3ef26168dac
2017-03-22 10:08:48 +11:00
Geoff Brown df122d5bfa Bug 1340584 - Remove devicemanagerSUT and references to sutagent; r=wlach
sutagent is no longer built or used; devicemanagerSUT is completely
unused. After this change, devicemanagerADB is the only implementation of
devicemanager, and test harness options like --dm_trans are eliminated.
2017-03-21 12:20:01 -06:00
Makoto Kato 37ffe9aa86 Bug 1340393 - Remove -FS option on SIMPLE_PROGRAM. r=glandium
Although bug 1322703 is backed out, we can remove -FS options to build SIMPLE_PROGRAM.

MozReview-Commit-ID: 7uO3We5hc5n

--HG--
extra : rebase_source : 6f909c4f38ba5a5bdffed7f9ca5be0030b9c681b
2017-03-07 17:19:04 +09:00
Chris Manchester 69554aaee0 Bug 1339673 - Only force re-linking during PGO builds for the compile tier. r=glandium
Depending on a library or program in misc during a pgo build causes extraneous
rebuilding due to an added FORCE dependency, so we stop adding it except during
the compile tier.

MozReview-Commit-ID: 91dZFa6IRzt

--HG--
extra : rebase_source : 9994a5c05865c81d95ea075c753e270d3c223570
2017-02-17 11:08:50 -08:00
Sebastian Hengst 0c32b64e57 Backed out changeset 4aa866ebfeaa (bug 1322703) 2017-03-01 18:45:56 +01:00
Ted Mielczarek be6f12e547 bug 1322703 - use -Fd to specify unique PDB filename per-object-file for MSVC. r=glandium
MozReview-Commit-ID: CxpLruksaHg
2017-03-01 18:41:46 +01:00
Ted Mielczarek b89045917e backout b7a2f7ff5e87 (bug 1322703) for making local xul.dll link times way slower
MozReview-Commit-ID: 5QVFWVhfFfD
2017-03-01 10:37:35 -05:00
Nathan Froyd 1cbbd567b5 Bug 1302704 - part 1 - define CARGO_TARGET_DIR in the backend; r=chmanchester
CARGO_TARGET_DIR is currently hardcoded to the current directory, but
we'd like the ability to choose a value for Rust libraries.
2017-02-23 10:35:07 -05:00
Phil Ringnalda 53ccf8158e Backed out 5 changesets (bug 1318370) for mozilla-central Windows static-analysis bustage
Backed out changeset 196f9ddbf7aa (bug 1318370)
Backed out changeset 72f6eace33a1 (bug 1318370)
Backed out changeset c0c0e10ed613 (bug 1318370)
Backed out changeset a8032ae9cb2a (bug 1318370)
Backed out changeset 0848b3201c40 (bug 1318370)
2017-02-21 21:22:01 -08:00
Ted Mielczarek 5d759be63f bug 1318370 - stop using -Z7 for MSVC compilation with sccache. r=glandium
We've been using -Z7 to make MSVC emit CodeView debug info directly in
the object files instead of in PDB files because sccache can't cache
PDB files if the same one is written to by multiple compiles, which
was previously happening in our build system, and was hard to override
in the NSS build. Now that those are fixed this should work fine.

This adds a bit to the compile rule to remove the PDB file before
compilation, since sccache won't cache a compilation if the PDB file
it is supposed to generate already exists (for the aforementioned reason).

MozReview-Commit-ID: rFlX0XfTGw

--HG--
extra : rebase_source : 8f991ce72115537466f5720c20dc53083f3b2b35
2016-12-14 14:58:26 -05:00
Ralph Giles 1021cfbd7f Bug 1340672 - Don't clobber CARGOFLAGS in non-debug builds. r=froydnj
Previously, we overrode the CARGOFLAGS when we set --release
for non-debug builds. This was an oversight from bug 1310939.

MozReview-Commit-ID: LOBkCmxwDzc

--HG--
extra : rebase_source : 0325d1705cb28d6c82369abffc6fac3ca5ee6f0a
2017-02-17 12:50:29 -08:00
Ralph Giles d3fb57abec Bug 1340587 - Remove MOZ_CARGO_SUPPORTS_FROZEN. r=froydnj
We now require cargo by version, and the minimum (0.16)
supports --frozen, so we don't need to check for this.

MozReview-Commit-ID: GPoadLkhRO5

--HG--
extra : rebase_source : e191e5dd2533e28c1bca0812f2776196cc3559cf
2017-02-17 12:16:45 -08:00
Mike Shal e86326d270 Bug 1338559 - Use the tier system to recurse for 'make check'; r=glandium
This helps us avoid recursing over every directory when we only need to
run 'make check' in a select few.

MozReview-Commit-ID: BJ3hJBOneIz

--HG--
extra : rebase_source : 2493f924b9ccba3c779e512d7a8b7a2c26f43797
2017-02-03 16:47:28 -05:00
Ted Mielczarek 778b18b977 bug 1322703 - use -Fd to specify unique PDB filename per-object-file for MSVC. r=glandium
MozReview-Commit-ID: CxpLruksaHg

--HG--
extra : rebase_source : 16087aba96fb7e0d7f764b4ca21d27a78a19df4d
2016-12-14 14:40:59 -05:00
Kartikaya Gupta 7ed8a4e41a Bug 1337895 - Make the pkg-config rust crate happy when cross-compiling. r=froydnj
MozReview-Commit-ID: 1430wwCYbj4

--HG--
extra : rebase_source : a66e085219992f0cb75857afebeb1003df95bbdd
2017-02-08 14:13:50 -05:00
Gregory Szorc 19ffcf1738 Bug 1322769 - Declare servo rust feature properly; r=manishearth
268fa5f3bc25 grafted an old patch to define --features=servo in
rules.mk. That patch was written before RUST_LIBRARY_FEATURES
existed. This commit fixes it up.

MozReview-Commit-ID: L5atm5CsP8d

--HG--
extra : amend_source : 9362db15a696ebd5871df94afb429d6f828de184
2017-02-02 16:32:54 -08:00
Gregory Szorc aaae03d7a8 Bug 1322769 - Add a "servo" feature; r=manishearth
MozReview-Commit-ID: A9dNTxNkl39

--HG--
extra : rebase_source : b9d115025beb00d596d34ca8d414a69b8ea2ba07
extra : source : f142ed52978bfab6407c252b7c56c53d0c3fcecd
2017-02-02 15:30:16 -08:00
Wes Kocher f5eab47fb9 Merge m-c to autoland, a=merge
MozReview-Commit-ID: HVH8TbXbw7N
2017-02-01 16:30:50 -08:00
Michael Layzell 0dadca05f7 Bug 1335203 - Synchronize rust debug-assertions with C++ DEBUG, r=froydnj
MozReview-Commit-ID: JPD9eNFg89S
2017-02-01 13:54:22 -05:00
Chris Manchester d668d760b9 Bug 1333135 - Do not attempt to install SIMPLE_PROGRAMS during MOZ_PROFILE_GENERATE. r=mshal
MozReview-Commit-ID: BNvX0dFAIUf

--HG--
extra : rebase_source : ef5ccc377253b27012c7501197c232a18097a4f5
2017-02-01 10:59:41 -08:00