Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[LLD][CMake] fix testing standalone build without installed llvm-lit. #138575

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jeremyd2019
Copy link
Contributor

This block was copied from clang/CMakeLists.txt.

This block was copied from clang/CMakeLists.txt.
@llvmbot llvmbot added the lld label May 5, 2025
@llvmbot
Copy link
Member

llvmbot commented May 5, 2025

@llvm/pr-subscribers-lld

Author: None (jeremyd2019)

Changes

This block was copied from clang/CMakeLists.txt.


Full diff: https://github.com/llvm/llvm-project/pull/138575.diff

1 Files Affected:

  • (modified) lld/CMakeLists.txt (+3)
diff --git a/lld/CMakeLists.txt b/lld/CMakeLists.txt
index 55d7599a447fc..9b202cc5d4899 100644
--- a/lld/CMakeLists.txt
+++ b/lld/CMakeLists.txt
@@ -63,6 +63,9 @@ if(LLD_BUILT_STANDALONE)
     if(EXISTS ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py)
       # Note: path not really used, except for checking if lit was found
       set(LLVM_EXTERNAL_LIT ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py)
+      if(EXISTS ${LLVM_MAIN_SRC_DIR}/utils/llvm-lit)
+        add_subdirectory(${LLVM_MAIN_SRC_DIR}/utils/llvm-lit utils/llvm-lit)
+      endif()
       if(NOT LLVM_UTILS_PROVIDED)
         add_subdirectory(${LLVM_MAIN_SRC_DIR}/utils/FileCheck utils/FileCheck)
         add_subdirectory(${LLVM_MAIN_SRC_DIR}/utils/not utils/not)

@jeremyd2019
Copy link
Contributor Author

requesting review from @petrhosek or @mstorsjo

Copy link
Member

@mstorsjo mstorsjo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants