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
ifunc attribute not detected on clang++ #12413
Comments
clang++ seems to require the resolver function to have external linkage, so the test code that was used was failing even though clang does support the attribute. Closes mesonbuild#12413.
For interest more than anything else: clang++ not detecting the resolver when it is static appears to be a bug: llvm/llvm-project#54549 |
So if I understand correctly this is specifically a workaround for old versions of clang? |
Based on testing with Compiler Explorer, it looks like it's still needed even for clang 17.0.1: https://gcc.godbolt.org/z/Eefn85d9b. Presumably a future release of clang will remove the need for this workaround. |
I've just had another look at this. It turns out the clang bug was fixed in clang 15 BUT if the resolver is static it has to be marked with |
Describe the bug
compiler.has_function_attribute('ifunc')
is returning false on clang++ (e.g. with clang 14).To Reproduce
Output:
Relevant part of log:
It appears that clang++ doesn't like the resolver being declared static, even though clang (C compiler) is happy with it.
I will submit a PR to fix this.
Expected behavior
The ifunc attribute should be detected as supported.
system parameters
meson --version
: 1.2.99 (git ae7a9b0)The text was updated successfully, but these errors were encountered: