Commit 372ad327 authored by Saleem Abdulrasool's avatar Saleem Abdulrasool
Browse files

llvm-config: do not link absolute paths with `-l`

When dealing with system libraries which are absolute paths, use the
absolute path rather than the `-l` option.  This ensures that the system
library can be properly linked against.  This is needed to enable using
proper link dependencies in CMake.
parent c9c714c7
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -20,9 +20,13 @@ foreach(l ${SUPPORT_SYSTEM_LIBS} ${WINDOWSMANIFEST_SYSTEM_LIBS})
      set(SYSTEM_LIBS ${SYSTEM_LIBS} "${l}")
    else()
      # Otherwise assume it's a library name we need to link with.
      if(IS_ABSOLUTE ${l})
        set(SYSTEM_LIBS ${SYSTEM_LIBS} "${l}")
      else()
        set(SYSTEM_LIBS ${SYSTEM_LIBS} "-l${l}")
      endif()
    endif()
  endif()
endforeach()
string(REPLACE ";" " " SYSTEM_LIBS "${SYSTEM_LIBS}")