blob: 8b1b8e5144e93f0496ac1b1f6f4f818381aea763 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
--- build/rust/cargo_crate.gni.orig 2025-04-14 21:12:04 UTC
+++ build/rust/cargo_crate.gni
@@ -267,6 +267,12 @@ template("cargo_crate") {
# Don't import the `chromium` crate into third-party code.
no_chromium_prelude = true
+ # Don't depend on the chrome-specific #[global_allocator] crate from
+ # third-party code. This avoids some dependency cycle issues. The allocator
+ # crate will still be used if it exists anywhere in the dependency graph for
+ # a given linked artifact.
+ no_allocator_crate = true
+
rustc_metadata = _rustc_metadata
# TODO(crbug.com/40259764): don't default to true. This requires changes to
@@ -504,6 +510,9 @@ template("cargo_crate") {
# Don't import the `chromium` crate into third-party code.
no_chromium_prelude = true
+
+ # Build scripts do not need to link to chrome's allocator.
+ no_allocator_crate = true
# The ${_build_script_name}_output target looks for the exe in this
# location. Due to how the Windows component build works, this has to
|