Fix signed integer overflow
This commit is contained in:
parent
e6024f3bf3
commit
41f5e701e6
3
.github/workflows/release.yml
vendored
3
.github/workflows/release.yml
vendored
@ -104,7 +104,8 @@ jobs:
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
./test.sh --release --clean --release-sysroot --build-sysroot --mini-tests --std-tests # --test-libcore # FIXME(antoyo): libcore tests fail.
|
||||
./test.sh --release --clean --release-sysroot --build-sysroot --mini-tests --std-tests --test-libcore
|
||||
# TODO(antoyo): also run the rustc's test suite.
|
||||
|
||||
- name: Run stdarch tests
|
||||
run: |
|
||||
|
@ -124,6 +124,8 @@ fn module_codegen(tcx: TyCtxt<'_>, (cgu_name, supports_128bit_integers): (Symbol
|
||||
context.add_command_line_option("-fno-semantic-interposition");
|
||||
// NOTE: Rust relies on LLVM not doing TBAA (https://github.com/rust-lang/unsafe-code-guidelines/issues/292).
|
||||
context.add_command_line_option("-fno-strict-aliasing");
|
||||
// NOTE: Rust relies on LLVM doing wrapping on overflow.
|
||||
context.add_command_line_option("-fwrapv");
|
||||
|
||||
if tcx.sess.opts.unstable_opts.function_sections.unwrap_or(tcx.sess.target.function_sections) {
|
||||
context.add_command_line_option("-ffunction-sections");
|
||||
|
Loading…
Reference in New Issue
Block a user