[libc-commits] [libc] [libc] Add ${CMAKE_CROSSCOMPILING_EMULATOR} to custom test cmdlines (PR #66565)
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Mon Sep 18 12:13:49 PDT 2023
================
@@ -561,7 +561,7 @@ function(add_integration_test test_name)
# to expand the list (by including the option COMMAND_EXPAND_LISTS). This
# makes `add_custom_target` construct the correct command and execute it.
set(test_cmd
- ${INTEGRATION_TEST_ENV}
+ ${CMAKE_CROSSCOMPILING_EMULATOR} ${INTEGRATION_TEST_ENV}
----------------
jhuber6 wrote:
We do the following for the GPU build.
```shell
$> clang main.c --target=amdgcn-amd-amdhsa -mcpu=gfx1030 crt1.o -lc -o exe
$> ./emulator <optional arguments> exe
```
This looks very similar to cross-compiling by design. I'm thinking it would be good to unify this approach.
https://github.com/llvm/llvm-project/pull/66565
More information about the libc-commits
mailing list