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.
2 parents 2aaa2fe + 92f9d79 commit 1e5380eCopy full SHA for 1e5380e
book/src/how_to/building_drivers.md
@@ -11,10 +11,15 @@ value to `efi_boot_service_driver` or `efi_runtime_driver`.
11
12
Example:
13
14
-```toml
15
-# In .cargo/config.toml:
16
-[build]
17
-rustflags = ["-C", "link-args=/subsystem:efi_runtime_driver"]
+```rust
+// In build.rs
+
+fn main() {
18
+ let target = std::env::var("TARGET").unwrap();
19
+ if target.ends_with("-unknown-uefi") {
20
+ println!("cargo::rustc-link-arg=/subsystem:efi_runtime_driver");
21
+ }
22
+}
23
```
24
25
[spec-images]: https://uefi.org/specs/UEFI/2.10/02_Overview.html#uefi-images
0 commit comments