Skip to content

Commit 93f7f2f

Browse files
committed
Add LTO test
1 parent fe608c7 commit 93f7f2f

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.github/workflows/release.yml

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

tests/hello-world/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ mylib = { path = "mylib" }
77

88
[profile.dev]
99
lto = "thin"
10+
11+
[profile.release]
12+
lto = "fat"

0 commit comments

Comments
 (0)