[llvm] r223481 - Be less conservative about when we build the gold plugin.

Rafael Espindola rafael.espindola at gmail.com
Fri Dec 5 09:25:52 PST 2014


Author: rafael
Date: Fri Dec  5 11:25:52 2014
New Revision: 223481

URL: http://llvm.org/viewvc/llvm-project?rev=223481&view=rev
Log:
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.

Modified:
    llvm/trunk/tools/CMakeLists.txt
    llvm/trunk/tools/gold/CMakeLists.txt

Modified: llvm/trunk/tools/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/CMakeLists.txt?rev=223481&r1=223480&r2=223481&view=diff
==============================================================================
--- llvm/trunk/tools/CMakeLists.txt (original)
+++ llvm/trunk/tools/CMakeLists.txt Fri Dec  5 11:25:52 2014
@@ -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)

Modified: llvm/trunk/tools/gold/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/gold/CMakeLists.txt?rev=223481&r1=223480&r2=223481&view=diff
==============================================================================
--- llvm/trunk/tools/gold/CMakeLists.txt (original)
+++ llvm/trunk/tools/gold/CMakeLists.txt Fri Dec  5 11:25:52 2014
@@ -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





More information about the llvm-commits mailing list