From 9c8ebeb03d53ecc77281786d14cacd552dee1d6d Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Fri, 5 Dec 2014 17:25:52 +0000 Subject: [PATCH] Be less conservative about when we build the gold plugin. It is only build if LLVM_BINUTILS_INCDIR is explicitly given, so there is no point in having extra restrictions. llvm-svn: 223481 --- llvm/tools/CMakeLists.txt | 12 +----------- llvm/tools/gold/CMakeLists.txt | 6 +----- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/llvm/tools/CMakeLists.txt b/llvm/tools/CMakeLists.txt index 5905baf98138..9ea5543a0b32 100644 --- a/llvm/tools/CMakeLists.txt +++ b/llvm/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/llvm/tools/gold/CMakeLists.txt b/llvm/tools/gold/CMakeLists.txt index 303301018298..a70905c84bf0 100644 --- a/llvm/tools/gold/CMakeLists.txt +++ b/llvm/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