Skip to content

Commit 8037b61

Browse files
authored
Merge pull request #602 from Anon258/master
Add grep check for LTO Test
2 parents b5bc832 + 638611f commit 8037b61

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/release.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,9 @@ jobs:
7676
- name: Run y.sh cargo build
7777
run: |
7878
EMBED_LTO_BITCODE=1 CHANNEL="release" ./y.sh cargo build --release --manifest-path tests/hello-world/Cargo.toml
79-
# TODO: grep the asm output for "call my_func" and fail if it is found.
79+
call_found=$(objdump -dj .text tests/hello-world/target/release/hello_world | grep -c "call .*mylib.*my_func" ) ||:
80+
if [ $call_found -gt 0 ]; then
81+
echo "ERROR: call my_func found in asm"
82+
echo "Test is done with LTO enabled, hence inlining should occur across crates"
83+
exit 1
84+
fi

0 commit comments

Comments
 (0)