diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 5905baf9813..9ea5543a0b3 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -68,17 +68,7 @@ else() ignore_llvm_tool_subdirectory(llvm-lto) endif() -if( LLVM_ENABLE_PIC ) - # TODO: support other systems: - if( (CMAKE_SYSTEM_NAME STREQUAL "Linux") - OR (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") ) - add_llvm_tool_subdirectory(gold) - else() - ignore_llvm_tool_subdirectory(gold) - endif() -else() - ignore_llvm_tool_subdirectory(gold) -endif() +add_llvm_tool_subdirectory(gold) add_llvm_external_project(clang) add_llvm_external_project(llgo) diff --git a/tools/gold/CMakeLists.txt b/tools/gold/CMakeLists.txt index 30330101829..a70905c84bf 100644 --- a/tools/gold/CMakeLists.txt +++ b/tools/gold/CMakeLists.txt @@ -3,11 +3,7 @@ set(LLVM_BINUTILS_INCDIR "" CACHE PATH set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/gold.exports) -if( NOT LLVM_BINUTILS_INCDIR ) - # Nothing to say. -elseif( NOT EXISTS "${LLVM_BINUTILS_INCDIR}/plugin-api.h" ) - message(STATUS "plugin-api.h not found. gold plugin excluded from the build.") -else() +if( LLVM_ENABLE_PIC AND LLVM_BINUTILS_INCDIR ) include_directories( ${LLVM_BINUTILS_INCDIR} ) # Because off_t is used in the public API, the largefile parts are required for