[test] Fix checking C and C++ headers for cross-compilation by explicitly adding the sysroot and target triple #81312
+3
−0
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.
@weliveindetail noticed that these header checks when cross-compiling are incorrectly checked against the host C and C++ headers and target, so he added the cross-compilation sysroot for the C++ header check alone more than a month ago in #79185. However, that broke several C++ Interop tests when running the compiler validation suite for Android on both the Windows toolchain CI and the community Android CI on a linux host:
I experimented a bit and found that explicitly passing in the target triple fixed these tests, so this pull does that for C++ and also corrects the C header check.