[build][android] fix newer NDK version compile errors #5389
+4
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
-target already gets assigned by the clang macro it points to, overwriting it causes it to target linux instead of android, making it check for usr directories instead of the NDK's directories
this makes raylib error during compile in versions of the NDK higher than r23b citing usr/include as the problem when it shouldn't even be there
case in point:


get overwritten by
specifically -target aarch64 overwrites --target=aarch64-linux-android34 from the macro
aarch64 is a valid target by clang but it also points to linux aarch64 and not android aarch64
now the piece of mystery in all of this is, why does r23b work with no errors? and to be honest i've been trying to figure that out for 2 days straight and the only conclusion i could come up to is that it shouldn't work, yet it does.
as if the files it needed just so happened to be similar enough to the native linux libraries that it compiled just fine with no errors.
if anyone knows more please chime in, because by all accounts it doesn't make sense.