[PATCH] D52429: Delete out-of-tree build support of llvm-mctoll.
S Bharadwaj Yadavalli via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 24 11:35:31 PDT 2018
bharadwajy created this revision.
Herald added subscribers: llvm-commits, mgorny.
Repository:
rL LLVM
https://reviews.llvm.org/D52429
Files:
tools/llvm-mctoll/CMakeLists.txt
Index: tools/llvm-mctoll/CMakeLists.txt
===================================================================
--- tools/llvm-mctoll/CMakeLists.txt
+++ tools/llvm-mctoll/CMakeLists.txt
@@ -1,75 +1,3 @@
-# Check if llvm-mctoll is built as a standalone project.
-if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
- project(BinaryRaiser)
- cmake_minimum_required(VERSION 3.4.3)
-
- set(LLVM_MCTOLL_BUILT_STANDALONE TRUE)
-
- find_program(LLVM_CONFIG_PATH "llvm-config" DOC "Path to llvm-config binary")
- if(NOT LLVM_CONFIG_PATH)
- message(FATAL_ERROR "llvm-config not found: specify LLVM_CONFIG_PATH")
- endif()
-
- execute_process(COMMAND "${LLVM_CONFIG_PATH}"
- "--assertion-mode"
- "--obj-root"
- "--bindir"
- "--src-root"
- "--cmakedir"
- "--cxxflags"
- RESULT_VARIABLE HAD_ERROR
- OUTPUT_VARIABLE LLVM_CONFIG_OUTPUT
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(HAD_ERROR)
- message(FATAL_ERROR "llvm-config failed with status ${HAD_ERROR}")
- endif()
-
- string(REGEX REPLACE "[ \t]*[\r\n]+[ \t]*" ";" LLVM_CONFIG_OUTPUT "${LLVM_CONFIG_OUTPUT}")
-
- list(GET LLVM_CONFIG_OUTPUT 0 ENABLE_ASSERTIONS)
- list(GET LLVM_CONFIG_OUTPUT 1 OBJ_ROOT)
- list(GET LLVM_CONFIG_OUTPUT 2 TOOLS_BINARY_DIR)
- list(GET LLVM_CONFIG_OUTPUT 3 MAIN_SRC_DIR)
- list(GET LLVM_CONFIG_OUTPUT 4 LLVM_CMAKE_PATH)
- list(GET LLVM_CONFIG_OUTPUT 5 LLVM_CXX_FLAGS)
-
- if(NOT MSVC_IDE)
- set(LLVM_ENABLE_ASSERTIONS ${ENABLE_ASSERTIONS}
- CACHE BOOL "Enable assertions")
- # Assertions should follow llvm-config's.
- mark_as_advanced(LLVM_ENABLE_ASSERTIONS)
- endif()
-
- set(LLVM_OBJ_ROOT ${OBJ_ROOT} CACHE PATH "Path to LLVM build tree")
- set(LLVM_MAIN_SRC_DIR ${MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LLVM_CXX_FLAGS}")
- set(LLVM_TOOLS_BINARY_DIR ${TOOLS_BINARY_DIR} CACHE PATH "Path to llvm/bin")
- set(LLVM_EXTERNAL_LIT ${LLVM_TOOLS_BINARY_DIR}/llvm-lit CACHE PATH "Path to llvm-lit")
-
- file(TO_CMAKE_PATH ${LLVM_OBJ_ROOT} LLVM_BINARY_DIR)
-
- if(NOT EXISTS "${LLVM_CMAKE_PATH}/LLVMConfig.cmake")
- message(FATAL_ERROR "LLVMConfig.cmake not found")
- endif()
- include("${LLVM_CMAKE_PATH}/LLVMConfig.cmake")
- list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}")
-
- # They are used as destination of target generators.
- set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)
-
- option(LLVM_ENABLE_WARNINGS "Enable compiler warnings." ON)
-
- include (AddLLVM)
- include_directories(${LLVM_INCLUDE_DIRS})
-
- include(CheckLibraryExists)
- check_library_exists(xar xar_open "" HAVE_LIBXAR)
- if(HAVE_LIBXAR)
- set(XAR_LIB xar)
- endif()
-
-endif()
-
set(LLVM_MCTOLL_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(LLVM_MCTOLL_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52429.166724.patch
Type: text/x-patch
Size: 2940 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180924/8d740377/attachment.bin>
More information about the llvm-commits
mailing list