Revert "Revert "[compiler-rt] Fix check for cross-compiling""

This reverts commit 18f6b05e0a5a4197bac787f5522669576c134869.

This is a reland of https://reviews.llvm.org/D132130 which I incorrectly
thought had broken the builds.

Differential Revision: https://reviews.llvm.org/D132230

GitOrigin-RevId: 5779966da82b8217ad66da890718755226fd32e7
1 file changed