[runtimes] Fix crosscompiling after a7cad6680b4087eff8994f1f99ac40c661a6621f (D97451)
authorRaul Tambre <raul.tambre@cleveron.com>
Wed, 3 Mar 2021 14:25:25 +0000 (16:25 +0200)
committerRaul Tambre <raul.tambre@cleveron.com>
Sat, 6 Mar 2021 09:35:14 +0000 (11:35 +0200)
commit10a7289649cfb0352f2222286920d26da22c625f
tree8e4f051c845868b0d5f358ca8941d597c75c6602
parentb42be01788fd4dd769bcd22859f8411691197e6a
[runtimes] Fix crosscompiling after a7cad6680b4087eff8994f1f99ac40c661a6621f (D97451)

It moved the logic for CMake target arguments into llvm_ExternalProject_Add().
No handling was added for CMAKE_CROSSCOMPILING, which has a separate set of compiler_args.
This broke crosscompiling, as now the runtimes builds defaulted to the compiler's default.

I've also added passing of CMAKE_ASM_COMPILER, which was missing before although we were passing the triple for it.

Reviewed By: zero9178

Differential Revision: https://reviews.llvm.org/D97855
llvm/cmake/modules/LLVMExternalProjectUtils.cmake