[PATCH] D128567: [WIP][Fuchsia] Set LLVM_TOOL_LLD_BUILD to allow some extra runtimes tests to run

Leonard Chan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 24 16:52:54 PDT 2022


leonardchan added a comment.

An alternative approach to this is update this bit of cmake in compiler-rt/CMakeLists.txt:

  set(COMPILER_RT_LLD_PATH ${LLVM_MAIN_SRC_DIR}/tools/lld)
  if(EXISTS ${COMPILER_RT_LLD_PATH}/ AND LLVM_TOOL_LLD_BUILD)
    set(COMPILER_RT_HAS_LLD TRUE)
  else()
    set(COMPILER_RT_LLD_PATH ${LLVM_MAIN_SRC_DIR}/../lld)
    if(EXISTS ${COMPILER_RT_LLD_PATH}/ AND LLVM_TOOL_LLD_BUILD)
      set(COMPILER_RT_HAS_LLD TRUE)
    endif()
  endif()
  
  if(ANDROID)
    set(COMPILER_RT_HAS_LLD TRUE)
    set(COMPILER_RT_TEST_USE_LLD TRUE)
    append_list_if(COMPILER_RT_HAS_FUSE_LD_LLD_FLAG -fuse-ld=lld SANITIZER_COMMON_LINK_FLAGS)
    append_list_if(COMPILER_RT_HAS_LLD -fuse-ld=lld COMPILER_RT_UNITTEST_LINK_FLAGS)
  endif()

to something like:

  set(COMPILER_RT_LLD_PATH ${LLVM_MAIN_SRC_DIR}/../lld)
  if(EXISTS ${COMPILER_RT_LLD_PATH})
    set(COMPILER_RT_HAS_LLD TRUE)
  endif()
  
  if(ANDROID)
    set(COMPILER_RT_HAS_LLD TRUE)
    set(COMPILER_RT_TEST_USE_LLD TRUE)
  endif()
  append_list_if(COMPILER_RT_HAS_FUSE_LD_LLD_FLAG -fuse-ld=lld SANITIZER_COMMON_LINK_FLAGS)
  append_list_if(COMPILER_RT_HAS_LLD -fuse-ld=lld COMPILER_RT_UNITTEST_LINK_FLAGS)

I'm thinking `LLVM_TOOL_LLD_BUILD` might be a remnant of times before the monorepo since lld doesn't exist under `llvm/tools` anymore.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128567



More information about the cfe-commits mailing list