about summary refs log tree commit diff
diff options
context:
space:
mode:
authorantoyo <antoyo@users.noreply.github.com>2025-01-16 09:28:45 -0500
committerGitHub <noreply@github.com>2025-01-16 09:28:45 -0500
commit8037b6139fea50894978509744f00484150e6816 (patch)
tree5eb7c28b536fb264711545c082825cf397147e05
parentb5bc832bfe2dab1dc7054d89794fb55b989144ed (diff)
parent638611f5f5ab1262f42791d9e8771d29dac6cd87 (diff)
downloadrust-8037b6139fea50894978509744f00484150e6816.tar.gz
rust-8037b6139fea50894978509744f00484150e6816.zip
Merge pull request #602 from Anon258/master
Add grep check for LTO Test
-rw-r--r--.github/workflows/release.yml7
1 files changed, 6 insertions, 1 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 77bb9056b27..886ce90b471 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -76,4 +76,9 @@ jobs:
     - 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.
+        call_found=$(objdump -dj .text tests/hello-world/target/release/hello_world | grep -c "call .*mylib.*my_func" ) ||:
+        if [ $call_found -gt 0 ]; then
+          echo "ERROR: call my_func found in asm"
+          echo "Test is done with LTO enabled, hence inlining should occur across crates"
+          exit 1
+        fi