diff options
Diffstat (limited to 'examples/build.rs')
| -rw-r--r-- | examples/build.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/examples/build.rs b/examples/build.rs new file mode 100644 index 0000000..06a0e4f --- /dev/null +++ b/examples/build.rs @@ -0,0 +1,12 @@ +use std::env; + +fn main() { + let target = env::var("TARGET").unwrap(); + let triple: Vec<_> = target.split('-').collect(); + let mapped = match triple.get(0) { + Some(&"i686") => "i386", + Some(&"x86_64") => "amd64", + _ => panic!("unknown architecture of {:?}", target), + }; + println!("cargo:rustc-link-search=../../../native/win7/{}", mapped); +} |