ci: Enable opt-dist for dist-aarch64-linux builds · rust-lang/rust@3d54764 (original) (raw)
`@@ -146,6 +146,21 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec)>
`
146
146
`let target_triple =
`
147
147
` std::env::var("PGO_HOST").expect("PGO_HOST environment variable missing");
`
148
148
``
``
149
`+
let is_aarch64 = target_triple.starts_with("aarch64");
`
``
150
+
``
151
`+
let mut skip_tests = vec![
`
``
152
`+
// Fails because of linker errors, as of June 2023.
`
``
153
`+
"tests/ui/process/nofile-limit.rs".to_string(),
`
``
154
`+
];
`
``
155
+
``
156
`+
if is_aarch64 {
`
``
157
`+
skip_tests.extend([
`
``
158
`+
// Those tests fail only inside of Docker on aarch64, as of December 2024
`
``
159
`+
"tests/ui/consts/promoted_running_out_of_memory_issue-130687.rs".to_string(),
`
``
160
`+
"tests/ui/consts/large_const_alloc.rs".to_string(),
`
``
161
`+
]);
`
``
162
`+
}
`
``
163
+
149
164
`let checkout_dir = Utf8PathBuf::from("/checkout");
`
150
165
`let env = EnvironmentBuilder::default()
`
151
166
`.host_tuple(target_triple)
`
`@@ -155,11 +170,9 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec)>
`
155
170
`.artifact_dir(Utf8PathBuf::from("/tmp/tmp-multistage/opt-artifacts"))
`
156
171
`.build_dir(checkout_dir.join("obj"))
`
157
172
`.shared_llvm(true)
`
158
``
`-
.use_bolt(true)
`
159
``
`-
.skipped_tests(vec![
`
160
``
`-
// Fails because of linker errors, as of June 2023.
`
161
``
`-
"tests/ui/process/nofile-limit.rs".to_string(),
`
162
``
`-
])
`
``
173
`+
// FIXME: Enable bolt for aarch64 once it's fixed upstream. Broken as of December 2024.
`
``
174
`+
.use_bolt(!is_aarch64)
`
``
175
`+
.skipped_tests(skip_tests)
`
163
176
`.build()?;
`
164
177
``
165
178
`(env, shared.build_args)
`
`@@ -304,7 +317,8 @@ fn execute_pipeline(
`
304
317
`// the final dist build. However, when BOLT optimizes an artifact, it does so in-place,
`
305
318
`// therefore it will actually optimize all the hard links, which means that the final
`
306
319
`` // packaged libLLVM.so
file will be BOLT optimized.
``
307
``
`-
bolt_optimize(&llvm_lib, &llvm_profile).context("Could not optimize LLVM with BOLT")?;
`
``
320
`+
bolt_optimize(&llvm_lib, &llvm_profile, env)
`
``
321
`+
.context("Could not optimize LLVM with BOLT")?;
`
308
322
``
309
323
`let rustc_lib = io::find_file_in_dir(&libdir, "librustc_driver", ".so")?;
`
310
324
``
`@@ -319,7 +333,7 @@ fn execute_pipeline(
`
319
333
`print_free_disk_space()?;
`
320
334
``
321
335
`// Now optimize the library with BOLT.
`
322
``
`-
bolt_optimize(&rustc_lib, &rustc_profile)
`
``
336
`+
bolt_optimize(&rustc_lib, &rustc_profile, env)
`
323
337
`.context("Could not optimize rustc with BOLT")?;
`
324
338
``
325
339
`// LLVM is not being cleared here, we want to use the BOLT-optimized LLVM
`