@@ -16,17 +16,17 @@ Subject: [PATCH] Adjust the Rust build to our needs
16
16
Upstream-Status: Inappropriate [specific to our build setup]
17
17
Signed-off-by: Max Ihlenfeldt <
[email protected] >
18
18
---
19
- build/config/rust.gni | 24 +++++++++++++++++------
19
+ build/config/rust.gni | 24 ++++++++++++++++++ ------
20
20
build/rust/rustc_wrapper.py | 1 +
21
- build/rust/std/BUILD.gn | 33 ++++++++++++++++++++++++- -------
21
+ build/rust/std/BUILD.gn | 28 +++++++++++++++++++++-------
22
22
build/rust/std/find_std_rlibs.py | 16 +++++++++++-----
23
- 4 files changed, 55 insertions(+), 19 deletions(-)
23
+ 4 files changed, 51 insertions(+), 18 deletions(-)
24
24
25
25
diff --git a/build/config/rust.gni b/build/config/rust.gni
26
- index e98d913..6213b72 100644
26
+ index 9b0ee75..b2866b3 100644
27
27
--- a/build/config/rust.gni
28
28
+++ b/build/config/rust.gni
29
- @@ -87 ,6 +87 ,11 @@ declare_args() {
29
+ @@ -98 ,6 +98 ,11 @@ declare_args() {
30
30
# a platform. Mostly applicable to Windows, where new versions can handle ANSI
31
31
# escape sequences but it's not reliable in general.
32
32
force_rustc_color_output = false
@@ -91,10 +91,10 @@ index b8e490d..d22cf08 100755
91
91
abs_build_root = os.getcwd().replace('\\', '/') + '/'
92
92
is_windows = sys.platform == 'win32' or args.target_windows
93
93
diff --git a/build/rust/std/BUILD.gn b/build/rust/std/BUILD.gn
94
- index 77f4b8c..8a25798 100644
94
+ index 9c3db1e..6d9b684 100644
95
95
--- a/build/rust/std/BUILD.gn
96
96
+++ b/build/rust/std/BUILD.gn
97
- @@ -188 ,7 +188 ,8 @@ if (toolchain_has_rust) {
97
+ @@ -178 ,7 +178 ,8 @@ if (toolchain_has_rust) {
98
98
# our locally-built std. Both reside in root_out_dir: we must only have one of
99
99
# each per GN toolchain anyway.
100
100
@@ -104,7 +104,7 @@ index 77f4b8c..8a25798 100644
104
104
105
105
if (!rust_prebuilt_stdlib) {
106
106
local_rustc_sysroot = "$root_out_dir/local_rustc_sysroot"
107
- @@ -372 ,12 +373 ,12 @@ if (toolchain_has_rust) {
107
+ @@ -358 ,12 +359 ,12 @@ if (toolchain_has_rust) {
108
108
rust_abi_target,
109
109
]
110
110
@@ -120,7 +120,7 @@ index 77f4b8c..8a25798 100644
120
120
}
121
121
122
122
visibility = [ ":*" ]
123
- @@ -390 ,8 +391 ,18 @@ if (toolchain_has_rust) {
123
+ @@ -376 ,8 +377 ,18 @@ if (toolchain_has_rust) {
124
124
"enable_rust=false")
125
125
deps = [ ":find_stdlib" ]
126
126
sources = get_target_outputs(":find_stdlib")
@@ -141,19 +141,7 @@ index 77f4b8c..8a25798 100644
141
141
142
142
visibility = [ ":*" ]
143
143
}
144
- @@ -429,7 +440,10 @@ if (toolchain_has_rust) {
145
- # Use the sysroot generated by :prebuilt_rustc_copy_to_sysroot.
146
- group("stdlib_for_rustc") {
147
- all_dependent_configs = [ ":prebuilt_stdlib_sysroot" ]
148
- - deps = [ ":prebuilt_rustc_copy_to_sysroot" ]
149
- + deps = [
150
- + ":prebuilt_rustc_copy_to_sysroot",
151
- + ":prebuilt_rustc_copy_target_json_to_sysroot",
152
- + ]
153
- }
154
-
155
- # Links the Rust stdlib. Used by targets for which linking is driven by
156
- @@ -439,7 +453,10 @@ if (toolchain_has_rust) {
144
+ @@ -417,7 +428,10 @@ if (toolchain_has_rust) {
157
145
":prebuilt_stdlib_libs",
158
146
":stdlib_public_dependent_libs",
159
147
]
@@ -166,7 +154,7 @@ index 77f4b8c..8a25798 100644
166
154
# The host builds tools toolchain supports Rust only and does not use
167
155
# the allocator remapping to point it to PartitionAlloc.
168
156
diff --git a/build/rust/std/find_std_rlibs.py b/build/rust/std/find_std_rlibs.py
169
- index 386258f..3bb6a41 100755
157
+ index 386258f..e8fdaa9 100755
170
158
--- a/build/rust/std/find_std_rlibs.py
171
159
+++ b/build/rust/std/find_std_rlibs.py
172
160
@@ -17,7 +17,7 @@ import re
0 commit comments