Skip to content

Commit e3a8d9c

Browse files
committed
Fix testing with randomized layouts enabled
1 parent bb2b3d0 commit e3a8d9c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: build_system/tests.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,12 @@ const BASE_SYSROOT_SUITE: &[TestCase] = &[
109109

110110
SYSROOT_TESTS.clean(&runner.dirs);
111111

112+
let mut target_compiler = runner.target_compiler.clone();
112113
// coretests and alloctests produce a bunch of warnings. When running
113114
// in rust's CI warnings are denied, so we have to override that here.
114-
let mut target_compiler = runner.target_compiler.clone();
115115
target_compiler.rustflags.push("--cap-lints=allow".to_owned());
116+
// The standard library may have been compiled with -Zrandomize-layout.
117+
target_compiler.rustflags.extend(["--cfg".to_owned(), "randomized_layouts".to_owned()]);
116118

117119
if runner.is_native {
118120
let mut test_cmd = SYSROOT_TESTS.test(&target_compiler, &runner.dirs);

0 commit comments

Comments
 (0)