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

244 Коммитов

Автор SHA1 Сообщение Дата
Michael Woerister 785600d4d3 Bug 1613649 - Explicitly opt-out of Rust's local ThinLTO for DEVELOPER_OPTIONS builds. r=firefox-build-system-reviewers,chmanchester
By default the Rust compiler will perform a limited kind of ThinLTO on each
crate. For local builds this additional optimization is not worth the
increase in compile time.

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

--HG--
extra : moz-landing-system : lando
2020-02-07 08:55:04 +00:00
Marco Castelluccio 459b81c52f Bug 1509665 - Only pass the base compiler flags for all coverage builds. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D61504

--HG--
extra : moz-landing-system : lando
2020-02-03 20:43:07 +00:00
Dzmitry Malyshau a98a848163 Bug 1611296 - Replace spirv_cross by a wrapper crate with a different name r=jrmuizel
This works around a check in rustc that skips object files that start with the rust crate name when linking with LTO.
See upstream https://github.com/rust-lang/rust/issues/66285#issuecomment-578163265
Also, re-enables LTO for macOS fuzzy builds, since it was disabled previously in bug 1595805 as a workaround.

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

--HG--
rename : third_party/rust/spirv_cross/.cargo-checksum.json => third_party/rust/spirv-cross-internal/.cargo-checksum.json
rename : third_party/rust/spirv_cross/Cargo.toml => third_party/rust/spirv-cross-internal/Cargo.toml
rename : third_party/rust/spirv_cross/build.rs => third_party/rust/spirv-cross-internal/build.rs
rename : third_party/rust/spirv_cross/src/bindings_native.rs => third_party/rust/spirv-cross-internal/src/bindings_native.rs
rename : third_party/rust/spirv_cross/src/bindings_wasm.rs => third_party/rust/spirv-cross-internal/src/bindings_wasm.rs
rename : third_party/rust/spirv_cross/src/bindings_wasm_functions.rs => third_party/rust/spirv-cross-internal/src/bindings_wasm_functions.rs
rename : third_party/rust/spirv_cross/src/compiler.rs => third_party/rust/spirv-cross-internal/src/compiler.rs
rename : third_party/rust/spirv_cross/src/emscripten.rs => third_party/rust/spirv-cross-internal/src/emscripten.rs
rename : third_party/rust/spirv_cross/src/glsl.rs => third_party/rust/spirv-cross-internal/src/glsl.rs
rename : third_party/rust/spirv_cross/src/hlsl.rs => third_party/rust/spirv-cross-internal/src/hlsl.rs
rename : third_party/rust/spirv_cross/src/lib.rs => third_party/rust/spirv-cross-internal/src/lib.rs
rename : third_party/rust/spirv_cross/src/msl.rs => third_party/rust/spirv-cross-internal/src/msl.rs
rename : third_party/rust/spirv_cross/src/ptr_util.rs => third_party/rust/spirv-cross-internal/src/ptr_util.rs
rename : third_party/rust/spirv_cross/src/spirv.rs => third_party/rust/spirv-cross-internal/src/spirv.rs
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/.clang-format => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/.clang-format
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/.gitignore => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/.gitignore
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/CMakeLists.txt => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/CMakeLists.txt
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/GLSL.std.450.h => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/GLSL.std.450.h
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/LICENSE => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/LICENSE
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/Makefile => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/Makefile
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/cmake/gitversion.in.h => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/cmake/gitversion.in.h
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/format_all.sh => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/format_all.sh
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/gn/BUILD.gn => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/gn/BUILD.gn
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/include/spirv_cross/barrier.hpp => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/include/spirv_cross/barrier.hpp
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/include/spirv_cross/external_interface.h => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/include/spirv_cross/external_interface.h
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/include/spirv_cross/image.hpp => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/include/spirv_cross/image.hpp
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/include/spirv_cross/internal_interface.hpp => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/include/spirv_cross/internal_interface.hpp
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/include/spirv_cross/sampler.hpp => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/include/spirv_cross/sampler.hpp
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/include/spirv_cross/thread_group.hpp => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/include/spirv_cross/thread_group.hpp
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/main.cpp => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/main.cpp
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/pkg-config/spirv-cross-c-shared.pc.in => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/pkg-config/spirv-cross-c-shared.pc.in
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/spirv.h => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/spirv.h
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/spirv.hpp => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/spirv.hpp
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/spirv_cfg.cpp => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/spirv_cfg.cpp
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/spirv_cfg.hpp => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/spirv_cfg.hpp
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/spirv_common.hpp => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/spirv_common.hpp
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/spirv_cpp.cpp => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/spirv_cpp.cpp
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/spirv_cpp.hpp => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/spirv_cpp.hpp
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/spirv_cross.cpp => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/spirv_cross.cpp
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/spirv_cross.hpp => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/spirv_cross.hpp
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/spirv_cross_c.cpp => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/spirv_cross_c.cpp
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/spirv_cross_c.h => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/spirv_cross_c.h
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/spirv_cross_containers.hpp => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/spirv_cross_containers.hpp
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/spirv_cross_error_handling.hpp => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/spirv_cross_error_handling.hpp
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/spirv_cross_parsed_ir.cpp => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/spirv_cross_parsed_ir.cpp
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/spirv_cross_parsed_ir.hpp => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/spirv_cross_parsed_ir.hpp
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/spirv_cross_util.cpp => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/spirv_cross_util.cpp
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/spirv_cross_util.hpp => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/spirv_cross_util.hpp
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/spirv_glsl.cpp => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/spirv_glsl.cpp
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/spirv_glsl.hpp => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/spirv_glsl.hpp
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/spirv_hlsl.cpp => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/spirv_hlsl.cpp
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/spirv_hlsl.hpp => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/spirv_hlsl.hpp
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/spirv_msl.cpp => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/spirv_msl.cpp
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/spirv_msl.hpp => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/spirv_msl.hpp
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/spirv_parser.cpp => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/spirv_parser.cpp
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/spirv_parser.hpp => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/spirv_parser.hpp
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/spirv_reflect.cpp => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/spirv_reflect.cpp
rename : third_party/rust/spirv_cross/src/vendor/SPIRV-Cross/spirv_reflect.hpp => third_party/rust/spirv-cross-internal/src/vendor/SPIRV-Cross/spirv_reflect.hpp
rename : third_party/rust/spirv_cross/src/wrapper.cpp => third_party/rust/spirv-cross-internal/src/wrapper.cpp
rename : third_party/rust/spirv_cross/src/wrapper.hpp => third_party/rust/spirv-cross-internal/src/wrapper.hpp
rename : third_party/rust/spirv_cross/tests/common/mod.rs => third_party/rust/spirv-cross-internal/tests/common/mod.rs
rename : third_party/rust/spirv_cross/tests/glsl_tests.rs => third_party/rust/spirv-cross-internal/tests/glsl_tests.rs
rename : third_party/rust/spirv_cross/tests/hlsl_tests.rs => third_party/rust/spirv-cross-internal/tests/hlsl_tests.rs
rename : third_party/rust/spirv_cross/tests/msl_tests.rs => third_party/rust/spirv-cross-internal/tests/msl_tests.rs
rename : third_party/rust/spirv_cross/tests/shaders/array.vert => third_party/rust/spirv-cross-internal/tests/shaders/array.vert
rename : third_party/rust/spirv_cross/tests/shaders/array.vert.spv => third_party/rust/spirv-cross-internal/tests/shaders/array.vert.spv
rename : third_party/rust/spirv_cross/tests/shaders/rasterize_disabled.vert => third_party/rust/spirv-cross-internal/tests/shaders/rasterize_disabled.vert
rename : third_party/rust/spirv_cross/tests/shaders/rasterize_disabled.vert.spv => third_party/rust/spirv-cross-internal/tests/shaders/rasterize_disabled.vert.spv
rename : third_party/rust/spirv_cross/tests/shaders/sampler.frag => third_party/rust/spirv-cross-internal/tests/shaders/sampler.frag
rename : third_party/rust/spirv_cross/tests/shaders/sampler.frag.spv => third_party/rust/spirv-cross-internal/tests/shaders/sampler.frag.spv
rename : third_party/rust/spirv_cross/tests/shaders/simple.vert => third_party/rust/spirv-cross-internal/tests/shaders/simple.vert
rename : third_party/rust/spirv_cross/tests/shaders/simple.vert.spv => third_party/rust/spirv-cross-internal/tests/shaders/simple.vert.spv
rename : third_party/rust/spirv_cross/tests/shaders/specialization.comp => third_party/rust/spirv-cross-internal/tests/shaders/specialization.comp
rename : third_party/rust/spirv_cross/tests/shaders/specialization.comp.spv => third_party/rust/spirv-cross-internal/tests/shaders/specialization.comp.spv
rename : third_party/rust/spirv_cross/tests/shaders/struct.frag => third_party/rust/spirv-cross-internal/tests/shaders/struct.frag
rename : third_party/rust/spirv_cross/tests/shaders/struct.frag.spv => third_party/rust/spirv-cross-internal/tests/shaders/struct.frag.spv
rename : third_party/rust/spirv_cross/tests/shaders/struct.vert => third_party/rust/spirv-cross-internal/tests/shaders/struct.vert
rename : third_party/rust/spirv_cross/tests/shaders/struct.vert.spv => third_party/rust/spirv-cross-internal/tests/shaders/struct.vert.spv
rename : third_party/rust/spirv_cross/tests/shaders/workgroup.comp => third_party/rust/spirv-cross-internal/tests/shaders/workgroup.comp
rename : third_party/rust/spirv_cross/tests/shaders/workgroup.comp.spv => third_party/rust/spirv-cross-internal/tests/shaders/workgroup.comp.spv
rename : third_party/rust/spirv_cross/tests/spirv_tests.rs => third_party/rust/spirv-cross-internal/tests/spirv_tests.rs
extra : moz-landing-system : lando
2020-01-24 14:55:41 +00:00
Nathan Froyd eb3bb8c956 Bug 1605215 - add install rules for `WASM_LIBRARY`; r=firefox-build-system-reviewers,rstewart
Differential Revision: https://phabricator.services.mozilla.com/D57871

--HG--
extra : moz-landing-system : lando
2019-12-19 21:41:23 +00:00
Razvan Maries eef36cc7e7 Backed out 2 changesets (bug 1605215) for perma fails on test_emitter.py. CLOSED TREE
Backed out changeset 2e26df04968e (bug 1605215)
Backed out changeset de5881f3d6ce (bug 1605215)
2019-12-19 23:36:43 +02:00
Nathan Froyd b9a840ed0e Bug 1605215 - add install rules for `WASM_LIBRARY`; r=firefox-build-system-reviewers,rstewart
Differential Revision: https://phabricator.services.mozilla.com/D57871

--HG--
extra : moz-landing-system : lando
2019-12-19 20:53:53 +00:00
Ricky Stewart 6f304a37d1 Bug 1599648 - Add a py3_action build action r=firefox-build-system-reviewers,mshal
Differential Revision: https://phabricator.services.mozilla.com/D55031

--HG--
extra : moz-landing-system : lando
2019-11-27 23:38:49 +00:00
Chris Manchester 09ba0f0398 Bug 1595674 - Make the rust build respect -j1. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D54060

--HG--
extra : moz-landing-system : lando
2019-11-22 19:42:38 +00:00
Jesse Schwartzentruber c8984db985 Bug 1596950 - Pass compiler flags to cargo for cross-compiled ASAN and fuzzing builds. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D53304

--HG--
extra : moz-landing-system : lando
2019-11-21 15:06:27 +00:00
Dzmitry Malyshau 8088fe5c1d Bug 1595805 - Disable LTO on macosx fuzzy builds r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D52688

--HG--
extra : moz-landing-system : lando
2019-11-12 16:41:23 +00:00
Chun-Min Chang 7f26e8dfa4 Bug 1591249 - Bump coreaudio-sys to 0.2.3. r=glandium
The current coreaudio-sys in gecko is a custom 0.2.2 version that used
to avoid the cross-compiling issue mentioned in bug 1569003. The issue
has been fixed in the coreaudio-sys 0.2.3, so we should follow the
upstream instead of using a custom version. As a result, the
coreaudio-sys would generate API bindings based on the MacOS SDK defined
in the build settings.

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

--HG--
extra : moz-landing-system : lando
2019-10-31 20:14:00 +00:00
Christian Holler 4c144ccda1 Bug 1592250 - Disable libFuzzer instrumentation in TSan builds. r=dmajor
Differential Revision: https://phabricator.services.mozilla.com/D50922

--HG--
extra : moz-landing-system : lando
2019-10-29 14:03:40 +00:00
Christian Holler d6a021d2b4 Bug 1590465 - Disable rust networking check with TSan. r=jseward
Differential Revision: https://phabricator.services.mozilla.com/D50091

--HG--
extra : moz-landing-system : lando
2019-10-23 09:52:04 +00:00
Jesse Schwartzentruber 146562d993 Bug 1581158 - Add fuzzing target for rkv r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D45891

--HG--
rename : tools/fuzzing/moz.build => tools/fuzzing/rust/moz.build
extra : moz-landing-system : lando
2019-09-20 21:27:35 +00:00
Mike Shal 3b8df1c395 Bug 1580028 - Always merge PGO profile data in the run task; r=firefox-build-system-reviewers,chmanchester
If the run task generates bad profile data, the merge step in the
profile-use task will fail. However, retrying the profile-use task
doesn't fix the problem, and there isn't a straightforward way to retry
the run task in this situation. Instead we can add a clang toolchain to
all the run tasks, and perform the merge there.

This means the output from the run task will always be a successfully
merged file called 'merged.profdata', and we no longer need to perform
the merge as part of the profile-use build as a GENERATED_FILES step.

Depends on D45262

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

--HG--
extra : moz-landing-system : lando
2019-09-10 21:56:15 +00:00
Mike Hommey 5426bad1b9 Bug 1575484 - Don't LTO gkrust-gtest. r=froydnj
We don't actually care that much about LTO'ing the rust parts of libxul
for gtests, and not LTO'ing it would save multiple minutes of build time
on automation.

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

--HG--
extra : moz-landing-system : lando
2019-08-21 11:14:14 +00:00
Mike Hommey c15df41c2f Bug 1573566 - Undo bug 1573314 and bug 1572046. r=froydnj
With the addition of toolkit/library/build because of the rust
shenanigans, bug 1573314 and bug 1572046 don't do anything useful
anymore. We're going to do something better anyways.

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

--HG--
extra : moz-landing-system : lando
2019-08-16 14:39:54 +00:00
Mike Hommey 0637bfef3e Bug 1572046 - Build shared libraries in a separate target. r=nalexander
When a directory, like toolkit/library, builds both a static and a
shared library, and another, like toolkit/library/gtest, depends on the
static part, it currently needs to wait for the shared library to be
finished building, preventing both libraries being built in parallel.

By separating shared libraries to a different target, we allow more
parallelism to the build.

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

--HG--
extra : moz-landing-system : lando
2019-08-07 22:50:14 +00:00
Nathan Froyd 3f8bbdf042 Bug 1437452 - add makefile bits for cross-language PGO; r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D36772

--HG--
extra : moz-landing-system : lando
2019-08-01 21:27:11 +00:00
Eric Rahm a2d6b2398d Bug 1565757 - Don't run networking binary checks on PGO instrumented builds. r=mshal
We don't need to run binary checks on the instrumentation builds, only the final optimized build.

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

--HG--
extra : moz-landing-system : lando
2019-07-17 19:01:46 +00:00
Adam Gashlin 55b9f173eb Bug 1561749 - Link Rust programs with Windows resources. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D36123

--HG--
extra : moz-landing-system : lando
2019-07-04 00:40:02 +00:00
Mike Hommey de3ed8119f Bug 1560620 - Export PKG_CONFIG so that the pkg-config rust crate picks the same pkg-config as configure. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D35582

--HG--
extra : moz-landing-system : lando
2019-06-21 23:54:12 +00:00
Mike Hommey d4ea925beb Bug 1557229 - Add `-d16` as a target_feature along `+neon` for rust code. r=nalexander
When enabling neon (--with-fpu=neon, or when the C++ compiler defaults
to use neon), we pass +neon as a target feature to the rust compiler.
That enables neon in rust, which is the default with the
thumbv7neon-linux-gnueabihf rust target, but not the default for the
armv7-unknown-linux-gnueabihf rust target.

ARM processors may have various different FPUs, with different number of
registers. On ARMv7, there are FPUs with 16 registers and FPUs with 32
registers. NEON requires 32 registers.

Because the common denominator for ARMv7 is 16 registers, the
armv7-unknown-linux-gnueabihf rust target defaults to 16 registers,
although by enabling neon, we're guaranteed the processor will have 32.

But while the rust compiler keeps limited to 16 registers, it also hits
a wall while compiling the hyper crate, where it finds it doesn't have
enough registers (which in itself can be considered a bug).

Since enabling neon means there are 32 registers available, it makes
sense to tell the compiler to lift the restricted use of FPU registers,
and that's what the `-d16` target feature does.

That's the default for the thumbv7neon-linux-gnueabihf rust target, so
nothing is changed, there, and fixes things for the
armv7-unknown-linux-gnueabihf rust target.

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

--HG--
extra : moz-landing-system : lando
2019-06-07 00:47:03 +00:00
Emilio Cobos Álvarez 435ba395cf Bug 1552080 - Don't clobber library features with test features in the make backend. r=chmanchester
We weren't honoring the case where the library features differ from the tests
features (situation which my previous patch does).

We were incorrectly overriding `rust_feature_flags`, which of course ended up
with a working rusttests with my patches, but a bunch of negative leaks :)

Name the test features differently so that they don't affect the regular library
features.

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

--HG--
extra : moz-landing-system : lando
2019-05-28 21:05:03 +00:00
Nathan Froyd 3ffe3911b3 Bug 1546438 - add `-Clinker-plugin-lto` for Rust target libraries when appropriate; r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D28509

--HG--
extra : moz-landing-system : lando
2019-04-26 09:39:02 +00:00
Nathan Froyd a780e0f5a1 Bug 1541068 - add Rust compilation directories to GARBAGE_DIRS; r=nalexander
We add to `GARBAGE_DIRS` in the toplevel `Makefile.in` because all of
our Rust libraries share a single `CARGO_TARGET_DIR`, located in
topobjdir.

We add to `GARBAGE_DIRS` for Rust programs because Rust programs
currently do not share compilation artifacts with Rust libraries (as our
libraries are built with `panic=abort` and our programs are not, sharing
compilation artifacts between the two is a non-starter).

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

--HG--
extra : moz-landing-system : lando
2019-04-09 18:59:19 +00:00
Mike Hommey 49a0cbadc9 Bug 1524396 - Unify how target/host linker/flags are passed to rust. r=chmanchester
The current setup uses different ways for different platforms, with
different workarounds, even using extra configuration items for Windows.

Now that there can't be a difference between the host per the build
system and the host per rust, we can get rid of those configuration
items, and use a more common infrastructure.

We cannot, however, avoid using wrapper scripts, because per-target rust
link-arg flags don't work up great.

The downside is that multiplies the number of wrappers, as we now have
to have a different one for host and target, and then we have .bat files
and shell scripts for, respectively, Windows hosts, and other hosts.

Depends on D24321

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

--HG--
extra : moz-landing-system : lando
2019-03-22 11:05:18 +00:00
Mike Hommey 46318ccb91 Bug 1524396 - Replace RUST_TARGET_ENV_NAME with make substitutions. r=chmanchester
While the substitution pattern is kind of awful in make, it will allow
to more straightforwardly deal with the difference between target and
host.

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

--HG--
extra : moz-landing-system : lando
2019-03-22 11:06:11 +00:00
Noemi Erli 81350b76e9 Backed out 2 changesets (bug 1524396) for mass build bustages CLOSED TREE
Backed out changeset 3a444460cb6c (bug 1524396)
Backed out changeset 0480bca0d680 (bug 1524396)
2019-03-22 06:23:04 +02:00
Mike Hommey d58c9a5f85 Bug 1524396 - Unify how target/host linker/flags are passed to rust. r=chmanchester
The current setup uses different ways for different platforms, with
different workarounds, even using extra configuration items for Windows.

Now that there can't be a difference between the host per the build
system and the host per rust, we can get rid of those configuration
items, and use a more common infrastructure.

We cannot, however, avoid using wrapper scripts, because per-target rust
link-arg flags don't work up great.

The downside is that multiplies the number of wrappers, as we now have
to have a different one for host and target, and then we have .bat files
and shell scripts for, respectively, Windows hosts, and other hosts.

Depends on D24321

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

--HG--
extra : moz-landing-system : lando
2019-03-21 23:40:41 +00:00
Mike Hommey 27044ed480 Bug 1524396 - Replace RUST_TARGET_ENV_NAME with make substitutions. r=chmanchester
While the substitution pattern is kind of awful in make, it will allow
to more straightforwardly deal with the difference between target and
host.

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

--HG--
extra : moz-landing-system : lando
2019-03-21 23:40:23 +00:00
Mike Hommey 76882a03f3 Bug 1512541 - Don't force-include mozilla-config.h in rust-built C/C++ code. r=mshal
Differential Revision: https://phabricator.services.mozilla.com/D18653

--HG--
extra : moz-landing-system : lando
2019-02-06 21:02:20 +00:00
Mike Hommey bdaa5d90e4 Bug 1522609 - Pass compilers and flags down to cargo on sanitizer/fuzzying/ccov builds. r=ted
Depends on D18280

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

--HG--
extra : moz-landing-system : lando
2019-02-06 03:05:52 +00:00
Mike Hommey 401ecc4521 Bug 1522609 - Pass HOST_CC/HOST_CXX/HOST_CFLAGS/HOST_CXXFLAGS down to cargo. r=ted
While this isn't related to the bug, since we're going to touch the
cargo compiler flags, we might as well do this too.

It wasn't previously reliable to pass those flags down because what
cargo uses as target for build scripts and procedural macros is
determined by the rust host, which was not necessarily the same as the
build system host. But as of bug 1523143, they are always the same.

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

--HG--
extra : moz-landing-system : lando
2019-02-05 23:23:13 +00:00
Mike Hommey 30cc95d370 Bug 1522614 - Pass CC/CXX/CFLAGS/CXXFLAGS/AR down to cargo on Windows. r=froydnj
Now that Make invokes cargo without going through an msys shell,
environment variables are going to be preserved properly, and we can now
"safely" pass the compiler-related variables down to cargo on Windows.

This makes rust target builds use the expected compiler and flags,
instead of the cc-rs crate guessing, picking cl.exe, and using the wrong
one, with the build later failing when linking it all together because
one of the objects is not for the right target.

Interestingly, the lmdb code is today built for the wrong target on
aarch64, but somehow, it doesn't break the build on automation,
presumably because the lmdb code is actually dead code, and the linker
eliminates the object as unused, masking the problem.

Depends on D18186

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

--HG--
extra : moz-landing-system : lando
2019-02-05 21:43:28 +00:00
Mike Hommey 32cb1d63a2 Bug 1522614 - Replace double quotes with single quotes. r=froydnj
Double quotes on a command line forces Make to use a msys shell when
invoking the command. Single quotes don't have this effect. This is the
last bit that prevented Make from invoking cargo directly on Windows.

Depends on D18184

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

--HG--
extra : moz-landing-system : lando
2019-02-05 21:39:00 +00:00
Mike Hommey af821199b6 Bug 1522614 - Move remaining cargo environment variable settings to recipes. r=froydnj
These require some awkward setup to keep things working on
non-cross-compiles on non-Windows, but we'll change that shortly in a
later bug.

Depends on D18183

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

--HG--
extra : moz-landing-system : lando
2019-02-05 21:38:55 +00:00
Mike Hommey 604a536a37 Bug 1522614 - Move RUSTFLAGS to per-recipe environment variables. r=froydnj
Depends on D18182

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

--HG--
extra : moz-landing-system : lando
2019-02-05 21:42:58 +00:00
Mike Hommey 34a96a7a13 Bug 1522614 - Move check from bug 1376621 to the RUST_LIBRARY_FILE recipe. r=froydnj
This is a drive-by change, allowing to keep the
force-cargo-library-build recipe more like the others.

Depends on D18181

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

--HG--
extra : moz-landing-system : lando
2019-02-05 21:41:31 +00:00
Mike Hommey fe99ca1c78 Bug 1522614 - Move most environment variables we pass to cargo to make exports. r=froydnj
The `env` program, on windows, comes from msys, so invoking `env cargo`
guarantees an msys roundtrip, which usually breaks environment variable
in interesting ways.

This moves most of the environment variables we set with `env` (the
easiest ones) to exporting the same values from make itself.

Depends on D18180

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

--HG--
extra : moz-landing-system : lando
2019-02-05 21:40:13 +00:00
Mike Hommey f23ed044ba Bug 1522614 - Move rust related rules/setup to a separate makefile. r=froydnj
Because we're going to change how cargo recipes are called to export
environment variables rather than by wrapping the call with `env`, to
avoid msys roundtrips, it's better to avoid the complexity when not
building rust, and including a separate file only when required helps
with that. It is also possible to wrap the entire rust section of
rules.mk in the same condition we use for the include, but using a
separate file also makes things clearer.

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

--HG--
rename : config/rules.mk => config/makefiles/rust.mk
extra : moz-landing-system : lando
2019-02-05 21:38:42 +00:00
Mike Hommey d3856a0bf1 Bug 1515843 - Stop building host static libraries. r=ted
The build system has skipped creating target static libraries for very
long, except in very specific cases.

We can actually do the same for host static libraries, for which we
don't even need the escape hatch to still allow to create static
libraries.

Depends on D15171

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

--HG--
extra : moz-landing-system : lando
2018-12-21 23:00:00 +00:00
Chris Manchester c346a68ae0 Bug 1474028 - Add a way to exclude libraries from the default build. r=ted
MozReview-Commit-ID: MVfplx9lN2

--HG--
extra : rebase_source : 10b4bd3dcc1386d782531206c84b66207297d00a
2018-08-10 12:07:29 -07:00
Narcis Beleuzu f4e5fb2d0f Backed out 2 changesets (bug 1474028) per chmanchester`s request. a=backout
Backed out changeset 52bd814d3589 (bug 1474028)
Backed out changeset 39a528147c34 (bug 1474028)
2018-08-12 21:22:45 +03:00
Chris Manchester 2476269229 Bug 1474028 - Add a way to exclude libraries from the default build. r=ted
MozReview-Commit-ID: MVfplx9lN2

--HG--
extra : rebase_source : 3eb5352b5bc0d1b9be857c16efa5af0313afb6e7
2018-08-10 12:07:29 -07:00
Nika Layzell 082166e008 Bug 1479484 - Part 4: Move xptcodegen over to new perfecthash.py, r=froydnj
Summary:
This patch ports xptcodegen.py over to the new perfecthash.py system, removing
some special-case code generators, and taking advantage of the easier-to-use
interface.

In addition, the code was changed to take advantage of the endianness
information from Part 2, allowing us to avoid having to perform endianness swaps
at runtime when hashing nsIDs.

Depends On D2616

Reviewers: froydnj!

Tags: #secure-revision

Bug #: 1479484

Differential Revision: https://phabricator.services.mozilla.com/D2618
2018-08-01 17:54:42 -04:00
Chris Manchester 86ddf36acf Bug 1469067 - Build host programs in their final locations rather than copying them to dist/host/bin. r=mshal
MozReview-Commit-ID: BrSou1ee2qV

--HG--
extra : rebase_source : 14ab70086b6b43b026c4ca269f27f0ae20a09aa6
2018-06-18 14:22:20 -07:00
Nathan Froyd 9bd5c61497 Bug 1459721 - part 8 - pass full paths for IDL files to xpidl-process.py; r=chmanchester
The build system knows at build-backend time where to find each IDL
file; making xpidl-process.py rediscover this by requiring
xpidl-process.py to search through directories to find input IDL files
is silly.  To rememdy this, we're going to modify things so full paths
are passed into the script.  Those paths can then be used directly, with
no searching.
2018-05-15 10:05:23 -04:00
Nathan Froyd 6d76a90b37 Bug 1459721 - part 6 - remove redundant dependency code from xpidl Makefile.in; r=chmanchester
The tail end of the xpidl Makefile.in contains a line, generated for
every xpt file:

$(1): $(addsuffix .idl,$(addprefix $(dist_idl_dir)/,$($(basename $(notdir $(1)))_deps)))

This line, in context, is saying that the xpt file depends on all of its
input IDL files.  But xpidl-process.py already generates this
information when we pass it --depsdir, which we do.  So this code is
redundant with what we already generate, and it can be removed.
2018-05-15 10:05:24 -04:00
Nathan Froyd 2f6686cbec Bug 1459721 - part 5 - explicitly specify include directories for xpidl files; r=chmanchester
The previous patch required us to pass a single -I argument pointing at
$(DIST)/idl so IDL include statements would work correctly.  This patch
lifts that limitation and explicitly points xpidl-process.py at the
locations of all the IDL source directories to search for included IDL
files.  Invocations of xpidl-process.py no longer depend on IDL files
being copied to the objdir.
2018-05-15 10:05:24 -04:00