From 93f7f2fdeba33c748cbda750cdbaa2c80bb34be1 Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Sun, 12 Jan 2025 09:36:12 -0500 Subject: [PATCH] Add LTO test --- .github/workflows/release.yml | 5 +++++ tests/hello-world/Cargo.toml | 3 +++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 887720436e99..f1ddb301acce 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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. diff --git a/tests/hello-world/Cargo.toml b/tests/hello-world/Cargo.toml index f73beedccced..c6e22f642f67 100644 --- a/tests/hello-world/Cargo.toml +++ b/tests/hello-world/Cargo.toml @@ -7,3 +7,6 @@ mylib = { path = "mylib" } [profile.dev] lto = "thin" + +[profile.release] +lto = "fat"