This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt] [test] Allow expanding lit substitutions recursively

Authored by broadwaylamb on Jul 9 2020, 9:04 AM.



This allows using lit substitutions in the COMPILER_RT_EMULATOR variable.

The main motivation for this change is using the [ script from libc++]( as COMPILER_RT_EMULATOR to copy a test file to the remote machine and execute it there.

This script requires us to pass it the --execdir option with a path that is essentially %T. Then, in my CMake cache file I can just do:

set(COMPILER_RT_EMULATOR "\\\"${Python3_EXECUTABLE}\\\" \\\"${LLVM_PROJECT_DIR}/libcxx/utils/\\\" --execdir %%T --host ${REMOTE_TEST_USER}@${REMOTE_TEST_HOST} --" CACHE STRING "")

(For reference, the ability to expand substitutions recursively has been introduced in D76178.)

Diff Detail

Event Timeline

broadwaylamb created this revision.Jul 9 2020, 9:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 9 2020, 9:04 AM
Herald added subscribers: Restricted Project, dberris. · View Herald Transcript
compnerd accepted this revision.Jul 9 2020, 9:24 AM

Many of the other libraries (unwind, libc++, libc++abi) already configure this similarly. I think that having the same beahviour is probably better. Thanks for fixing this incongruency!

This revision is now accepted and ready to land.Jul 9 2020, 9:24 AM
This revision was automatically updated to reflect the committed changes.