Skip to content

Commit e02957a

Browse files
committed
add coverage for target specific value
Signed-off-by: onur-ozkan <[email protected]>
1 parent 4fd82f7 commit e02957a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/bootstrap/src/core/config/tests.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,15 @@ fn override_toml() {
120120
"--set=change-id=1".to_owned(),
121121
"--set=rust.lto=fat".to_owned(),
122122
"--set=rust.deny-warnings=false".to_owned(),
123+
"--set=build.optimized-compiler-builtins=true".to_owned(),
123124
"--set=build.gdb=\"bar\"".to_owned(),
124125
"--set=build.tools=[\"cargo\"]".to_owned(),
125126
"--set=llvm.build-config={\"foo\" = \"bar\"}".to_owned(),
126127
"--set=target.x86_64-unknown-linux-gnu.runner=bar".to_owned(),
127128
"--set=target.x86_64-unknown-linux-gnu.rpath=false".to_owned(),
128129
"--set=target.aarch64-unknown-linux-gnu.sanitizers=false".to_owned(),
129130
"--set=target.aarch64-apple-darwin.runner=apple".to_owned(),
131+
"--set=target.aarch64-apple-darwin.optimized-compiler-builtins=false".to_owned(),
130132
]),
131133
|&_| {
132134
toml::from_str(
@@ -167,6 +169,7 @@ runner = "x86_64-runner"
167169
);
168170
assert_eq!(config.gdb, Some("bar".into()), "setting string value with quotes");
169171
assert!(!config.deny_warnings, "setting boolean value");
172+
assert!(config.optimized_compiler_builtins, "setting boolean value");
170173
assert_eq!(
171174
config.tools,
172175
Some(["cargo".to_string()].into_iter().collect()),
@@ -193,7 +196,11 @@ runner = "x86_64-runner"
193196
..Default::default()
194197
};
195198
let darwin = TargetSelection::from_user("aarch64-apple-darwin");
196-
let darwin_values = Target { runner: Some("apple".into()), ..Default::default() };
199+
let darwin_values = Target {
200+
runner: Some("apple".into()),
201+
optimized_compiler_builtins: Some(false),
202+
..Default::default()
203+
};
197204
assert_eq!(
198205
config.target_config,
199206
[(x86_64, x86_64_values), (aarch64, aarch64_values), (darwin, darwin_values)]

0 commit comments

Comments
 (0)