Skip to content
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

Exclude scalbnf.c from LTO #20215

Merged
merged 1 commit into from
Sep 8, 2023
Merged

Exclude scalbnf.c from LTO #20215

merged 1 commit into from
Sep 8, 2023

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Sep 8, 2023

Continuation of #15497

Fixes: #19781

@sbc100 sbc100 requested a review from kripken September 8, 2023 20:02
@@ -34,6 +34,7 @@ int test_builtins() {
TEST(fmin)
TEST(fmod)
TEST(scalbn)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scalbn was already in this test it seems, so I was wondering why didn't we see an error before, and looks like we don't run the test in LTO mode. Maybe we should add a variation on the test for that?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do run the entire lto2 test suite on the emscripten-releases builder.

But I will add this specific test to the github CI too.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lto2.test_float_builtins passes fine on main .. so I guess its not enough to just reference scaldnf. This is why the repo cases requires ldexp.. I'm not 100% why this is.. but something to do with the fact the symbol gets indirectly pulled in...

@@ -34,6 +34,7 @@ int test_builtins() {
TEST(fmin)
TEST(fmod)
TEST(scalbn)
TEST(ldexp)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why add ldexp in this PR specifically?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because that is reproducer of this the failure. See #19781 (comment)

@akien-mga
Copy link

akien-mga commented Sep 8, 2023

Note also the reports on #16836 (comment) - there seems to be a number of other symbols which might need similar treatment (from the recent comments, fileno, htons, ntohs).

@sbc100
Copy link
Collaborator Author

sbc100 commented Sep 8, 2023

Note also the reports on #16836 (comment) - there seems to be a number of other symbols which might need similar treatment (from the recent comments, fileno, htons, ntohs).

Indeed, I just like to find repro cases for them so we have test coverage. If you have a program that fails with any of those that would be very useful.

Continuation of #15497

Fixes: #19781
@sbc100 sbc100 enabled auto-merge (squash) September 8, 2023 21:36
@sbc100 sbc100 merged commit 4d27fc8 into main Sep 8, 2023
@sbc100 sbc100 deleted the scalbnf branch September 8, 2023 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Undefined scalbnf after switching to new emsdk 3.1.42
3 participants