1 | use std::env; |
---|---|
2 | |
3 | fn main() { |
4 | println!("cargo:rerun-if-changed=build.rs"); |
5 | |
6 | // Decide ideal limb width for arithmetic in the float parser. Refer to |
7 | // src/lexical/math.rs for where this has an effect. |
8 | let target_arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap(); |
9 | match target_arch.as_str() { |
10 | "aarch64"| "mips64"| "powerpc64"| "x86_64"=> { |
11 | println!("cargo:rustc-cfg=limb_width_64"); |
12 | } |
13 | _ => { |
14 | println!("cargo:rustc-cfg=limb_width_32"); |
15 | } |
16 | } |
17 | } |
18 |