4747 fi
4848fi
4949
50- # Remove any existing artifacts from previous tests that don't set #![compiler_builtins]
5150symcheck=(cargo run -p symbol-check)
5251[[ " $target " = " wasm" * ]] && symcheck+=(--features wasm)
5352symcheck+=(-- build-and-check)
@@ -61,61 +60,7 @@ symcheck+=(-- build-and-check)
6160" ${symcheck[@]} " -p compiler_builtins --target " $target " --features no-f16-f128
6261" ${symcheck[@]} " -p compiler_builtins --target " $target " --features no-f16-f128 --release
6362
64- # # Look out for duplicated symbols when we include the compiler-rt (C) implementation
65- # for_each_rlib "${symcheck[@]}" -- check-duplicates
66- # for_each_rlib rm -f
67-
68- # PREFIX=${target//unknown-/}-
69- # case "$target" in
70- # armv7-*)
71- # PREFIX=arm-linux-gnueabihf-
72- # ;;
73- # thumb*)
74- # PREFIX=arm-none-eabi-
75- # ;;
76- # *86*-*)
77- # PREFIX=
78- # ;;
79- # esac
80-
81- # NM=$(find "$(rustc --print sysroot)" \( -name llvm-nm -o -name llvm-nm.exe \) )
82- # if [ "$NM" = "" ]; then
83- # NM="${PREFIX}nm"
84- # fi
85-
86- # # i686-pc-windows-gnu tools have a dependency on some DLLs, so run it with
87- # # rustup run to ensure that those are in PATH.
88- # TOOLCHAIN="$(rustup show active-toolchain | sed 's/ (default)//')"
89- # if [[ "$TOOLCHAIN" == *i686-pc-windows-gnu ]]; then
90- # NM="rustup run $TOOLCHAIN $NM"
91- # fi
92-
93- # # Look out for duplicated symbols when we include the compiler-rt (C) implementation
94- # update_rlib_paths
95- # for rlib in "${rlib_paths[@]}"; do
96- # set +x
97- # echo "================================================================"
98- # echo "checking $rlib for duplicate symbols"
99- # echo "================================================================"
100- # set -x
101-
102- # duplicates_found=0
103-
104- # # NOTE On i586, It's normal that the get_pc_thunk symbol appears several
105- # # times so ignore it
106- # $NM -g --defined-only "$rlib" 2>&1 |
107- # sort |
108- # uniq -d |
109- # grep -v __x86.get_pc_thunk --quiet |
110- # grep 'T __' && duplicates_found=1
111-
112- # if [ "$duplicates_found" != 0 ]; then
113- # echo "error: found duplicate symbols"
114- # exit 1
115- # else
116- # echo "success; no duplicate symbols found"
117- # fi
118- # done
63+ # Look out for duplicated symbols when we include the compiler-rt (C) implementation
11964
12065build_intrinsics_test () {
12166 " ${symcheck[@]} " \
@@ -134,39 +79,6 @@ build_intrinsics_test --features c --release
13479CARGO_PROFILE_DEV_LTO=true build_intrinsics_test
13580CARGO_PROFILE_RELEASE_LTO=true build_intrinsics_test --release
13681
137- # for_each_rlib "${symcheck[@]}" -- check-core-syms
138-
139- # # Ensure no references to any symbols from core
140- # update_rlib_paths
141- # for rlib in "${rlib_paths[@]}"; do
142- # set +x
143- # echo "================================================================"
144- # echo "checking $rlib for references to core"
145- # echo "================================================================"
146- # set -x
147-
148- # tmpdir="${CARGO_TARGET_DIR:-target}/tmp"
149- # test -d "$tmpdir" || mkdir "$tmpdir"
150- # defined="$tmpdir/defined_symbols.txt"
151- # undefined="$tmpdir/defined_symbols.txt"
152-
153- # $NM --quiet -U "$rlib" | grep 'T _ZN4core' | awk '{print $3}' | sort | uniq > "$defined"
154- # $NM --quiet -u "$rlib" | grep 'U _ZN4core' | awk '{print $2}' | sort | uniq > "$undefined"
155- # grep_has_results=0
156- # grep -v -F -x -f "$defined" "$undefined" && grep_has_results=1
157-
158- # if [ "$target" = "powerpc64-unknown-linux-gnu" ]; then
159- # echo "FIXME: powerpc64 fails these tests"
160- # elif [ "$grep_has_results" != 0 ]; then
161- # echo "error: found unexpected references to core"
162- # exit 1
163- # else
164- # echo "success; no references to core found"
165- # fi
166- # done
167-
168-
169-
17082# Test libm
17183
17284# Make sure a simple build works
0 commit comments