[PATCH] D144603: Add option to disable compiler launcher on external projects

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 1 00:20:54 PST 2023


phosek added a comment.

A more generic version might be to have a list of variables to (not) passthrough.

First option is to remove `{C,CXX}_COMPILER_LAUNCHER` from `_BOOTSTRAP_DEFAULT_PASSTHROUGH` and then include it as needed by setting something like `CLANG_BOOTSTRAP_EXTRA_PASSTHROUGH=C_COMPILER_LAUNCHER;CXX_COMPILER_LAUNCHER`.
Second option is to provide a way to filter out variable from passthrough, for example `CLANG_BOOTSTRAP_NO_PASSTHROUGH=C_COMPILER_LAUNCHER;CXX_COMPILER_LAUNCHER`.

I slightly prefer the first option, but it'd be a breaking change, so the second option might be the only feasible one.



================
Comment at: llvm/cmake/modules/LLVMExternalProjectUtils.cmake:305-310
+  set(C_COMPILER_LAUNCHER ${CMAKE_C_COMPILER_LAUNCHER})
+  set(CXX_COMPILER_LAUNCHER ${CMAKE_CXX_COMPILER_LAUNCHER})
+  if (LLVM_DISABLE_COMPILER_LAUNCHER_FOR_EXT_PROJECT)
+    set(C_COMPILER_LAUNCHER "")
+    set(CXX_COMPILER_LAUNCHER "")
+  endif()
----------------
I think it's better to avoid setting these at all if disabled rather than setting them to an empty string. You can just append these to `cmake_args`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144603/new/

https://reviews.llvm.org/D144603



More information about the cfe-commits mailing list