@@ -12,7 +12,7 @@ set -ex
1212
1313export RUSTFLAGS=" ${RUSTFLAGS} -D warnings -Z merge-functions=disabled -Z verify-llvm-ir"
1414export HOST_RUSTFLAGS=" ${RUSTFLAGS} "
15- export PROFILE=" ${PROFILE:= " --profile= release" } "
15+ export PROFILE=" ${PROFILE:= " release" } "
1616
1717case ${TARGET} in
1818 # On Windows the linker performs identical COMDAT folding (ICF) by default
@@ -63,7 +63,7 @@ cargo_test() {
6363 if [ " $NORUN " = " 1" ]; then
6464 export subcmd=" build"
6565 fi
66- cmd=" $cmd ${subcmd} --target=$TARGET $1 "
66+ cmd=" $cmd ${subcmd} --target=$TARGET --profile= $PROFILE $1 "
6767 cmd=" $cmd -- $2 "
6868
6969 case ${TARGET} in
@@ -80,10 +80,10 @@ cargo_test() {
8080CORE_ARCH=" --manifest-path=crates/core_arch/Cargo.toml"
8181STDARCH_EXAMPLES=" --manifest-path=examples/Cargo.toml"
8282
83- cargo_test " ${CORE_ARCH} ${PROFILE} "
83+ cargo_test " ${CORE_ARCH} "
8484
8585if [ " $NOSTD " != " 1" ]; then
86- cargo_test " ${STDARCH_EXAMPLES} ${PROFILE} "
86+ cargo_test " ${STDARCH_EXAMPLES} "
8787fi
8888
8989
@@ -93,41 +93,41 @@ case ${TARGET} in
9393 export STDARCH_DISABLE_ASSERT_INSTR=1
9494
9595 export RUSTFLAGS=" ${RUSTFLAGS} -C target-feature=+avx"
96- cargo_test " ${PROFILE} "
96+ cargo_test
9797
9898 export RUSTFLAGS=" ${RUSTFLAGS} -C target-feature=+avx512f"
99- cargo_test " ${PROFILE} "
99+ cargo_test
100100 ;;
101101 x86_64* | i686* )
102102 export STDARCH_DISABLE_ASSERT_INSTR=1
103103
104104 export RUSTFLAGS=" ${RUSTFLAGS} -C target-feature=+avx"
105- cargo_test " ${PROFILE} "
105+ cargo_test
106106 ;;
107107 # FIXME: don't build anymore
108108 # mips-*gnu* | mipsel-*gnu*)
109109 # export RUSTFLAGS="${RUSTFLAGS} -C target-feature=+msa,+fp64,+mips32r5"
110- # cargo_test "${PROFILE}"
110+ # cargo_test
111111 # ;;
112112 mips64* )
113113 export RUSTFLAGS=" ${RUSTFLAGS} -C target-feature=+msa"
114- cargo_test " ${PROFILE} "
114+ cargo_test
115115 ;;
116116 s390x* )
117117 export RUSTFLAGS=" ${RUSTFLAGS} -C target-feature=+vector-enhancements-1"
118- cargo_test " ${PROFILE} "
118+ cargo_test
119119 ;;
120120 powerpc64* )
121121 export RUSTFLAGS=" ${RUSTFLAGS} -C target-feature=+altivec"
122- cargo_test " ${PROFILE} "
122+ cargo_test
123123
124124 export RUSTFLAGS=" ${RUSTFLAGS} -C target-feature=+vsx"
125- cargo_test " ${PROFILE} "
125+ cargo_test
126126 ;;
127127 powerpc* )
128128 # qemu has a bug in PPC32 which leads to a crash when compiled with `vsx`
129129 export RUSTFLAGS=" ${RUSTFLAGS} -C target-feature=+altivec"
130- cargo_test " ${PROFILE} "
130+ cargo_test
131131 ;;
132132 * )
133133 ;;
@@ -138,7 +138,7 @@ if [ "$NORUN" != "1" ] && [ "$NOSTD" != 1 ]; then
138138 # Test examples
139139 (
140140 cd examples
141- cargo test --target " $TARGET " " ${PROFILE} "
142- echo test | cargo run --target " $TARGET " " ${PROFILE} " hex
141+ cargo test --target " ${ TARGET} " --profile " ${PROFILE} "
142+ echo test | cargo run --target " ${ TARGET} " --profile " ${PROFILE} " hex
143143 )
144144fi
0 commit comments