Skip to content

Commit 923ac13

Browse files
committed
Always use Rust based intrinsics on Windows
The check inside compiler-rt file int_types.h to #define CRT_HAS_128BIT looks like: #if (defined(__LP64__) || defined(__wasm__)) && \ !(defined(__mips__) && defined(__clang__)) #define CRT_HAS_128BIT #endif Windows uses LLP64 instead of LP64, so it doesn't ship with the C based intrinsics. Also, add libcompiler_builtins to the list of crates that may have platform specific checks (like the ones we just added).
1 parent f60a7c2 commit 923ac13

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/libcompiler_builtins/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,16 @@
1717
#![crate_name = "compiler_builtins"]
1818
#![crate_type = "rlib"]
1919
#![feature(staged_api)]
20-
#![cfg_attr(any(target_pointer_width="32", target_pointer_width="16"),
20+
#![cfg_attr(any(target_pointer_width="32", target_pointer_width="16", target_os="windows",
21+
target_arch="mips64"),
2122
feature(core_intrinsics, core_float))]
2223
#![feature(associated_consts)]
2324
#![cfg_attr(not(stage0), feature(i128_type))]
2425

2526
#![allow(non_camel_case_types, unused_variables)]
2627

27-
#[cfg(any(target_pointer_width="32", target_pointer_width="16"))]
28+
#[cfg(any(target_pointer_width="32", target_pointer_width="16", target_os="windows",
29+
target_arch="mips64"))]
2830
pub mod reimpls {
2931

3032
#![allow(unused_comparisons)]

src/tools/tidy/src/pal.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
//! exceptions:
2727
//!
2828
//! - core may not have platform-specific code
29+
//! - libcompiler_builtins may have platform-specific code
2930
//! - liballoc_system may have platform-specific code
3031
//! - liballoc_jemalloc may have platform-specific code
3132
//! - libpanic_abort may have platform-specific code
@@ -53,6 +54,7 @@ const EXCEPTION_PATHS: &'static [&'static str] = &[
5354
// std crates
5455
"src/liballoc_jemalloc",
5556
"src/liballoc_system",
57+
"src/libcompiler_builtins",
5658
"src/liblibc",
5759
"src/libpanic_abort",
5860
"src/libpanic_unwind",

0 commit comments

Comments
 (0)