[libc-commits] [libc] [libc] Add ${CMAKE_CROSSCOMPILING_EMULATOR} to custom test cmdlines (PR #66565)

Mikhail R. Gadelha via libc-commits libc-commits at lists.llvm.org
Thu Sep 21 10:35:26 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}
----------------
mikhailramalho wrote:

I just ran some tests here and it works both ways: either you set it during the cmake config via cmd line or you can set it using `set(CMAKE_CROSSCOMPILING_EMULATOR "foobar")`.

My only concern is that it doesn't tell the user that it overwrote an argument passed via cmd line, but I guess we can always throw a warning there.

I'll update this PR to put `$CMAKE_CROSSCOMPILING_EMULATOR` right after the `$gpu_loader_exe` for now, and send all environment variables as the loader does. If you can test using only `$CMAKE_CROSSCOMPILING_EMULATOR` and it does work, we can send another PR to remove `$gpu_loader_exe` later. 

https://github.com/llvm/llvm-project/pull/66565


More information about the libc-commits mailing list