[Lldb-commits] [lldb] [lldb] Add extra logic to find llvm-nm in standalone builds (PR #227487)
Alex Langford via lldb-commits
lldb-commits at lists.llvm.org
Wed Sep 30 11:52:56 PDT 2026
================
@@ -71,6 +71,34 @@ else()
endif()
endif()
+# If llvm-nm is built but the target is not exported, we need to find it to
+# build the dynamic script interpreters.
+if (NOT LLVM_NM)
+ if (CMAKE_CROSSCOMPILING)
+ set(LLVM_NATIVE_BUILD "${LLVM_BINARY_DIR}/NATIVE")
+ if (NOT EXISTS "${LLVM_NATIVE_BUILD}")
+ message(FATAL_ERROR "Attempting to cross-compile LLDB standalone but no native LLVM build found. Please cross-compile LLVM as well.")
+ endif()
+
+ if (CMAKE_HOST_SYSTEM_NAME MATCHES "Windows")
+ set(HOST_EXECUTABLE_SUFFIX ".exe")
+ endif()
+
+ if (NOT CMAKE_CONFIGURATION_TYPES)
+ set(LLVM_NM "${LLVM_NATIVE_BUILD}/bin/llvm-nm${HOST_EXECUTABLE_SUFFIX}")
----------------
bulbazord wrote:
Yes, because find_program will also cache it.
https://github.com/llvm/llvm-project/pull/227487
More information about the lldb-commits
mailing list