[PATCH] D122931: [CMake][compiler-rt] Support for using in-tree libc++

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 17 00:48:17 PDT 2022


phosek added inline comments.
Herald added a subscriber: Enna1.


================
Comment at: compiler-rt/CMakeLists.txt:513-515
+    # Don't use libcxx if LLVM_ENABLE_PROJECTS does not enable it.
+    set(COMPILER_RT_LIBCXX_PATH ${LLVM_EXTERNAL_LIBCXX_SOURCE_DIR})
+    set(COMPILER_RT_LIBCXXABI_PATH ${LLVM_EXTERNAL_LIBCXXABI_SOURCE_DIR})
----------------
ldionne wrote:
> I'm not sure I follow here -- we don't support using `LLVM_ENABLE_PROJECTS=libcxx` anymore.
I cleaned this in D126905.


================
Comment at: compiler-rt/CMakeLists.txt:517-534
+    foreach(path IN ITEMS ${LLVM_MAIN_SRC_DIR}/projects/libcxx
+                          ${LLVM_MAIN_SRC_DIR}/runtimes/libcxx
+                          ${LLVM_MAIN_SRC_DIR}/../libcxx
+                          ${LLVM_EXTERNAL_LIBCXX_SOURCE_DIR})
+      if(IS_DIRECTORY ${path})
+        set(COMPILER_RT_LIBCXX_PATH ${path})
+        break()
----------------
ldionne wrote:
> Is there any reason why this can't be hardcoded to `${LLVM_MAIN_SRC_DIR}/.../libcxx`? Why do we need to handle the other layouts?
> 
> Edit: Oh, I see, this was only moved around. I assume you prefer making these other changes in separate patches.
I have created D126905 to clean up these flags.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122931



More information about the cfe-commits mailing list