[llvm] [CMake] Correctly handle LLVM_ENABLE_RUNTIMES in targets (PR #69869)

via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 26 08:37:03 PDT 2023


================
@@ -171,12 +171,20 @@ if(compiler_rt_path)
   endif()
 endif()
 
+function(_get_runtime_name name out_var)
+  string(FIND ${name} "lib" idx)
+  if(idx EQUAL 0 AND NOT ${name} STREQUAL "libc")
+    string(SUBSTRING ${name} 3 -1 entry)
----------------
estewart08 wrote:

In response to the issue seen by @JDevlieghere where the cxx and cxxabi targets are not present:

I believe ```entry``` needs changed to ```name``` for the SUBSTRING on line 177.

When using ```-DLLVM_ENABLE_RUNTIMES='libcxx;libcxxabi'```, ```${name}``` is being returned from the function instead of the SUBSTRING ```${entry}```. 

With your original patch the targets remain libcxx and libcxxabi.

https://github.com/llvm/llvm-project/pull/69869


More information about the llvm-commits mailing list