Skip to content

Commit 5c8fca5

Browse files
committed
CI: Enable overflow checks for test (non-dist) builds
1 parent e015ef5 commit 5c8fca5

File tree

5 files changed

+15
-0
lines changed

5 files changed

+15
-0
lines changed

.github/workflows/ci.yml

+4
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ jobs:
293293
MACOSX_DEPLOYMENT_TARGET: 10.7
294294
NO_LLVM_ASSERTIONS: 1
295295
NO_DEBUG_ASSERTIONS: 1
296+
NO_OVERFLOW_CHECKS: 1
296297
DIST_REQUIRE_ALL_TOOLS: 1
297298
os: macos-latest
298299
- name: dist-x86_64-apple-alt
@@ -303,6 +304,7 @@ jobs:
303304
MACOSX_DEPLOYMENT_TARGET: 10.7
304305
NO_LLVM_ASSERTIONS: 1
305306
NO_DEBUG_ASSERTIONS: 1
307+
NO_OVERFLOW_CHECKS: 1
306308
os: macos-latest
307309
- name: x86_64-apple
308310
env:
@@ -313,6 +315,7 @@ jobs:
313315
MACOSX_STD_DEPLOYMENT_TARGET: 10.7
314316
NO_LLVM_ASSERTIONS: 1
315317
NO_DEBUG_ASSERTIONS: 1
318+
NO_OVERFLOW_CHECKS: 1
316319
os: macos-latest
317320
- name: dist-aarch64-apple
318321
env:
@@ -324,6 +327,7 @@ jobs:
324327
MACOSX_STD_DEPLOYMENT_TARGET: 11.0
325328
NO_LLVM_ASSERTIONS: 1
326329
NO_DEBUG_ASSERTIONS: 1
330+
NO_OVERFLOW_CHECKS: 1
327331
DIST_REQUIRE_ALL_TOOLS: 1
328332
JEMALLOC_SYS_WITH_LG_PAGE: 14
329333
os: macos-latest

src/ci/docker/host-x86_64/disabled/asmjs/Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,4 @@ ENV SCRIPT python3 ../x.py --stage 2 test --host='' --target $TARGETS
4040
# running with assertions again is not useful
4141
ENV NO_DEBUG_ASSERTIONS=1
4242
ENV NO_LLVM_ASSERTIONS=1
43+
ENV NO_OVERFLOW_CHECKS=1

src/ci/docker/host-x86_64/test-various/Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ ENV RUST_CONFIGURE_ARGS \
3939
# otherwise normally be. We already test libstd with debug assertions in lots of
4040
# other contexts as well
4141
ENV NO_DEBUG_ASSERTIONS=1
42+
ENV NO_OVERFLOW_CHECKS=1
4243

4344
ENV WASM_TARGETS=wasm32-unknown-unknown
4445
ENV WASM_SCRIPT python3 /checkout/x.py --stage 2 test --host='' --target $WASM_TARGETS \

src/ci/github-actions/ci.yml

+4
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,7 @@ jobs:
456456
MACOSX_DEPLOYMENT_TARGET: 10.7
457457
NO_LLVM_ASSERTIONS: 1
458458
NO_DEBUG_ASSERTIONS: 1
459+
NO_OVERFLOW_CHECKS: 1
459460
DIST_REQUIRE_ALL_TOOLS: 1
460461
<<: *job-macos-xl
461462

@@ -467,6 +468,7 @@ jobs:
467468
MACOSX_DEPLOYMENT_TARGET: 10.7
468469
NO_LLVM_ASSERTIONS: 1
469470
NO_DEBUG_ASSERTIONS: 1
471+
NO_OVERFLOW_CHECKS: 1
470472
<<: *job-macos-xl
471473

472474
- name: x86_64-apple
@@ -478,6 +480,7 @@ jobs:
478480
MACOSX_STD_DEPLOYMENT_TARGET: 10.7
479481
NO_LLVM_ASSERTIONS: 1
480482
NO_DEBUG_ASSERTIONS: 1
483+
NO_OVERFLOW_CHECKS: 1
481484
<<: *job-macos-xl
482485

483486
# This target only needs to support 11.0 and up as nothing else supports the hardware
@@ -499,6 +502,7 @@ jobs:
499502
MACOSX_STD_DEPLOYMENT_TARGET: 11.0
500503
NO_LLVM_ASSERTIONS: 1
501504
NO_DEBUG_ASSERTIONS: 1
505+
NO_OVERFLOW_CHECKS: 1
502506
DIST_REQUIRE_ALL_TOOLS: 1
503507
# Corresponds to 16K page size
504508
#

src/ci/run.sh

+5
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,11 @@ else
8989
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-debug-assertions"
9090
fi
9191

92+
# Same for overflow checks
93+
if [ "$NO_OVERFLOW_CHECKS" = "" ]; then
94+
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-overflow-checks"
95+
fi
96+
9297
# In general we always want to run tests with LLVM assertions enabled, but not
9398
# all platforms currently support that, so we have an option to disable.
9499
if [ "$NO_LLVM_ASSERTIONS" = "" ]; then

0 commit comments

Comments
 (0)