]> git.lizzy.rs Git - rust.git/commitdiff
rustc: Specify c_int width for each target
authorDaniel Klauer <daniel.c.klauer@web.de>
Sat, 30 Sep 2017 11:47:49 +0000 (13:47 +0200)
committerDaniel Klauer <daniel.c.klauer@web.de>
Sat, 30 Sep 2017 13:54:08 +0000 (15:54 +0200)
(all i32 for now, as in liblibc)

73 files changed:
src/librustc_back/target/aarch64_apple_ios.rs
src/librustc_back/target/aarch64_linux_android.rs
src/librustc_back/target/aarch64_unknown_freebsd.rs
src/librustc_back/target/aarch64_unknown_fuchsia.rs
src/librustc_back/target/aarch64_unknown_linux_gnu.rs
src/librustc_back/target/aarch64_unknown_linux_musl.rs
src/librustc_back/target/arm_linux_androideabi.rs
src/librustc_back/target/arm_unknown_linux_gnueabi.rs
src/librustc_back/target/arm_unknown_linux_gnueabihf.rs
src/librustc_back/target/arm_unknown_linux_musleabi.rs
src/librustc_back/target/arm_unknown_linux_musleabihf.rs
src/librustc_back/target/armv5te_unknown_linux_gnueabi.rs
src/librustc_back/target/armv7_apple_ios.rs
src/librustc_back/target/armv7_linux_androideabi.rs
src/librustc_back/target/armv7_unknown_linux_gnueabihf.rs
src/librustc_back/target/armv7_unknown_linux_musleabihf.rs
src/librustc_back/target/armv7s_apple_ios.rs
src/librustc_back/target/asmjs_unknown_emscripten.rs
src/librustc_back/target/i386_apple_ios.rs
src/librustc_back/target/i686_apple_darwin.rs
src/librustc_back/target/i686_linux_android.rs
src/librustc_back/target/i686_pc_windows_gnu.rs
src/librustc_back/target/i686_pc_windows_msvc.rs
src/librustc_back/target/i686_unknown_dragonfly.rs
src/librustc_back/target/i686_unknown_freebsd.rs
src/librustc_back/target/i686_unknown_haiku.rs
src/librustc_back/target/i686_unknown_linux_gnu.rs
src/librustc_back/target/i686_unknown_linux_musl.rs
src/librustc_back/target/i686_unknown_netbsd.rs
src/librustc_back/target/i686_unknown_openbsd.rs
src/librustc_back/target/le32_unknown_nacl.rs
src/librustc_back/target/mips64_unknown_linux_gnuabi64.rs
src/librustc_back/target/mips64el_unknown_linux_gnuabi64.rs
src/librustc_back/target/mips_unknown_linux_gnu.rs
src/librustc_back/target/mips_unknown_linux_musl.rs
src/librustc_back/target/mips_unknown_linux_uclibc.rs
src/librustc_back/target/mipsel_unknown_linux_gnu.rs
src/librustc_back/target/mipsel_unknown_linux_musl.rs
src/librustc_back/target/mipsel_unknown_linux_uclibc.rs
src/librustc_back/target/mod.rs
src/librustc_back/target/msp430_none_elf.rs
src/librustc_back/target/powerpc64_unknown_linux_gnu.rs
src/librustc_back/target/powerpc64le_unknown_linux_gnu.rs
src/librustc_back/target/powerpc_unknown_linux_gnu.rs
src/librustc_back/target/s390x_unknown_linux_gnu.rs
src/librustc_back/target/sparc64_unknown_linux_gnu.rs
src/librustc_back/target/sparc64_unknown_netbsd.rs
src/librustc_back/target/sparcv9_sun_solaris.rs
src/librustc_back/target/thumbv6m_none_eabi.rs
src/librustc_back/target/thumbv7em_none_eabi.rs
src/librustc_back/target/thumbv7em_none_eabihf.rs
src/librustc_back/target/thumbv7m_none_eabi.rs
src/librustc_back/target/wasm32_experimental_emscripten.rs
src/librustc_back/target/wasm32_unknown_emscripten.rs
src/librustc_back/target/x86_64_apple_darwin.rs
src/librustc_back/target/x86_64_apple_ios.rs
src/librustc_back/target/x86_64_linux_android.rs
src/librustc_back/target/x86_64_pc_windows_gnu.rs
src/librustc_back/target/x86_64_pc_windows_msvc.rs
src/librustc_back/target/x86_64_rumprun_netbsd.rs
src/librustc_back/target/x86_64_sun_solaris.rs
src/librustc_back/target/x86_64_unknown_bitrig.rs
src/librustc_back/target/x86_64_unknown_dragonfly.rs
src/librustc_back/target/x86_64_unknown_freebsd.rs
src/librustc_back/target/x86_64_unknown_fuchsia.rs
src/librustc_back/target/x86_64_unknown_haiku.rs
src/librustc_back/target/x86_64_unknown_l4re_uclibc.rs
src/librustc_back/target/x86_64_unknown_linux_gnu.rs
src/librustc_back/target/x86_64_unknown_linux_musl.rs
src/librustc_back/target/x86_64_unknown_netbsd.rs
src/librustc_back/target/x86_64_unknown_openbsd.rs
src/librustc_back/target/x86_64_unknown_redox.rs
src/librustc_trans/type_.rs

index 802a8c77db05bc3c77cad41642f91dfece4b24ff..cff6eb534b1e5b0f6d4eaa0876ede23e018d5403 100644 (file)
@@ -18,6 +18,7 @@ pub fn target() -> TargetResult {
         llvm_target: "arm64-apple-ios".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "64".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".to_string(),
         arch: "aarch64".to_string(),
         target_os: "ios".to_string(),
index 7d8610b4a36841bc277d218bfd1e31c6c3ca610e..2c0d6a55ed8e544ebb1eb6281a0237520933afcd 100644 (file)
@@ -24,6 +24,7 @@ pub fn target() -> TargetResult {
         llvm_target: "aarch64-linux-android".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "64".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(),
         arch: "aarch64".to_string(),
         target_os: "android".to_string(),
index c5427a13e4c7df44510a32ec669eb8d0d7945699..1ce8d600c033107e88907ed9f71ac27413249c34 100644 (file)
@@ -22,6 +22,7 @@ pub fn target() -> TargetResult {
         llvm_target: "aarch64-unknown-freebsd".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "64".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(),
         arch: "aarch64".to_string(),
         target_os: "freebsd".to_string(),
index 5d680504a02d00bff5bb9f1391977cdc4cf1447c..73cd9c9270153a68c8119bc2aa5af7208041f8e4 100644 (file)
@@ -19,6 +19,7 @@ pub fn target() -> TargetResult {
         llvm_target: "aarch64-unknown-fuchsia".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "64".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(),
         arch: "aarch64".to_string(),
         target_os: "fuchsia".to_string(),
index 7c2c45a2843a7ccf8e9da14c8aef7a470ddaed12..5c9c9a0c555c23656a02afc69dcf3d0ea9d6daa4 100644 (file)
@@ -22,6 +22,7 @@ pub fn target() -> TargetResult {
         llvm_target: "aarch64-unknown-linux-gnu".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "64".to_string(),
+        target_c_int_width: "32".to_string(),
         target_env: "gnu".to_string(),
         data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(),
         arch: "aarch64".to_string(),
index 1edac616366dd76e6d87b26094cebf6cf2a62b79..d39ad97bbcb87d4bd5c7330b55c7cf180bdbc65a 100644 (file)
@@ -22,6 +22,7 @@ pub fn target() -> TargetResult {
         llvm_target: "aarch64-unknown-linux-musl".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "64".to_string(),
+        target_c_int_width: "32".to_string(),
         target_env: "musl".to_string(),
         data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(),
         arch: "aarch64".to_string(),
index 6bfe90af2ca167e398cf64f3a660f1139e6616c2..e93a9a788a42bd3ed6771e5700c4ffc4f491c1ad 100644 (file)
@@ -21,6 +21,7 @@ pub fn target() -> TargetResult {
         llvm_target: "arm-linux-androideabi".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "32".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
         arch: "arm".to_string(),
         target_os: "android".to_string(),
index 165d34fe6c7cee980c32489f0e8eec8ecfd35bf1..b9f40accaeb72dcd285b53347d54e2cee9ad0598 100644 (file)
@@ -18,6 +18,7 @@ pub fn target() -> TargetResult {
         llvm_target: "arm-unknown-linux-gnueabi".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "32".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
         arch: "arm".to_string(),
         target_os: "linux".to_string(),
index 731021d979bc4158db8115bcf560a20f9b569f8e..a3ea69caec6468f372d8584805ad867067e08f49 100644 (file)
@@ -18,6 +18,7 @@ pub fn target() -> TargetResult {
         llvm_target: "arm-unknown-linux-gnueabihf".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "32".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
         arch: "arm".to_string(),
         target_os: "linux".to_string(),
index f81bcd78b03aada993d5d78bb13b759df4685a9e..598f722d9af7ec87f5457b4fbe12b20a17404250 100644 (file)
@@ -25,6 +25,7 @@ pub fn target() -> TargetResult {
         llvm_target: "arm-unknown-linux-gnueabi".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "32".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
         arch: "arm".to_string(),
         target_os: "linux".to_string(),
index 6c47678ede6adb4067417f33a56504dbc4c57e6d..ea0bf75b103c9997d67eb1d7d9d462c674e24242 100644 (file)
@@ -25,6 +25,7 @@ pub fn target() -> TargetResult {
         llvm_target: "arm-unknown-linux-gnueabihf".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "32".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
         arch: "arm".to_string(),
         target_os: "linux".to_string(),
index ef00c9a3278b925d07190053dc7c5fb34b97ee3d..b95737216787bbaac49c1390599a71352e7f0f8b 100644 (file)
@@ -17,6 +17,7 @@ pub fn target() -> TargetResult {
         llvm_target: "armv5te-unknown-linux-gnueabi".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "32".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
         arch: "arm".to_string(),
         target_os: "linux".to_string(),
index 4d8745828329431459dee1f0120ffff270a92bbf..67d3d12fb57768bc361eee74103a0db0816e3d58 100644 (file)
@@ -18,6 +18,7 @@ pub fn target() -> TargetResult {
         llvm_target: "armv7-apple-ios".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "32".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:o-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32".to_string(),
         arch: "arm".to_string(),
         target_os: "ios".to_string(),
index 45654b0f870201fcbb8aa37240e71ea2fba9275a..9e3eec13ab763bf6fcf7e0f3aa51424cf60b7b4c 100644 (file)
@@ -25,6 +25,7 @@ pub fn target() -> TargetResult {
         llvm_target: "armv7-none-linux-android".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "32".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
         arch: "arm".to_string(),
         target_os: "android".to_string(),
index d3a6a68449c39f0ad217d7ed4108bbd4bf3e7538..569c721473da555765428a4534b4f9aae4289e1d 100644 (file)
@@ -17,6 +17,7 @@ pub fn target() -> TargetResult {
         llvm_target: "armv7-unknown-linux-gnueabihf".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "32".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
         arch: "arm".to_string(),
         target_os: "linux".to_string(),
index 5086cd44f7ac947522ba5688231a3e095c1fee24..a36e26c0b7d5fa4dbad97f605dcaa967428f13bf 100644 (file)
@@ -26,6 +26,7 @@ pub fn target() -> TargetResult {
         llvm_target: "armv7-unknown-linux-gnueabihf".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "32".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
         arch: "arm".to_string(),
         target_os: "linux".to_string(),
index 96c89a7ed3bd58e21caebb77511832f1f1e35468..e4cc89ab2114065d0be847b3402b41f24f148838 100644 (file)
@@ -18,6 +18,7 @@ pub fn target() -> TargetResult {
         llvm_target: "armv7s-apple-ios".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "32".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:o-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32".to_string(),
         arch: "arm".to_string(),
         target_os: "ios".to_string(),
index b884d4e54101e8ef6eac7705b1f4048b2d99173a..033e840f2020a429a189efc2daa6f23bff4e67c1 100644 (file)
@@ -38,6 +38,7 @@ pub fn target() -> Result<Target, String> {
         llvm_target: "asmjs-unknown-emscripten".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "32".to_string(),
+        target_c_int_width: "32".to_string(),
         target_os: "emscripten".to_string(),
         target_env: "".to_string(),
         target_vendor: "unknown".to_string(),
index 0e4e6900024b015f6050f2d68ec563926f6b7893..82eae1a31a9adefc9cca8988d0ad5c45482a1265 100644 (file)
@@ -18,6 +18,7 @@ pub fn target() -> TargetResult {
         llvm_target: "i386-apple-ios".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "32".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:o-p:32:32-f64:32:64-f80:128-n8:16:32-S128".to_string(),
         arch: "x86".to_string(),
         target_os: "ios".to_string(),
index 8c931f18411ca3e547a1a1e1a6cbd31c40c2ffdd..14937f9aa55b603eceb37f4ccb709d7b0547d60f 100644 (file)
@@ -22,6 +22,7 @@ pub fn target() -> TargetResult {
         llvm_target: "i686-apple-darwin".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "32".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:o-p:32:32-f64:32:64-f80:128-n8:16:32-S128".to_string(),
         arch: "x86".to_string(),
         target_os: "macos".to_string(),
index 565fbe37bf89e64f1dd4f209922cb1ebf556c195..bf27bce79acec4b9a7f64fd541f858d85b5029aa 100644 (file)
@@ -28,6 +28,7 @@ pub fn target() -> TargetResult {
         llvm_target: "i686-linux-android".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "32".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128".to_string(),
         arch: "x86".to_string(),
         target_os: "android".to_string(),
index 4a736a93be7d7867fc9dd60d69c1e65cb72505ff..5f20a620b6e1ccf67e1a7a81d46961edfcc381b3 100644 (file)
@@ -26,6 +26,7 @@ pub fn target() -> TargetResult {
         llvm_target: "i686-pc-windows-gnu".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "32".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32".to_string(),
         arch: "x86".to_string(),
         target_os: "windows".to_string(),
index 17fe306804f4a673abfe39d48dc16de527c1ca43..48cee04457348fbbe0e2fccc973767bb58af14f4 100644 (file)
@@ -30,6 +30,7 @@ pub fn target() -> TargetResult {
         llvm_target: "i686-pc-windows-msvc".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "32".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32".to_string(),
         arch: "x86".to_string(),
         target_os: "windows".to_string(),
index 9eda49a3709a57213da54e298653f9a46a9378fa..891127b9d3711a326ca02dee9372da8a170db8c1 100644 (file)
@@ -22,6 +22,7 @@ pub fn target() -> TargetResult {
         llvm_target: "i686-unknown-dragonfly".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "32".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128".to_string(),
         arch: "x86".to_string(),
         target_os: "dragonfly".to_string(),
index 041f3070c95bbee37df35f3405cfc266225a4770..076acb8ed318c89a8b7a5b4a5cfd0e3a7eaf0e5a 100644 (file)
@@ -22,6 +22,7 @@ pub fn target() -> TargetResult {
         llvm_target: "i686-unknown-freebsd".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "32".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128".to_string(),
         arch: "x86".to_string(),
         target_os: "freebsd".to_string(),
index f21c2f8c77ab0bf8272a252fddf1c6a01fdad18a..02a15d6445c479b5a29f200fdc7380f8c3d5f3d8 100644 (file)
@@ -22,6 +22,7 @@ pub fn target() -> TargetResult {
         llvm_target: "i686-unknown-haiku".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "32".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128".to_string(),
         arch: "x86".to_string(),
         target_os: "haiku".to_string(),
index f7b916816b31344a87147ec232065ad25590a50d..b509e019c7e1a83d617ff6380735001eb6709f7b 100644 (file)
@@ -22,6 +22,7 @@ pub fn target() -> TargetResult {
         llvm_target: "i686-unknown-linux-gnu".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "32".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128".to_string(),
         arch: "x86".to_string(),
         target_os: "linux".to_string(),
index 00567d70fd6ce466990eb424f4d2f2e6e926f970..99c0d4c81791548dda5c3b95dd8446951e6336fa 100644 (file)
@@ -37,6 +37,7 @@ pub fn target() -> TargetResult {
         llvm_target: "i686-unknown-linux-musl".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "32".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128".to_string(),
         arch: "x86".to_string(),
         target_os: "linux".to_string(),
index 7a9de529566b5caa064669a7a11f133ce1c31f28..dd21c205106ea4af1b6dd007dc22b7846601eff8 100644 (file)
@@ -22,6 +22,7 @@ pub fn target() -> TargetResult {
         llvm_target: "i686-unknown-netbsdelf".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "32".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128".to_string(),
         arch: "x86".to_string(),
         target_os: "netbsd".to_string(),
index b19bdbe049bcdb4beedb0af6d1c2e1ea5efc38aa..8daa5fcb88b3f69669b863327378f42b7ceb1809 100644 (file)
@@ -22,6 +22,7 @@ pub fn target() -> TargetResult {
         llvm_target: "i686-unknown-openbsd".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "32".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128".to_string(),
         arch: "x86".to_string(),
         target_os: "openbsd".to_string(),
index 51eeae50e22ee17ece637332c51d82d5115f3342..9af4606f1f1f616a9a8f7117fb97a09b3fa438cf 100644 (file)
@@ -39,6 +39,7 @@ pub fn target() -> TargetResult {
         llvm_target: "le32-unknown-nacl".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "32".to_string(),
+        target_c_int_width: "32".to_string(),
         target_os: "nacl".to_string(),
         target_env: "newlib".to_string(),
         target_vendor: "unknown".to_string(),
index 2d77902046109223ed6db1c777c6581fa0e8a71c..5c3cf31b3e45f07d75c6d4dd3d4bca2f5bc875a6 100644 (file)
@@ -16,6 +16,7 @@ pub fn target() -> TargetResult {
         llvm_target: "mips64-unknown-linux-gnuabi64".to_string(),
         target_endian: "big".to_string(),
         target_pointer_width: "64".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(),
         arch: "mips64".to_string(),
         target_os: "linux".to_string(),
index c26780b9e65ce604e4df480a576980a4db114ce0..96988388e811eb0dcad51b5ec9ce170e85dfe8ef 100644 (file)
@@ -16,6 +16,7 @@ pub fn target() -> TargetResult {
         llvm_target: "mips64el-unknown-linux-gnuabi64".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "64".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(),
         arch: "mips64".to_string(),
         target_os: "linux".to_string(),
index 24649851d76fd1b336fdd03ff37f27af224b9580..5a43e1c4c7a0f36c9c4a55075957e44427ea5b21 100644 (file)
@@ -16,6 +16,7 @@ pub fn target() -> TargetResult {
         llvm_target: "mips-unknown-linux-gnu".to_string(),
         target_endian: "big".to_string(),
         target_pointer_width: "32".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(),
         arch: "mips".to_string(),
         target_os: "linux".to_string(),
index 6303722945c9f3a4814157a903b4c74b507d45d7..3f6b984272ed5ec40c620311258c3023e8c8bc85 100644 (file)
@@ -16,6 +16,7 @@ pub fn target() -> TargetResult {
         llvm_target: "mips-unknown-linux-musl".to_string(),
         target_endian: "big".to_string(),
         target_pointer_width: "32".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(),
         arch: "mips".to_string(),
         target_os: "linux".to_string(),
index 1a7a56a9779218c52823912fa0ac720db4f40b86..c851cab069a1ca018775d4eb4e0e184262a48b11 100644 (file)
@@ -16,6 +16,7 @@ pub fn target() -> TargetResult {
         llvm_target: "mips-unknown-linux-uclibc".to_string(),
         target_endian: "big".to_string(),
         target_pointer_width: "32".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(),
         arch: "mips".to_string(),
         target_os: "linux".to_string(),
index cbf8339993c86f503ca60d0b3cd3e8885fdb6999..2c38444d050fbde557e1c0783a63ab7287850655 100644 (file)
@@ -16,6 +16,7 @@ pub fn target() -> TargetResult {
         llvm_target: "mipsel-unknown-linux-gnu".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "32".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(),
         arch: "mips".to_string(),
         target_os: "linux".to_string(),
index b367bce75a1d944076f81d8716b7f47eaead6dbb..464f0bfe48058d33513be98327afabd0c97c3f32 100644 (file)
@@ -16,6 +16,7 @@ pub fn target() -> TargetResult {
         llvm_target: "mipsel-unknown-linux-musl".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "32".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(),
         arch: "mips".to_string(),
         target_os: "linux".to_string(),
index 686dfbe987d10e3d90f6f9fc4009a98aae2b33c0..5d2ba548769ff6032ede27b31dd46dc1b4651aa8 100644 (file)
@@ -16,6 +16,7 @@ pub fn target() -> TargetResult {
         llvm_target: "mipsel-unknown-linux-uclibc".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "32".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(),
         arch: "mips".to_string(),
         target_os: "linux".to_string(),
index 27a0855dc29fe81d195877b95133d40e26c06aa0..b1b208d2de4f112c1aebaf192d74ee98cbae6d7d 100644 (file)
@@ -239,6 +239,8 @@ pub struct Target {
     pub target_endian: String,
     /// String to use as the `target_pointer_width` `cfg` variable.
     pub target_pointer_width: String,
+    /// Width of c_int type
+    pub target_c_int_width: String,
     /// OS name to use for conditional compilation.
     pub target_os: String,
     /// Environment name to use for conditional compilation.
@@ -556,6 +558,7 @@ pub fn from_json(obj: Json) -> TargetResult {
             llvm_target: get_req_field("llvm-target")?,
             target_endian: get_req_field("target-endian")?,
             target_pointer_width: get_req_field("target-pointer-width")?,
+            target_c_int_width: get_req_field("target-c-int-width")?,
             data_layout: get_req_field("data-layout")?,
             arch: get_req_field("arch")?,
             target_os: get_req_field("os")?,
@@ -860,6 +863,7 @@ macro_rules! target_option_val {
         target_val!(llvm_target);
         target_val!(target_endian);
         target_val!(target_pointer_width);
+        target_val!(target_c_int_width);
         target_val!(arch);
         target_val!(target_os, "os");
         target_val!(target_env, "env");
index 588a8bde79b986b40b042efcc0305d29cc1651b9..e3851ec0829dd22384f9b3933c2553895e429b23 100644 (file)
@@ -16,6 +16,7 @@ pub fn target() -> TargetResult {
         llvm_target: "msp430-none-elf".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "16".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-p:16:16-i32:16-i64:16-f32:16-f64:16-a:8-n8:16-S16".to_string(),
         arch: "msp430".to_string(),
         target_os: "none".to_string(),
index 7b038ac007396e37c09636170ebbf4fde8d8f6d6..1f119c7204b162f35b858431c85cd42ba8c563c0 100644 (file)
@@ -28,6 +28,7 @@ pub fn target() -> TargetResult {
         llvm_target: "powerpc64-unknown-linux-gnu".to_string(),
         target_endian: "big".to_string(),
         target_pointer_width: "64".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "E-m:e-i64:64-n32:64".to_string(),
         arch: "powerpc64".to_string(),
         target_os: "linux".to_string(),
index 5b50b96837fbe27a7ece78477d084a0005e2f098..13c59785d480b8d8deefd5fe6545551a8750953b 100644 (file)
@@ -24,6 +24,7 @@ pub fn target() -> TargetResult {
         llvm_target: "powerpc64le-unknown-linux-gnu".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "64".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-i64:64-n32:64".to_string(),
         arch: "powerpc64".to_string(),
         target_os: "linux".to_string(),
index 8d4ad5f0b447f87d163eb1fdddaed1cbc1a7a101..1797126b3104a65b2f0474b45d43fc5e1ea0b4b7 100644 (file)
@@ -23,6 +23,7 @@ pub fn target() -> TargetResult {
         llvm_target: "powerpc-unknown-linux-gnu".to_string(),
         target_endian: "big".to_string(),
         target_pointer_width: "32".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(),
         arch: "powerpc".to_string(),
         target_os: "linux".to_string(),
index aad9effacd440460898b21f105a3818b2b314ef9..d96379547fb0f33524efd31da04b74117535ce6b 100644 (file)
@@ -28,6 +28,7 @@ pub fn target() -> TargetResult {
         llvm_target: "s390x-unknown-linux-gnu".to_string(),
         target_endian: "big".to_string(),
         target_pointer_width: "64".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-a:8:16-n32:64".to_string(),
         arch: "s390x".to_string(),
         target_os: "linux".to_string(),
index 7f710ad402053cef9b9befe426461125a7819e93..aed40e9df436ee7b3d82bb532b693c23bb58a77f 100644 (file)
@@ -21,6 +21,7 @@ pub fn target() -> TargetResult {
         llvm_target: "sparc64-unknown-linux-gnu".to_string(),
         target_endian: "big".to_string(),
         target_pointer_width: "64".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "E-m:e-i64:64-n32:64-S128".to_string(),
         arch: "sparc64".to_string(),
         target_os: "linux".to_string(),
index bc65a17ce6ea93063743a2d44646133437201150..483c87909455d6a42771ef2509fbcd75508defda 100644 (file)
@@ -21,6 +21,7 @@ pub fn target() -> TargetResult {
         llvm_target: "sparc64-unknown-netbsd".to_string(),
         target_endian: "big".to_string(),
         target_pointer_width: "64".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "E-m:e-i64:64-n32:64-S128".to_string(),
         arch: "sparc64".to_string(),
         target_os: "netbsd".to_string(),
index 122b38968a9c0355e74e258c11084408102be7fc..bfe1afebdb3a33a9dedec0e8fbcb66c024b01f27 100644 (file)
@@ -22,6 +22,7 @@ pub fn target() -> TargetResult {
         llvm_target: "sparcv9-sun-solaris".to_string(),
         target_endian: "big".to_string(),
         target_pointer_width: "64".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "E-m:e-i64:64-n32:64-S128".to_string(),
         // Use "sparc64" instead of "sparcv9" here, since the former is already
         // used widely in the source base.  If we ever needed ABI
index 08bf145e5518ac8911a5ae34c676565437aaea80..d164fbf9d96f92169f34dfacfc5a2082c6933d79 100644 (file)
@@ -18,6 +18,7 @@ pub fn target() -> TargetResult {
         llvm_target: "thumbv6m-none-eabi".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "32".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
         arch: "arm".to_string(),
         target_os: "none".to_string(),
index 13f9cc5f65fb9bd3db0f2ba1fdd66b5a48e0a5c5..7e66ddf7b06a724b9368656be8fdd574fad279cd 100644 (file)
@@ -27,6 +27,7 @@ pub fn target() -> TargetResult {
         llvm_target: "thumbv7em-none-eabi".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "32".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
         arch: "arm".to_string(),
         target_os: "none".to_string(),
index 929b6db6fb2c60b7914139ddd3f80776c7d0d37e..31835de36d6a4d50b8beae63e93d3862f2dbac6e 100644 (file)
@@ -26,6 +26,7 @@ pub fn target() -> TargetResult {
         llvm_target: "thumbv7em-none-eabihf".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "32".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
         arch: "arm".to_string(),
         target_os: "none".to_string(),
index 8d46e7cb90760bb5903a9b6dc29814edd8a18f91..8f16ae4ea12df5b9d9ea325f588dd283e0a9d94e 100644 (file)
@@ -18,6 +18,7 @@ pub fn target() -> TargetResult {
         llvm_target: "thumbv7m-none-eabi".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "32".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
         arch: "arm".to_string(),
         target_os: "none".to_string(),
index 42ab19404049eee0cee5aa14aa19fe97f568ea40..71668444d9aec260dc4b9a8e630e2fd0aa196bde 100644 (file)
@@ -46,6 +46,7 @@ pub fn target() -> Result<Target, String> {
         llvm_target: "wasm32-unknown-unknown".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "32".to_string(),
+        target_c_int_width: "32".to_string(),
         target_os: "emscripten".to_string(),
         target_env: "".to_string(),
         target_vendor: "unknown".to_string(),
index a0a2699d8f951c0fe1e4e99e1344d7796d517e6d..e6584addf4aefe487f5d5c907e185a471f3c8678 100644 (file)
@@ -42,6 +42,7 @@ pub fn target() -> Result<Target, String> {
         llvm_target: "asmjs-unknown-emscripten".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "32".to_string(),
+        target_c_int_width: "32".to_string(),
         target_os: "emscripten".to_string(),
         target_env: "".to_string(),
         target_vendor: "unknown".to_string(),
index 8ac76679008e9f91fc62326f5c93eaf3a32966ca..71ac360eb99065399df81a1ac0c76bcf23174072 100644 (file)
@@ -23,6 +23,7 @@ pub fn target() -> TargetResult {
         llvm_target: "x86_64-apple-darwin".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "64".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:o-i64:64-f80:128-n8:16:32:64-S128".to_string(),
         arch: "x86_64".to_string(),
         target_os: "macos".to_string(),
index 61a71da2162a06c964736ae8633435a28074357d..eed99e3784ce0a86b9582a812b5d22bf4a2f3b9e 100644 (file)
@@ -18,6 +18,7 @@ pub fn target() -> TargetResult {
         llvm_target: "x86_64-apple-ios".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "64".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:o-i64:64-f80:128-n8:16:32:64-S128".to_string(),
         arch: "x86_64".to_string(),
         target_os: "ios".to_string(),
index 158e2b13604ec37d669f4a075cd8747dd6140700..2aae73941539f0bceb07a0bbc42417fe1f9482be 100644 (file)
@@ -24,6 +24,7 @@ pub fn target() -> TargetResult {
         llvm_target: "x86_64-linux-android".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "64".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-i64:64-f80:128-n8:16:32:64-S128".to_string(),
         arch: "x86_64".to_string(),
         target_os: "android".to_string(),
index 10e88d88ee372c97fdb3b27c2479723cf1fa244c..70062d1363841cd8d02804dc42c062b1b1579c25 100644 (file)
@@ -21,6 +21,7 @@ pub fn target() -> TargetResult {
         llvm_target: "x86_64-pc-windows-gnu".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "64".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:w-i64:64-f80:128-n8:16:32:64-S128".to_string(),
         arch: "x86_64".to_string(),
         target_os: "windows".to_string(),
index 7eb673d8b363cdb2c7f20fc2ea8e1cb0ebd4ea97..813d0f1bad947977edfeaad5d93b8d324b1979de 100644 (file)
@@ -21,6 +21,7 @@ pub fn target() -> TargetResult {
         llvm_target: "x86_64-pc-windows-msvc".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "64".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:w-i64:64-f80:128-n8:16:32:64-S128".to_string(),
         arch: "x86_64".to_string(),
         target_os: "windows".to_string(),
index c7e5edde63db3096a94e75673fc7ed2930fc13c2..ab5a6f71ebc4239341cfc0799bb51b265a310632 100644 (file)
@@ -31,6 +31,7 @@ pub fn target() -> TargetResult {
         llvm_target: "x86_64-rumprun-netbsd".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "64".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-i64:64-f80:128-n8:16:32:64-S128".to_string(),
         arch: "x86_64".to_string(),
         target_os: "netbsd".to_string(),
index 38a38ed68bc921b8b29cae6469ce6bb176c1298a..d554138539083bfd35d297dff4503a2f12213836 100644 (file)
@@ -22,6 +22,7 @@ pub fn target() -> TargetResult {
         llvm_target: "x86_64-pc-solaris".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "64".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-i64:64-f80:128-n8:16:32:64-S128".to_string(),
         arch: "x86_64".to_string(),
         target_os: "solaris".to_string(),
index cf4b019dce2dffae76d2dd047c2ff7ea1169a84a..1ea985d70eaca13f06f1af8af7b90198cc705251 100644 (file)
@@ -22,6 +22,7 @@ pub fn target() -> TargetResult {
         llvm_target: "x86_64-unknown-bitrig".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "64".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-i64:64-f80:128-n8:16:32:64-S128".to_string(),
         arch: "x86_64".to_string(),
         target_os: "bitrig".to_string(),
index 8885d89c6f7a84ae5dc65209c75efc5a5c3b8484..56e4685fed5b410062a43b7d748131813b3ed888 100644 (file)
@@ -22,6 +22,7 @@ pub fn target() -> TargetResult {
         llvm_target: "x86_64-unknown-dragonfly".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "64".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-i64:64-f80:128-n8:16:32:64-S128".to_string(),
         arch: "x86_64".to_string(),
         target_os: "dragonfly".to_string(),
index 95870f2be5fc0655c90d0b3e2b8ac506e9fd7810..3d26592530abf145fbba49a402b8e8eefa55aa66 100644 (file)
@@ -22,6 +22,7 @@ pub fn target() -> TargetResult {
         llvm_target: "x86_64-unknown-freebsd".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "64".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-i64:64-f80:128-n8:16:32:64-S128".to_string(),
         arch: "x86_64".to_string(),
         target_os: "freebsd".to_string(),
index 1aebb885595e295c4e71b8a728c9c1fd0b73e209..6e97d53cfad6ad1ce171508d31d29a8e9908a8d4 100644 (file)
@@ -22,6 +22,7 @@ pub fn target() -> TargetResult {
         llvm_target: "x86_64-unknown-fuchsia".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "64".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-i64:64-f80:128-n8:16:32:64-S128".to_string(),
         arch: "x86_64".to_string(),
         target_os: "fuchsia".to_string(),
index 3794a516ec4a8d5abd0e7cef2d63f8b7862868d3..f42c480e7a1178bb631837cfcc59e9ab18e11b10 100644 (file)
@@ -22,6 +22,7 @@ pub fn target() -> TargetResult {
         llvm_target: "x86_64-unknown-haiku".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "64".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-i64:64-f80:128-n8:16:32:64-S128".to_string(),
         arch: "x86_64".to_string(),
         target_os: "haiku".to_string(),
index 99d3171e1c0e0f9dc1eef6f7d616dc9e5c28f77c..6e849f19cf20f3a61da57211d6ba4df7b606fffb 100644 (file)
@@ -20,6 +20,7 @@ pub fn target() -> TargetResult {
         llvm_target: "x86_64-unknown-l4re-uclibc".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "64".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-i64:64-f80:128-n8:16:32:64-S128".to_string(),
         arch: "x86_64".to_string(),
         target_os: "l4re".to_string(),
index d2135f8a0bdce4575f73f8014cb62d66eeab172c..cfe80c96732bf4f367e6f68eb14c0228f4373e4a 100644 (file)
@@ -22,6 +22,7 @@ pub fn target() -> TargetResult {
         llvm_target: "x86_64-unknown-linux-gnu".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "64".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-i64:64-f80:128-n8:16:32:64-S128".to_string(),
         arch: "x86_64".to_string(),
         target_os: "linux".to_string(),
index 7d542b4d3cb5a52571e1967c87a6e6023bf42c59..7e304748e32071bd228e3a64c2d098f7c5f09473 100644 (file)
@@ -22,6 +22,7 @@ pub fn target() -> TargetResult {
         llvm_target: "x86_64-unknown-linux-musl".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "64".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-i64:64-f80:128-n8:16:32:64-S128".to_string(),
         arch: "x86_64".to_string(),
         target_os: "linux".to_string(),
index 5d49fcbd64ab105d04cfd703b0757ef5e7a2bab2..7afb446f5dc97315e728cb482f7261645f266fc2 100644 (file)
@@ -22,6 +22,7 @@ pub fn target() -> TargetResult {
         llvm_target: "x86_64-unknown-netbsd".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "64".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-i64:64-f80:128-n8:16:32:64-S128".to_string(),
         arch: "x86_64".to_string(),
         target_os: "netbsd".to_string(),
index aa289fb577501b2201084ea612c1c5cb3c07cb58..e4bbdbec4c85084bd6f09c88602c0598000092f7 100644 (file)
@@ -22,6 +22,7 @@ pub fn target() -> TargetResult {
         llvm_target: "x86_64-unknown-openbsd".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "64".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-i64:64-f80:128-n8:16:32:64-S128".to_string(),
         arch: "x86_64".to_string(),
         target_os: "openbsd".to_string(),
index 8d2a7afeeacf08b31079f6cd56e4491af96b5e48..401fa4ca2cbddacb68366b52990e189d100a7d6b 100644 (file)
@@ -22,6 +22,7 @@ pub fn target() -> TargetResult {
         llvm_target: "x86_64-unknown-redox".to_string(),
         target_endian: "little".to_string(),
         target_pointer_width: "64".to_string(),
+        target_c_int_width: "32".to_string(),
         data_layout: "e-m:e-i64:64-f80:128-n8:16:32:64-S128".to_string(),
         arch: "x86_64".to_string(),
         target_os: "redox".to_string(),
index 65fdd72bd29e0ada707c84c7386ed75113ffa7e2..ffb303688aaf66747bae9a5af92d4b220d537d40 100644 (file)
@@ -141,7 +141,12 @@ pub fn isize(ccx: &CrateContext) -> Type {
     }
 
     pub fn c_int(ccx: &CrateContext) -> Type {
-        Type::i32(ccx)
+        match &ccx.tcx().sess.target.target.target_c_int_width[..] {
+            "16" => Type::i16(ccx),
+            "32" => Type::i32(ccx),
+            "64" => Type::i64(ccx),
+            width => bug!("Unsupported target_c_int_width: {}", width),
+        }
     }
 
     pub fn int_from_ty(ccx: &CrateContext, t: ast::IntTy) -> Type {