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

314 Коммитов

Автор SHA1 Сообщение Дата
Mike Hommey 268a226874 Bug 1654182 - Only look at the dynamic symbols table for the version checks. r=froydnj
The main reason we look at the complete symbols table is that before bug
1541792, we needed to look at that table for _NSModule symbols.

In bug 1516228, we also made everything llvm-objdump to limit the
differences cross-platform, but that's not necessary anymore per the
previous change.

llvm-objdump doesn't support getting only the dynamic symbols table, so
we go back to what we were using before bug 1516228, namely readelf,
while preserving a code path to use the complete symbols table for the
networking test on libgkrust.a, which doesn't have a dynamic symbols
table.

With this change, check_binary goes from 45s to 0.2s on my machine.

Differential Revision: https://phabricator.services.mozilla.com/D84305
2020-07-22 04:09:39 +00:00
Mike Hommey cb5b458548 Bug 1640982 - Set CARGO_PROFILE_RELEASE_LTO=true when enabling rust LTO. r=firefox-build-system-reviewers,rstewart
Differential Revision: https://phabricator.services.mozilla.com/D84098
2020-07-20 16:05:36 +00:00
Mike Hommey 0ebe2bbd8f Bug 1652448 - Use the same codegen-units numbers on host and target rust builds. r=firefox-build-system-reviewers,rstewart
Otherwise, crates that are shared between host and target are always
rebuilt because of the difference in rust flags.

Differential Revision: https://phabricator.services.mozilla.com/D83412
2020-07-13 22:24:59 +00:00
Nathan Froyd bddb48ea03 Bug 1625281 - force make to update timestamp caches when building rust programs; r=firefox-build-system-reviewers,rstewart
Doing this means that make will correctly understand that the underlying
program has changed and therefore it needs to trigger install rules.

Differential Revision: https://phabricator.services.mozilla.com/D83326
2020-07-13 19:01:40 +00:00
Ricky Stewart 51a23a4ba2 Bug 1651641 - `servo/components/style/build.rs` reads `PYTHON3` configuration value in addition to environment variable r=glandium
The previous logic would check the value of the `PYTHON3` environment variable, which is not set by the Firefox build system, so this build script tends to just use the `python3` at the tip of the `PATH`, regardless of which value you've configured for it. Instead, it should prefer to read from the `OBJDIR` if one is present.

Differential Revision: https://phabricator.services.mozilla.com/D82981
2020-07-09 22:03:23 +00:00
Kris Maglione b18c12677e Bug 1464542: Part 1 - Generate symbolic names for XPT interfaces and add lookup function. r=nika,froydnj
This makes it much simpler for the for the static JS services cache to store
and lookup interface IDs for components.

Differential Revision: https://phabricator.services.mozilla.com/D81416
2020-07-09 20:42:49 +00:00
Csoregi Natalia b355fcc4bf Backed out 6 changesets (bug 1464542) for xpcshell failures on test_Services.js. CLOSED TREE
Backed out changeset b50af9005851 (bug 1464542)
Backed out changeset 9d3a0ea2cf65 (bug 1464542)
Backed out changeset 71c3475fcbc2 (bug 1464542)
Backed out changeset 51ff93220a95 (bug 1464542)
Backed out changeset e84de1547c09 (bug 1464542)
Backed out changeset bbecc16d08eb (bug 1464542)
2020-07-09 23:19:26 +03:00
Kris Maglione 55b68bde08 Bug 1464542: Part 1 - Generate symbolic names for XPT interfaces and add lookup function. r=nika,froydnj
This makes it much simpler for the for the static JS services cache to store
and lookup interface IDs for components.

Differential Revision: https://phabricator.services.mozilla.com/D81416
2020-07-09 17:59:09 +00:00
Ricky Stewart 933b3522b8 Bug 1633156 - Don't emit cached table files from ply r=glandium
`ply`, [by design](https://github.com/dabeaz/ply/issues/79), does not produce reproducible table files; hence bug 1633156. (Note that this was *always* true, but only became a problem once we switched to Python 3, which has more unpredictable dict iteration order than Python 2.7, at least prior to [3.7](https://docs.python.org/3/whatsnew/3.7.html#summary-release-highlights).)

In any other circumstance I would consider submitting a patch to `ply` to fix this, but as of the [in-progress version 4.0 of the library](https://github.com/dabeaz/ply/blob/master/CHANGES), it doesn't even emit this cached data any more, and indeed the [latest version of the code](1fac9fed64/ply) doesn't even call `open()` at all except to do logging or to read the text data to be parsed from `stdin`. So if we were going to pin our future on `ply` and upgrade to later versions of the library in the future, we would have to live in a world where `ply` doesn't generate cached table files for us anyway.

Emitting the cached table files so later build steps can consume them is an "optimization", but it's not clear exactly how much actual value that optimization provides overall. Quoth the `CHANGES` file from that repository:

```
PLY no longer writes cached table files.  Honestly, the use of
the cached files made more sense when I was developing PLY on
my 200Mhz PC in 2001. It's not as much as an issue now. For small
to medium sized grammars, PLY should be almost instantaneous.
```

In practice, I have found this to be true; namely, `./mach build pre-export export` takes just about as long on my machine after this patch as it did before, and in a try push I performed, there's no noticeable performance regression from applying this patch. In local testing I also found that generating the LALR tables in calls to `yacc()` takes about 0.01s on my machine generally, and we generate these tables a couple dozen times total over the course of the `export` tier now. This isn't *nothing*, but in my opinion it's also not nearly long enough where it would be a concern given how long `export` already takes.

That `CHANGES` file also stresses that if caching this data is important, we have the option of doing so via `pickle`. If and when we decide that re-enabling this optimization is valuable for us, we should take control of this process and perform the generation in such a way that we can guarantee reproducibility.

Differential Revision: https://phabricator.services.mozilla.com/D73484
2020-05-07 00:39:28 +00:00
Ricky Stewart 4d4b22b3de Bug 1599658 - Delete previous definition of py_action in Makefiles. Now py_action calls into Python 3 and py3_action doesn't exist. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D72487
2020-05-05 20:04:30 +00:00
Bogdan Tara f137fa0613 Backed out 6 changesets (bug 1632916, bug 1599658, bug 1633037, bug 1633039, bug 1633016, bug 1632920) for SA bustages CLOSED TREE
Backed out changeset 332ce0963b4e (bug 1633039)
Backed out changeset a9904cbc40d9 (bug 1633037)
Backed out changeset d06b0ec349f8 (bug 1599658)
Backed out changeset 8fd300cad80f (bug 1633016)
Backed out changeset f8820941c703 (bug 1632916)
Backed out changeset ac9c2c8746ed (bug 1632920)
2020-05-02 01:49:29 +03:00
Ricky Stewart 0daacc12c3 Bug 1599658 - Delete previous definition of py_action in Makefiles. Now py_action calls into Python 3 and py3_action doesn't exist. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D72487
2020-04-30 15:27:13 +00:00
Jamie Nicol d384e8fa67 Bug 1604615 - Use cargo linker wrapper for native sanitizer builds, but don't set problematic flags. r=glandium
For native sanitizer builds, we currently do not pass the linker flags
to cargo, as they were causing crashes in some build scripts. Without
this, however, the linker is unable to find libstdc++. Instead, do
tell cargo to use the linker wrapper, but omit the problematic flags
from MOZ_CARGO_WRAP_LDFLAGS.

Differential Revision: https://phabricator.services.mozilla.com/D70354
2020-04-21 10:31:53 +00:00
David Major e8a38f48d0 Bug 1627768 - Expand check_networking exemption to ASan and UBSan builds r=rstewart
They all fail for the same reason: the sanitizer runtime in compiler-rt installs an interceptor for `getsockname` which then contains a call to the real implementation.

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

--HG--
extra : moz-landing-system : lando
2020-04-15 15:56:34 +00:00
Michael Woerister 5327bb2166 Bug 1623085 - Only explicitly set number of Rust codegen-units for target artifacts. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D67162

--HG--
extra : moz-landing-system : lando
2020-03-17 16:47:52 +00:00
Mike Shal b5ef4a8d81 Bug 1620744 - Convert check_binary.py to py3; r=firefox-build-system-reviewers,rstewart
Differential Revision: https://phabricator.services.mozilla.com/D65855

--HG--
extra : moz-landing-system : lando
2020-03-10 20:19:42 +00:00
Daniel Varga 09acd57d19 Backed out 13 changesets (bug 1620744) for causing diffoscope failures firefox/browser/chrome/browser/content/browser/built_in_addons.json
CLOSED TREE

Backed out changeset 6beda54bcb9b (bug 1620744)
Backed out changeset a1e97f0b91ef (bug 1620744)
Backed out changeset b8faa0184d4f (bug 1620744)
Backed out changeset 3bc8fda68107 (bug 1620744)
Backed out changeset 8e95b21b2ae3 (bug 1620744)
Backed out changeset 1de09de1a802 (bug 1620744)
Backed out changeset 622a2f7414fa (bug 1620744)
Backed out changeset 3372c9ab721c (bug 1620744)
Backed out changeset 0997313a9f99 (bug 1620744)
Backed out changeset 2fa34749bbfa (bug 1620744)
Backed out changeset 6d597d2eb792 (bug 1620744)
Backed out changeset 78e78f7c7b26 (bug 1620744)
Backed out changeset 6e4d85b19f88 (bug 1620744)
2020-03-10 21:13:18 +02:00
Mike Shal 7e2ee7cfd9 Bug 1620744 - Convert check_binary.py to py3; r=firefox-build-system-reviewers,rstewart
Differential Revision: https://phabricator.services.mozilla.com/D65855

--HG--
extra : moz-landing-system : lando
2020-03-09 22:02:43 +00:00
Mike Hommey 83f784d880 Bug 1617794 - Properly set the target flag for bindgen when cross compiling for Windows. r=chmanchester
Differential Revision: https://phabricator.services.mozilla.com/D64292

--HG--
extra : moz-landing-system : lando
2020-02-26 20:52:09 +00:00
Nick Alexander 7f5f33cf2f Bug 1616426 - Make cargo use --color=never on Windows. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D63279

--HG--
extra : moz-landing-system : lando
2020-02-19 01:26:38 +00:00
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
Nathan Froyd 236d75aaae Bug 1459721 - part 4 - explicitly specify input directories for xpidl modules; r=chmanchester
Building on the last patch, we can change the build process to pass in
the directories where the input IDL files can be found.  It is
convenient to pass in just the relative source directory paths, to
encourage people to not look in the object directory and to make the
command lines slightly shorter.

xpidl-process.py still assumes that included IDL files can be found by
looking in a single directory.  We add a single -I argument to the
invocation of xpidl-process.py to accommodate this short-sightedness.
2018-05-15 10:05:24 -04:00
Nathan Froyd 31e67ea398 Bug 1459721 - part 3 - enable multiple input paths for xpidl-process.py; r=chmanchester
The current IDL build setup assumes that all IDL files can be found in a
single directory.  This setup requires that all IDL files be copied to a
single directory, which is suboptimal in terms of disk I/O and also
complicates things like generating IDL files at build time.

As a first step in moving away from this state of affairs,
xpidl-process.py needs to be taught that the input IDL files could
potentially be found in multiple directories.  The current setup can
just specify $(DIST)/idl as the lone directory to examine.  Future
patches will change this to examine multiple directories.
2018-05-15 10:05:24 -04:00
Nick Alexander 00dc996ad3 Bug 1444546 - Post: Remove add_java_jar and support. r=froydnj
MozReview-Commit-ID: J6E2ZOs9r3P

--HG--
extra : rebase_source : 0e68f776e95e0fd2fec4607435d030acc68ca0ad
2018-03-06 14:48:20 -08:00
Nika Layzell be8b24333a Bug 1444991 - Part 1: Read webidl's Bindings.conf, and pass it into xpidl, r=mccr8
This information is read in order to handle correctly selecting the native
type and header files for WebIDL types.
2018-04-17 19:20:58 -04:00
Nika Layzell 04547a4a00 Bug 1444745 - Part 4: Rewrite xptinfo, and write a new xptcodegen.py to generate the required datastructures, r=mccr8
This patch contains the meat of the changes here. The following summarize the changes:
1. xptinfo.h is rewritten to expose the new interface for reading the XPT data,

The nsXPTInterfaceInfo object exposes methods with the same signatures as
the methods on nsIInterfaceInfo, to make converting code which used
nsIInterfaceInfo as easy as possible, even when those methods don't have
signatures which make a ton of sense anymore. There are also a few methods
which are unnecessary (they return `true` or similar), which should be
removed over time.

Members of the data structures are made private in order to prevent reading
them directly. Code should instead call the getter methods. This should make
it easier to change their memory representation in the future. Constructing
these structs is made possible by making the structs `friend class` with the
XPTConstruct class, which is implemented by the code generator, and is able
to access the private fields.

In addition, rather than using integers with flag constants, I opted for
using C++ bitfields to store individual flags, as I found it made it easier
to both write the code generator, and reason about the layouts of the types.

I was able to shave a byte off of each nsXPTParamInfo (4 bytes -> 3 bytes)
by shoving the flags into spare bits in the nsXPTType. Unfortunately there
was not enough room for the retval flag. Fortunately, we already depend in
our code on the retval parameter being the last parameter, so I worked
around this by removing the retval flag and instead having a `hasretval`
flag on the method itself.

2. An xptinfo.cpp file is added for out-of-line definitions of more complex
methods, and the internal implementation details of the perfect hash.

Notable is the handling of xptshim interfaces. As the type is uniform, a
flag is checked when trying to read constant information, and a different
table with pointers into webidl data structures is checked when the type is
determined to be a shim.

Ideally we could remove this once we remove the remaining consumers of the
existing shim interfaces.

3. A python code generator which takes in the json XPT files generated in the
previous part, and emits a xptdata.cpp file with the data structures. I did
my best to heavily comment the code.

This code uses the friend class trick to construct the private fields of the
structs, and avoid a dependency on the ordering of fields in xptinfo.h.

The sInterfaces array's order is determined by a generated perfect hash
which is also written into the binary. This should allow for fast lookups by
IID or name of interfaces in memory. The hash function used for the perfect
hash is a simple FNV hash, as they're pretty fast.

For perfect hashing of names, another table is created which contains
indexes into the sInterfaces table. Lookup by name is less common, and this
form of lookup should still be very fast.

4. The necessary Makefiles are updated to use the new code generator, and
generate the file correctly.
2018-04-17 19:20:55 -04:00
Andrew McCreight 27f44d82d0 Bug 1438688, part 6 - Compile XPT information to C++ at build time. r=glandium,njn
This patch handles the actual generation of the static data structures
used to represent XPT information. XPT files are generated in the same
way as they are now, but they are used only as an intermediate
representation to speed up incremental compilation rather than
something used by Firefox itself. Instead of linking XPTs into a
single big XPT file at packaging time, they are linked into a single
big C++ file at build time, that defines the various static consts in
XPTHeader.

In xpt.py, every data structure that can get written to disk gets an
additional code_gen() method that returns a representation of that
data structure as C++ source code. CodeGenData aggregates this
information together, handling deduplication and the final source code
generation.

The ctors are needed for XPTConstValue to statically initialize the
different union cases without resorting to designated initializers,
which are part of C99, not C++. Designated initializers appear to be
supported in C++ code by Clang and GCC, but not MSVC. The ctors must
be constexpr to ensure they are actually statically initialized so
they can be shared between Firefox processes.

I also removed an unnecessary "union" in XPTConstDescriptor.

Together, these patches reduce the amount of memory reported by
xpti-working-set from about 860,000 bytes to about 200,000 bytes. The
remaining memory is used for xptiInterface and xptiTypelibGuts (which
are thin wrappers around the XPT interfaces and header) and hash
tables to speed up looking up interfaces by name or IID. That could
potentially be eliminated from dynamic allocations in follow up
work. These patches did not affect memory reporting because XPT arenas
are still used by the remaining XPTI data structures.

MozReview-Commit-ID: Jvi9ByCPa6H

--HG--
extra : rebase_source : a9e48e7026aab4ad1b7f97e50424adf4e3f4142f
2018-03-12 10:30:35 -07:00
Andrew McCreight e80864c94c Bug 1438688, part 3 - Remove XPT files from the packaging process. r=glandium
Now that XPT files are not loaded from files at runtime, code for
packaging XPT files can be removed.

This means that a couple of test XPIDL interfaces will get shipped in
builds to users that weren't before, but I don't think that matters
much.

This also puts XPT files into the local objdir for the XPIDL makefile,
instead of dist/bin, because they are no longer part of the
distribution.

MozReview-Commit-ID: 7gWj8KWUun3

--HG--
extra : rebase_source : 65bac47c2cd1a20b3c675a01b44a25a1d2d3ab7a
2018-03-05 14:27:29 -08:00
Dorel Luca f24505d99e Backed out 7 changesets (bug 1438688) for android xpcshell failures on builds/worker/workspace/build/tests/bin/components/test_necko.xpt
Backed out changeset 8786eabb61a4 (bug 1438688)
Backed out changeset e05ec1e08b46 (bug 1438688)
Backed out changeset 4c437ba9d984 (bug 1438688)
Backed out changeset 2f243bca1af3 (bug 1438688)
Backed out changeset 4da0e1839353 (bug 1438688)
Backed out changeset 186f916dcc7a (bug 1438688)
Backed out changeset 08b1a5f904e4 (bug 1438688)
2018-04-03 02:30:53 +03:00
Andrew McCreight 7407c149a0 Bug 1438688, part 6 - Compile XPT information to C++ at build time. r=glandium,njn
This patch handles the actual generation of the static data structures
used to represent XPT information. XPT files are generated in the same
way as they are now, but they are used only as an intermediate
representation to speed up incremental compilation rather than
something used by Firefox itself. Instead of linking XPTs into a
single big XPT file at packaging time, they are linked into a single
big C++ file at build time, that defines the various static consts in
XPTHeader.

In xpt.py, every data structure that can get written to disk gets an
additional code_gen() method that returns a representation of that
data structure as C++ source code. CodeGenData aggregates this
information together, handling deduplication and the final source code
generation.

The ctors are needed for XPTConstValue to statically initialize the
different union cases without resorting to designated initializers,
which are part of C99, not C++. Designated initializers appear to be
supported in C++ code by Clang and GCC, but not MSVC. The ctors must
be constexpr to ensure they are actually statically initialized so
they can be shared between Firefox processes.

I also removed an unnecessary "union" in XPTConstDescriptor.

Together, these patches reduce the amount of memory reported by
xpti-working-set from about 860,000 bytes to about 200,000 bytes. The
remaining memory is used for xptiInterface and xptiTypelibGuts (which
are thin wrappers around the XPT interfaces and header) and hash
tables to speed up looking up interfaces by name or IID. That could
potentially be eliminated from dynamic allocations in follow up
work. These patches did not affect memory reporting because XPT arenas
are still used by the remaining XPTI data structures.

MozReview-Commit-ID: Jvi9ByCPa6H

--HG--
extra : rebase_source : 719dfbcb9f83235c0f1f0766270b7f127f9ab04e
2018-03-12 10:30:35 -07:00
Andrew McCreight fc09560f06 Bug 1438688, part 3 - Remove XPT files from the packaging process. r=glandium
Now that XPT files are not loaded from files at runtime, code for
packaging XPT files can be removed.

This means that a couple of test XPIDL interfaces will get shipped in
builds to users that weren't before, but I don't think that matters
much.

This also puts XPT files into the local objdir for the XPIDL makefile,
instead of dist/bin, because they are no longer part of the
distribution.

MozReview-Commit-ID: 7gWj8KWUun3

--HG--
extra : rebase_source : 6f7d4fd1d6cdea2c14866705a2dc972eb5f43382
2018-03-05 14:27:29 -08:00
Ted Mielczarek dcdf597820 bug 1255485 - build PROGRAMs directly in dist/bin instead of copying them. r=nalexander
Historically we built all our binaries in directories in the objdir, then
symlinked them into dist/bin. Some binaries needed to be copied instead
so that certain relative path lookups work properly, so we resorted to
sprinkling `NSDISTMODE=copy` around Makefiles.

This change makes it so we build PROGRAMs (not any other sort of targets)
directly in dist/bin instead. We could do the same for our other targets
with a little more work.

There were several places in the tree that were copying built binaries to
some other place and needed fixup to match the new location of binaries.

On Windows pdb files are left in the objdir where the program was
originally linked. symbolstore.py needs to locate the pdb file both to
determine whether it should dump symbols for a binary and also to copy
the pdb file into the symbol package. We fix this by simply looking for
the pdb file in the current working directory if it isn't present next
to the binary, which matches how we invoke symbolstore.py.

MozReview-Commit-ID: 8TOD1uTXD5e
2018-01-10 14:26:12 -05:00
arthur.iakab 9bffb6aa72 Merge inbound to mozilla-central. a=merge 2018-02-27 11:58:55 +02:00
Kim Moir a7801a1404 Bug 1412906 - Remove config/makefiles/test/ r=nalexander DONTBUILD 2018-02-26 15:29:59 -05:00
Nick Alexander 1ff0250889 Bug 1440433 - Part 2: Remove ANDROID_APK_{NAME,PACKAGE}. r=jchen
The last APK produced using the ANDROID_APK_* moz.build/Makefile.in
mechanism was Robocop, so we can get rid of these now.

MozReview-Commit-ID: 9b08ZvvOAoC

--HG--
extra : rebase_source : ac4fea057bf6e731b0f26a1b6902f17a7362076d
2018-02-22 13:36:49 -08:00
Andrew McCreight 98c246e41e Bug 1219081 - Remove undefined reference to libxul_sdk_includes from XPIDL makefile. r=glandium
MozReview-Commit-ID: BK20h5Nexe0

--HG--
extra : rebase_source : 64008aabf15fe6b0a3fa44c43b0c3070dc762acf
2018-02-20 10:22:36 -08:00
Nika Layzell c33284aec0 Bug 1293362 - Part 4: Generate runtime bindings for calling xpcom methods from rust, r=froydnj
MozReview-Commit-ID: K37KyHkKsSl
2018-01-23 17:27:26 -05:00
Chris Manchester 778f734b4f Bug 1414064 - Remove references to EXTRA_LIBS in the build system. r=mshal
MozReview-Commit-ID: AeD755whvIV

--HG--
extra : rebase_source : f59ecae4225e77cfe748e4b132206f2132247078
2017-11-07 14:34:44 -08: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
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
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
Mike Shal bdcfea4abc Bug 1359852 - Use REPORT_BUILD for .xpt files; r=chmanchester
By using $(REPORT_BUILD) instead of just echoing the filename, there is
no change during a regular build without REBUILD_CHECK, but specifying
REBUILD_CHECK in the environment will show which files triggered an .xpt
to rebuild. This is helpful in debugging why these files may be built
unnecessarily.

MozReview-Commit-ID: GGNaKAl02Ea

--HG--
extra : rebase_source : 098a81265deed9afc0b284d9863f18ebd74fda33
2017-04-18 09:27:36 -04:00
Nathan Froyd 36fb414815 Bug 1293253 - part 6 - add build and installation rules for {HOST_,}RUST_PROGRAMS; r=chmanchester
The only complicating factor here is having to split out the --target
flag from cargo_build_flags, so we can pass the appropriate one
depending on our build target.
2016-11-28 11:20:39 -05:00
Chris Manchester b0b84a1928 Bug 1240134 - Incorporate the interfaces.xpt from downloaded artifacts instead of building XPIDL during an artifact build. r=glandium
MozReview-Commit-ID: 8oEyS1xLOwV
2016-08-17 15:02:31 -07:00
Tom Tromey 5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx

--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
2016-07-14 10:16:42 -06:00
Makoto Kato dcd9507126 Bug 1277498 - Remove MC (message compiler) define from old-configure.in. r=mshal
By bug 1270621, ETW support is removed.  So no one uses messege compiler.

MozReview-Commit-ID: HGUAkrb208N

--HG--
extra : rebase_source : 5178283b781e4805b4e97f09b35a4150119d060a
extra : histedit_source : 40d6992894315b51863db4e7697df1c1ef18edd8
2016-06-06 13:36:51 +09:00
Mike Shal 7b58ab8671 Bug 1253431 part 3 - Move SDK_BINARY files in xpcom/idl-parser/xpidl to moz.build; r=gps
We can just generate xpidllex.py/xpidlyacc.py in the current directory
rather than one directory higher, and specify this directory as an
include path to xpidl-process.py

MozReview-Commit-ID: KLoGjudc4Y8

--HG--
extra : rebase_source : 8dda268c6490cdfb8b896de9da5b789208584193
2016-03-03 13:49:42 -05:00
Mike Hommey 93c78646c2 Bug 1224450 - Ignore COMPILE_PDB_FLAG for the CompileDB. r=gps 2016-02-12 07:16:17 +09:00
Mike Hommey 1d537257e2 Bug 1247162 - Generate a header defining MOZ_SOURCE_*. r=mshal
The behavior is not entirely idempotent (most notably for
buildconfig.html), but this can be improved later if necessary.
It is idempotent where it matters.

This allows to get rid of config/makefiles/rcs.mk and its uses.
2016-02-12 07:16:14 +09:00
Mike Hommey 969f681cbc Bug 1235743 - Move compiler flags used for dependency generation to a separate variable. r=gps
This might seem like going in the opposite direction of what we tend to do
to move to moz.build land, but those flags are irrelevant in many situations
and are better separated out.
2015-12-31 07:35:04 +09:00
Mike Hommey 3900e2c115 Bug 1227892 - Emit a specialized object for chrome.manifest entries. r=gps
This new ChromeManifestEntry object type is generic and can hold any kind of
chrome manifest entry, but we currently only emit them for binary components.

References to sub-directory manifests is left to the backend, for now, until
all manifest entries are emitted by the frontend.
2015-12-01 08:25:22 +09:00