-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Ensure FreeType compiles with pthreads support when necessary. #16546
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
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.
Can you modify the test_freetype
test in test_other.py. Presumably adding -sUSE_PTHREADS
to that test will cause it to fail (without this patch).
I verified the new test does fail without these changes |
tests/test_other.py
Outdated
# Verify that freetype supports compilation requiring pthreads | ||
self.emcc(test_file('freetype_test.c'), ['-sUSE_PTHREADS', '-sUSE_FREETYPE'], output_filename='a.out.js') | ||
except Exception: | ||
self.fail("Compiling freetype with pthreads enabled failed.") |
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.
You don't need the try catch. Just the one self.emcc
line is enough (and the comment).
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.
Fair enough, I amended in the fork to keep it cleaner
Actually there is one more detail we forgot to consider here. The other ports that have multi-threaded variants use an alternative name (i.e. the We have two options here I think:
The later option would keep the code simpler. If (2) works and we can pass both the theaded and non-threaded tests then I think it would be preferable. All you would need to do it simply always pass |
In my current configuration, I am unable to run the |
Maybe you didn't run |
Expects the runtime will support atomic access, even in single-threaded mode. See WebAssembly/threads#144 for more.
This solves an error similar to those discussed in #8503, in which a program which needed both pthreads and freetype was failing to compile with this error:
Making this change locally solved the issue. Solved in the same style as #8960.