Skip to content

Commit

Permalink
Be mindful of prebuilt crates (is this even possible for proc-macro c…
Browse files Browse the repository at this point in the history
…rates?)
  • Loading branch information
danielschemmel committed May 20, 2020
1 parent d43fd10 commit 30f9506
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 2 additions & 1 deletion versionator-proc/build.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
fn main() {
println!("cargo:rustc-env=HOST_TRIPLE={}", std::env::var("HOST").unwrap());
// We assume that the target triple of this crate is the same as that of the target program.
// This is pretty much always the case, but not actually guaranteed.
println!("cargo:rustc-env=TARGET_TRIPLE={}", std::env::var("TARGET").unwrap());
}
2 changes: 0 additions & 2 deletions versionator-proc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ fn compiler_version() -> proc_macro2::TokenStream {
Channel::Dev => quote!(versionator::CompilerChannel::Dev),
};

assert_eq!(version.host, env!("HOST_TRIPLE"));
let host_triple = &version.host;

let target_triple = env!("TARGET_TRIPLE");

quote!(versionator::CompilerVersion{
Expand Down

0 comments on commit 30f9506

Please sign in to comment.