Add LTO test

This commit is contained in:
Antoni Boucher 2025-01-12 09:36:12 -05:00
parent fe608c7639
commit 93f7f2fdeb
2 changed files with 8 additions and 0 deletions

View file

@ -71,3 +71,8 @@ jobs:
# FIXME(antoyo): we cannot enable LTO for stdarch tests currently because of some failing LTO tests using proc-macros.
echo -n 'lto = "fat"' >> build_system/build_sysroot/Cargo.toml
EMBED_LTO_BITCODE=1 ./y.sh test --release --clean --release-sysroot --build-sysroot --keep-lto-tests ${{ matrix.commands }}
- name: Run y.sh cargo build
run: |
EMBED_LTO_BITCODE=1 CHANNEL="release" ./y.sh cargo build --release --manifest-path tests/hello-world/Cargo.toml
# TODO: grep the asm output for "call my_func" and fail if it is found.

View file

@ -7,3 +7,6 @@ mylib = { path = "mylib" }
[profile.dev]
lto = "thin"
[profile.release]
lto = "fat"