We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c03433 commit a32e55dCopy full SHA for a32e55d
tests/build-std/main.rs
@@ -187,6 +187,35 @@ fn basic() {
187
assert_eq!(p.glob(deps_dir.join("*.dylib")).count(), 0);
188
}
189
190
+#[cargo_test(build_std_real)]
191
+fn lto() {
192
+ let p = project()
193
+ .file(
194
+ "Cargo.toml",
195
+ r#"
196
+ [package]
197
+ name = "foo"
198
+ version = "0.1.0"
199
+ edition = "2021"
200
+
201
+ [profile.dev]
202
+ lto = "thin"
203
+ "#,
204
+ )
205
206
+ "src/main.rs",
207
208
+ fn main() {}
209
210
211
+ .build();
212
213
+ p.cargo("build")
214
+ .build_std_arg("std")
215
+ .env("RUSTFLAGS", "-C linker-features=-lld")
216
+ .run();
217
+}
218
219
#[cargo_test(build_std_real)]
220
fn host_proc_macro() {
221
let p = project()
0 commit comments