forked from bazelbuild/rules_rust
-
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.
fix rustdoc: omit link flags for rustdoc (bazelbuild#2467)
In our project, rust_doc fails because it is generating `-l` arguments to rustdoc, and rustdoc does not support `-l` arguments. In my understanding, these arguments are only relevant for calling the linker at some point, and it won't be called for rustdoc anyway. With this PR, our project can build with rust_doc. --------- Co-authored-by: Krasimir Georgiev <[email protected]>
- Loading branch information
1 parent
77047e4
commit 9d646c6
Showing
4 changed files
with
120 additions
and
46 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,3 +1,8 @@ | ||
fn main() { | ||
println!("cargo:rustc-env=CONST=xyz"); | ||
if cfg!(target_os = "macos") { | ||
println!("cargo:rustc-link-lib=dylib=c++") | ||
} else if cfg!(target_os = "linux") { | ||
println!("cargo:rustc-link-lib=dylib=stdc++") | ||
} | ||
} |
Oops, something went wrong.