Skip to content

Commit c06d16e

Browse files
committed
Revert "ci: combine and export RUSTFLAGS rather than passing inline"
This reverts commit 20b2eed.
1 parent 20b2eed commit c06d16e

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

ci/build.sh

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ test_target() {
2323
target="${2}"
2424
no_std="${3}"
2525

26-
RUSTFLAGS="${RUSTFLAGS:-}"
27-
2826
# If there is a std component, fetch it:
2927
if [ "${no_std}" != "1" ]; then
3028
# FIXME: rustup often fails to download some artifacts due to network
@@ -38,17 +36,15 @@ test_target() {
3836
n=$((n+1))
3937
sleep 1
4038
done
41-
42-
# FIXME: With `build-std` feature, `compiler_builtins` emits a lof of lint warnings.
43-
RUSTFLAGS="${RUSTFLAGS:-} -Aimproper_ctypes_definitions"
44-
export RUSTFLAGS
4539
fi
4640

4741
# Test that libc builds without any default features (no std)
4842
if [ "$no_std" != "1" ]; then
4943
cargo "+$rust" "$build_cmd" --no-default-features --target "$target"
5044
else
51-
cargo "+$rust" "$build_cmd" \
45+
# FIXME: With `build-std` feature, `compiler_builtins` emits a lof of lint warnings.
46+
RUSTFLAGS="-A improper_ctypes_definitions" \
47+
cargo "+$rust" "$build_cmd" \
5248
-Z build-std=core,alloc \
5349
--no-default-features \
5450
--target "$target"
@@ -59,7 +55,8 @@ test_target() {
5955
if [ "$no_std" != "1" ]; then
6056
cargo "+$rust" "$build_cmd" --target "$target"
6157
else
62-
cargo "+$rust" "${build_cmd}" \
58+
RUSTFLAGS="-A improper_ctypes_definitions" \
59+
cargo "+$rust" "${build_cmd}" \
6360
-Z build-std=core,alloc \
6461
--target "$target"
6562
fi
@@ -71,7 +68,8 @@ test_target() {
7168
--features extra_traits \
7269
--target "$target"
7370
else
74-
cargo "+$rust" "$build_cmd" \
71+
RUSTFLAGS="-A improper_ctypes_definitions" \
72+
cargo "+$rust" "$build_cmd" \
7573
-Z build-std=core,alloc \
7674
--no-default-features \
7775
--features extra_traits \
@@ -86,7 +84,8 @@ test_target() {
8684
--features const-extern-fn \
8785
--target "$target"
8886
else
89-
cargo "+$rust" "$build_cmd" \
87+
RUSTFLAGS="-A improper_ctypes_definitions" \
88+
cargo "+$rust" "$build_cmd" \
9089
-Z build-std=core,alloc \
9190
--no-default-features \
9291
--features const-extern-fn \
@@ -100,7 +99,8 @@ test_target() {
10099
--target "$target" \
101100
--features extra_traits
102101
else
103-
cargo "+$rust" "$build_cmd" \
102+
RUSTFLAGS="-A improper_ctypes_definitions" \
103+
cargo "+$rust" "$build_cmd" \
104104
-Z build-std=core,alloc \
105105
--target "$target" \
106106
--features extra_traits

0 commit comments

Comments
 (0)