-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Per the comment for `RUSTC_FLAGS_FOR_BIN`: > Ultimately, this should move to the Cargo.toml, for example when > rust-lang/cargo#7811 is merged into Cargo. this moves setting the linker script search path to build.rs, which is enabled by the addition of the `cargo:rustc-link-arg=FLAG` instruction for build scripts. This removes the need to special case the -L flag so that it is only used when creating a binary and not when compiling dependencies, since that is exactly what the new build script instruction handles.
- Loading branch information
Showing
3 changed files
with
15 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
fn main() { | ||
println!("cargo:rerun-if-changed=layout.ld"); | ||
println!("cargo:rerun-if-changed=../kernel_layout.ld"); | ||
println!( | ||
"cargo:rustc-link-arg-bins=-L{}", | ||
std::env::var("CARGO_MANIFEST_DIR").unwrap_or(".".to_string()) | ||
); | ||
} |