[libcxx-commits] [PATCH] D111672: [runtimes] Properly handle the sysroot/triple/gcc-toolchain
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Oct 19 13:35:59 PDT 2021
ldionne added a comment.
In D111672#3071246 <https://reviews.llvm.org/D111672#3071246>, @phosek wrote:
> I wonder if we can deprecate `LIBCXX_TARGET_TRIPLE`, `LIBCXX_SYSROOT`, and `LIBCXX_GCC_TOOLCHAIN` (and their libc++abi and libunwind counterparts), and switch to the CMake variables instead? Do those custom variables give us anything?
I thought you added those variables for the Bootstrapping build? I'm more than happy to remove them if you don't need them.
================
Comment at: libcxx/CMakeLists.txt:279-281
+set(LIBCXX_TARGET_TRIPLE "${LIBCXX_DEFAULT_TARGET_TRIPLE}" CACHE STRING "Use alternate target triple.")
+set(LIBCXX_SYSROOT "${CMAKE_SYSROOT}" CACHE STRING "Use alternate sysroot.")
+set(LIBCXX_GCC_TOOLCHAIN "${CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN}" CACHE STRING "Use alternate GCC toolchain.")
----------------
phosek wrote:
> This changes the semantics slightly. Previously the values of `LIBCXX_TARGET_TRIPLE`, `LIBCXX_SYSROOT`, and `LIBCXX_GCC_TOOLCHAIN` wouldn't be cached, so if you changed `CMAKE_CXX_COMPILER_TARGET`, `CMAKE_SYSROOT`, or `CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN` those changes would be immediately picked. Now, you'll have to modify `LIBCXX_TARGET_TRIPLE`, `LIBCXX_SYSROOT`, and `LIBCXX_GCC_TOOLCHAIN` instead because any subsequent changes to `CMAKE_CXX_COMPILER_TARGET`, `CMAKE_SYSROOT`, or `CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN` would be ignored.
Oh, that's right. It does seem to be more consistent with that we do for other per-project setting, though.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111672/new/
https://reviews.llvm.org/D111672
More information about the libcxx-commits
mailing list