Skip to content

Commit 4addb9b

Browse files
authored
Merge pull request #286 from alexcrichton/fix-dupe
Fix duplicate symbol __clzsi2
2 parents fd7d1b0 + 80a998d commit 4addb9b

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

ci/run.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ else
4242
$run --release
4343
$run --features c
4444
$run --features c --release
45+
cargo build --target $1
46+
cargo build --target $1 --release
47+
cargo build --target $1 --features c
48+
cargo build --target $1 --release --features c
4549
fi
4650

4751
PREFIX=$(echo $1 | sed -e 's/unknown-//')-
@@ -68,6 +72,10 @@ fi
6872
# Look out for duplicated symbols when we include the compiler-rt (C) implementation
6973
for rlib in $(echo $path); do
7074
set +x
75+
echo "================================================================"
76+
echo checking $rlib for duplicate symbols
77+
echo "================================================================"
78+
7179
stdout=$($PREFIX$NM -g --defined-only $rlib 2>&1)
7280

7381
# NOTE On i586, It's normal that the get_pc_thunk symbol appears several
@@ -86,6 +94,7 @@ for rlib in $(echo $path); do
8694
if test $? = 0; then
8795
exit 1
8896
fi
97+
8998
set -ex
9099
done
91100

src/float/conv.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ intrinsics! {
8383
#[use_c_shim_if(any(
8484
all(target_arch = "x86", not(target_env = "msvc")),
8585
all(target_arch = "x86_64", not(windows)),
86+
all(target_arch = "x86_64", target_env = "msvc"),
8687
))]
8788
#[arm_aeabi_alias = __aeabi_l2f]
8889
pub extern "C" fn __floatdisf(i: i64) -> f32 {

src/int/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ impl_wide_int!(u32, u64, 32);
302302
impl_wide_int!(u64, u128, 64);
303303

304304
intrinsics! {
305+
#[use_c_shim_if(/* always if C compilation is enabled */)]
305306
#[cfg(any(
306307
target_pointer_width = "16",
307308
target_pointer_width = "32",
@@ -310,7 +311,7 @@ intrinsics! {
310311
pub extern "C" fn __clzsi2(x: usize) -> usize {
311312
// TODO: const this? Would require const-if
312313
// Note(Lokathor): the `intrinsics!` macro can't process mut inputs
313-
let mut x = x;
314+
let mut x = x;
314315
let mut y: usize;
315316
let mut n: usize = {
316317
#[cfg(target_pointer_width = "64")]

0 commit comments

Comments
 (0)