-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Grep check for LTO Test #600
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Here are a few suggestions.
.github/workflows/release.yml
Outdated
# TODO: grep the asm output for "call my_func" and fail if it is found. | ||
asm=$(objdump -dj .text tests/hello-world/target/release/hello_world) | ||
if echo asm | grep -q "call .*mylib.*my_func" ; then | ||
echo "call my_func found in asm" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add in this string something saying that it should not be found because LTO should have removed it and that this tests LTO.
.github/workflows/release.yml
Outdated
asm=$(objdump -dj .text tests/hello-world/target/release/hello_world) | ||
if echo asm | grep -q "call .*mylib.*my_func" ; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably more efficient to do:
asm=$(objdump -dj .text tests/hello-world/target/release/hello_world) | |
if echo asm | grep -q "call .*mylib.*my_func" ; then | |
call_found=$(objdump -dj .text tests/hello-world/target/release/hello_world | grep -q "call .*mylib.*my_func") | |
if call_found then |
.github/workflows/release.yml
Outdated
else | ||
echo "success" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to print this.
else | |
echo "success" |
Fixes #591