diff --git a/libcxx/test/CMakeLists.txt b/libcxx/test/CMakeLists.txt --- a/libcxx/test/CMakeLists.txt +++ b/libcxx/test/CMakeLists.txt @@ -83,6 +83,8 @@ "TargetInfo to use when setting up test environment.") set(LIBCXX_EXECUTOR "${Python3_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/../utils/run.py" CACHE STRING "Executor to use when running tests.") +set(LIBCXX_ADDITIONAL_CONFIG "" CACHE STRING + "Additional config to load when setting up test environment.") set(AUTO_GEN_COMMENT "## Autogenerated by libcxx configuration.\n# Do not edit!") diff --git a/libcxx/test/lit.site.cfg.in b/libcxx/test/lit.site.cfg.in --- a/libcxx/test/lit.site.cfg.in +++ b/libcxx/test/lit.site.cfg.in @@ -39,6 +39,10 @@ # Code signing config.llvm_codesign_identity = "@LLVM_CODESIGNING_IDENTITY@" +# Allow the user to inject additional config parameters at this point +if bool("@LIBCXX_ADDITIONAL_CONFIG@"): + lit_config.load_config(config, "@LIBCXX_ADDITIONAL_CONFIG@") + # Let the main config do the real work. config.loaded_site_config = True lit_config.load_config(config, "@LIBCXX_SOURCE_DIR@/test/lit.cfg")