-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
fix(main/libllvm): Implement all executables named after triplets with scripts #25627
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
fix(main/libllvm): Implement all executables named after triplets with scripts #25627
Conversation
|
I think this makes sense. The issue seems to come from NDK r27 having: #if __ANDROID_API__ >= 24
int fileno_unlocked(FILE* _Nonnull __fp) __INTRODUCED_IN(24);
#endif /* __ANDROID_API__ >= 24 */while NDK r28 updates to: #if __BIONIC_AVAILABILITY_GUARD(24)
__nodiscard int fileno_unlocked(FILE* _Nonnull __fp) __INTRODUCED_IN(24);
#endif /* __BIONIC_AVAILABILITY_GUARD(24) */Where the About
When invoked through a symlink without the api level (such as In Termux we do however get #ifndef __ANDROID_API__
#define __ANDROID_API__ 24
#endifWe do not however get the more modern But we shouldn't need to define that ourself there - clang should AFAIK define both |
|
Thank you very much for writing a more detailed explanation of why the error started occurring only after the update to NDK r28c, and didn't happen with NDK r27c! I did not understand it to that level of detail, so it is very helpful. |
I assume that specifically this condition is restricted to "symlinks that contain a triplet in their name", because
Thank you for showing where this problem's root cause is inside the code of llvm! While planning this PR, I thought about trying to do that as well, and whether or not I should try to fix the problem by editing code inside llvm rather than wrapper code, but It occurred to me that implementing this change using wrappers allows users to easily customize or remove the wrapper if they need to revert to the previous behavior, while if I were to edit this inside the code of llvm before recompiling it, it would be much more difficult for users to locally revert this change if they ever have to. |
|
@licy183 I noticed now, after searching around for code that is similar to code that I'm editing in this PR, that you have implemented (from scratch by inventing Flang for Android?) the command termux-packages/scripts/build/setup/termux_setup_flang.sh Lines 70 to 74 in 210cf16
however, what I noticed is that, unlike, for example, the command Do you think that providing Unfortunately, I am very inexperienced with Fortran, so I don't know what is idiomatic for that language. |
|
There is no need to provide |
|
I was not sure at first whether this would be the best way to solve the problem, but it does appear to be and others have agreed that this makes sense, so I will merge this in 24 hours if no problems are found. At first, I was slightly worried about my implementation of but I tested building and it seemed to build |
…h scripts - Fixes termux#25622, which is an error that began occurring after the update to NDK r28c - Also makes Termux's `clang` package behave more similarly to how Termux's `TERMUX_ON_DEVICE_BUILD=false` cross-compiling toolchain behaves
bb96f11 to
9198163
Compare
|
Biswa96 recommended that the commit message should be simplified, so I have revised it accordingly. |
…header patches - Fixes termux#23401 - After termux#25627, it is believed that the custom definition of `__ANDROID_API__` is no longer needed, because: - There is no longer a way to reproduce any of the errors that it fixed before - Even if there were a way to, it would no longer be able to fix those errors by itself because of the update to NDK r28c (see termux#25622 for more details) - It is replaced with termux#25627, which does what it used to a different way that also fixes other erros and seems more reliable
…header patches - Fixes #26838 - Fixes partly #23401 - After #25627, it is believed that the custom definition of `__ANDROID_API__` is no longer needed, because: - There is no longer a way to reproduce any of the errors that it fixed before - Even if there were a way to, it would no longer be able to fix those errors by itself because of the update to NDK r28c (see #25622 for more details) - It is replaced with #25627, which does what it used to a different way that also fixes other errors and seems more reliable
…header patches - Fixes termux/termux-packages#26838 - Fixes partly termux/termux-packages#23401 - After termux/termux-packages#25627, it is believed that the custom definition of `__ANDROID_API__` is no longer needed, because: - There is no longer a way to reproduce any of the errors that it fixed before - Even if there were a way to, it would no longer be able to fix those errors by itself because of the update to NDK r28c (see termux/termux-packages#25622 for more details) - It is replaced with termux/termux-packages#25627, which does what it used to a different way that also fixes other errors and seems more reliable
- Fixes build with NDK r28c (after #25627) - No longer necessary after fixing `gnustep-make` to not put `$TERMUX_PREFIX/bin` in `$PATH` or `$TERMUX_PREFIX/lib` in `$LD_LIBRARY_PATH`
- Fixes build with NDK r28c (after termux/termux-packages#25627) - No longer necessary after fixing `gnustep-make` to not put `$TERMUX_PREFIX/bin` in `$PATH` or `$TERMUX_PREFIX/lib` in `$LD_LIBRARY_PATH`
Fixes [Bug] [NDK r28c]
$PREFIX/bin/*-clanghas different target API behavior fromclangon all architectures except for 32-bit ARM #25622, which is an error that began occurring after the update to NDK r28cAlso makes Termux's
clangpackage behave more similarly to how Termux'sTERMUX_ON_DEVICE_BUILD=falsecross-compiling toolchain behaves