summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2016-08-20 23:38:24 +0200
committerMichał Górny <mgorny@gentoo.org>2016-08-22 17:11:49 +0200
commit4ab9c2e321dbe726cbf8083adc157d1bc63e36de (patch)
tree456cd8ab5c826d0dbb237e4a543d2599114ee7e6 /sys-devel/clang/files
parentsys-libs/compiler-rt: Add a stand-alone ebuild for compiler-rt (diff)
downloadgentoo-4ab9c2e321dbe726cbf8083adc157d1bc63e36de.tar.gz
gentoo-4ab9c2e321dbe726cbf8083adc157d1bc63e36de.tar.bz2
gentoo-4ab9c2e321dbe726cbf8083adc157d1bc63e36de.zip
sys-devel/clang: Enable stand-alone builds against sys-devel/llvm
Diffstat (limited to 'sys-devel/clang/files')
-rw-r--r--sys-devel/clang/files/9999/0001-cmake-Add-ordering-dep-between-HTML-Sphinx-docs-and-.patch27
-rw-r--r--sys-devel/clang/files/9999/0002-driver-Support-obtaining-active-toolchain-from-gcc-c.patch46
-rw-r--r--sys-devel/clang/files/9999/0003-driver-Support-checking-for-rlimits-via-cmake-when-b.patch84
-rw-r--r--sys-devel/clang/files/9999/0004-cmake-Adjust-llvm-lit-search-to-match-the-one-in-LLV.patch29
-rw-r--r--sys-devel/clang/files/9999/0005-cmake-Supporting-overriding-runtime-libdir-via-CLANG.patch86
-rw-r--r--sys-devel/clang/files/9999/0006-cmake-Add-CLANG_GOLD_LIBDIR_SUFFIX-to-specify-loc-of.patch64
-rw-r--r--sys-devel/clang/files/9999/0007-cmake-Support-stand-alone-Sphinx-doxygen-doc-build.patch64
7 files changed, 400 insertions, 0 deletions
diff --git a/sys-devel/clang/files/9999/0001-cmake-Add-ordering-dep-between-HTML-Sphinx-docs-and-.patch b/sys-devel/clang/files/9999/0001-cmake-Add-ordering-dep-between-HTML-Sphinx-docs-and-.patch
new file mode 100644
index 000000000000..35fc19da9847
--- /dev/null
+++ b/sys-devel/clang/files/9999/0001-cmake-Add-ordering-dep-between-HTML-Sphinx-docs-and-.patch
@@ -0,0 +1,27 @@
+From ec16b3f76a26a3a10b0272d012b306963fa93013 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sun, 21 Aug 2016 23:24:19 +0200
+Subject: [PATCH 1/7] cmake: Add ordering dep between HTML Sphinx docs and
+ manpages
+
+---
+ docs/CMakeLists.txt | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt
+index 13b79fdf..bd75b63 100644
+--- a/docs/CMakeLists.txt
++++ b/docs/CMakeLists.txt
+@@ -102,6 +102,9 @@ if (LLVM_ENABLE_SPHINX)
+ endif()
+ if (${SPHINX_OUTPUT_MAN})
+ add_sphinx_target(man clang)
++ if (${SPHINX_OUTPUT_HTML})
++ add_dependencies(docs-clang-html docs-clang-man)
++ endif()
+ endif()
+ endif()
+ endif()
+--
+2.9.3
+
diff --git a/sys-devel/clang/files/9999/0002-driver-Support-obtaining-active-toolchain-from-gcc-c.patch b/sys-devel/clang/files/9999/0002-driver-Support-obtaining-active-toolchain-from-gcc-c.patch
new file mode 100644
index 000000000000..6128cb938ab0
--- /dev/null
+++ b/sys-devel/clang/files/9999/0002-driver-Support-obtaining-active-toolchain-from-gcc-c.patch
@@ -0,0 +1,46 @@
+From 67025453e6c2373c8d761f6435e7fa4ddaacd8fa Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Fri, 5 Sep 2014 16:49:35 +0200
+Subject: [PATCH 2/7] driver: Support obtaining active toolchain from
+ gcc-config on Gentoo
+
+Author: Richard Yao <ryao@gentoo.org>
+Bug: https://bugs.gentoo.org/406163
+Bug: https://bugs.gentoo.org/417913
+---
+ lib/Driver/ToolChains.cpp | 19 +++++++++++++++++++
+ 1 file changed, 19 insertions(+)
+
+diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
+index 68d5214..7689f86 100644
+--- a/lib/Driver/ToolChains.cpp
++++ b/lib/Driver/ToolChains.cpp
+@@ -1418,6 +1418,25 @@ void Generic_GCC::GCCInstallationDetector::init(
+ }
+ }
+
++ for (unsigned k = 0, ke = CandidateTripleAliases.size(); k < ke; ++k) {
++ llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> File =
++ llvm::MemoryBuffer::getFile(D.SysRoot + "/etc/env.d/gcc/config-" + CandidateTripleAliases[k].str());
++ if (File)
++ {
++ const std::string VersionText = File.get()->getBuffer().rsplit('-').second.substr(0,5).str();
++ const std::string GentooPath = D.SysRoot + "/usr/lib/gcc/" + CandidateTripleAliases[k].str() + "/" + VersionText;
++ if (llvm::sys::fs::exists(GentooPath + "/crtbegin.o"))
++ {
++ Version = GCCVersion::Parse(VersionText);
++ GCCInstallPath = GentooPath;
++ GCCParentLibPath = GCCInstallPath + "/../../..";
++ GCCTriple.setTriple(CandidateTripleAliases[k]);
++ IsValid = true;
++ return;
++ }
++ }
++ }
++
+ // Loop over the various components which exist and select the best GCC
+ // installation available. GCC installs are ranked by version number.
+ Version = GCCVersion::Parse("0.0.0");
+--
+2.9.3
+
diff --git a/sys-devel/clang/files/9999/0003-driver-Support-checking-for-rlimits-via-cmake-when-b.patch b/sys-devel/clang/files/9999/0003-driver-Support-checking-for-rlimits-via-cmake-when-b.patch
new file mode 100644
index 000000000000..16d63ec7f61c
--- /dev/null
+++ b/sys-devel/clang/files/9999/0003-driver-Support-checking-for-rlimits-via-cmake-when-b.patch
@@ -0,0 +1,84 @@
+From 27b65490c9764d18fa02274bbb4f75dd5a688506 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sun, 21 Aug 2016 23:30:17 +0200
+Subject: [PATCH 3/7] driver: Support checking for rlimits via cmake (when
+ bootstrapping)
+
+Add a cmake check for sys/resource.h and replace the __has_include()
+check with its result, in order to make it possible to use rlimits when
+building with compilers not supporting __has_include() -- i.e. when
+bootstrapping.
+
+Patch: https://reviews.llvm.org/D23744
+---
+ CMakeLists.txt | 3 +++
+ include/clang/Config/config.h.cmake | 3 +++
+ tools/driver/cc1_main.cpp | 8 +++-----
+ 3 files changed, 9 insertions(+), 5 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e6dde85..aee0d0a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -177,6 +177,9 @@ if (LIBXML2_FOUND)
+ set(CLANG_HAVE_LIBXML 1)
+ endif()
+
++include(CheckIncludeFile)
++check_include_file(sys/resource.h CLANG_HAVE_RLIMITS)
++
+ set(CLANG_RESOURCE_DIR "" CACHE STRING
+ "Relative directory from the Clang binary to its resource files.")
+
+diff --git a/include/clang/Config/config.h.cmake b/include/clang/Config/config.h.cmake
+index 9200ed9..9bf9ea5 100644
+--- a/include/clang/Config/config.h.cmake
++++ b/include/clang/Config/config.h.cmake
+@@ -35,6 +35,9 @@
+ /* Define if we have libxml2 */
+ #cmakedefine CLANG_HAVE_LIBXML ${CLANG_HAVE_LIBXML}
+
++/* Define if we have sys/resource.h (rlimits) */
++#cmakedefine CLANG_HAVE_RLIMITS ${CLANG_HAVE_RLIMITS}
++
+ /* The LLVM product name and version */
+ #define BACKEND_PACKAGE_STRING "${BACKEND_PACKAGE_STRING}"
+
+diff --git a/tools/driver/cc1_main.cpp b/tools/driver/cc1_main.cpp
+index b8cea41..45d44a0 100644
+--- a/tools/driver/cc1_main.cpp
++++ b/tools/driver/cc1_main.cpp
+@@ -15,6 +15,7 @@
+
+ #include "llvm/Option/Arg.h"
+ #include "clang/CodeGen/ObjectFilePCHContainerOperations.h"
++#include "clang/Config/config.h"
+ #include "clang/Driver/DriverDiagnostic.h"
+ #include "clang/Driver/Options.h"
+ #include "clang/Frontend/CompilerInstance.h"
+@@ -37,12 +38,9 @@
+ #include "llvm/Support/raw_ostream.h"
+ #include <cstdio>
+
+-#ifdef __has_include
+-#if __has_include(<sys/resource.h>)
+-#define HAVE_RLIMITS
++#ifdef CLANG_HAVE_RLIMITS
+ #include <sys/resource.h>
+ #endif
+-#endif
+
+ using namespace clang;
+ using namespace llvm::opt;
+@@ -73,7 +71,7 @@ void initializePollyPasses(llvm::PassRegistry &Registry);
+ }
+ #endif
+
+-#ifdef HAVE_RLIMITS
++#ifdef CLANG_HAVE_RLIMITS
+ // The amount of stack we think is "sufficient". If less than this much is
+ // available, we may be unable to reach our template instantiation depth
+ // limit and other similar limits.
+--
+2.9.3
+
diff --git a/sys-devel/clang/files/9999/0004-cmake-Adjust-llvm-lit-search-to-match-the-one-in-LLV.patch b/sys-devel/clang/files/9999/0004-cmake-Adjust-llvm-lit-search-to-match-the-one-in-LLV.patch
new file mode 100644
index 000000000000..bcf409c71b67
--- /dev/null
+++ b/sys-devel/clang/files/9999/0004-cmake-Adjust-llvm-lit-search-to-match-the-one-in-LLV.patch
@@ -0,0 +1,29 @@
+From d7bc0e05e8064e0c939db6c2fb6d215fd0340708 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sun, 21 Aug 2016 23:30:39 +0200
+Subject: [PATCH 4/7] cmake: Adjust llvm-lit search to match the one in LLVM
+
+Adjust the system lit executable search to look for llvm-lit as that is
+the name used in AddLLVM.cmake installed by LLVM.
+
+Patch: https://reviews.llvm.org/D23745
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index aee0d0a..e95ab52 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -140,7 +140,7 @@ Please install Python or specify the PYTHON_EXECUTABLE CMake variable.")
+ endif()
+ else()
+ # Seek installed Lit.
+- find_program(LLVM_LIT "lit.py" ${LLVM_MAIN_SRC_DIR}/utils/lit
++ find_program(LLVM_LIT "llvm-lit" ${LLVM_MAIN_SRC_DIR}/utils/lit
+ DOC "Path to lit.py")
+ endif()
+
+--
+2.9.3
+
diff --git a/sys-devel/clang/files/9999/0005-cmake-Supporting-overriding-runtime-libdir-via-CLANG.patch b/sys-devel/clang/files/9999/0005-cmake-Supporting-overriding-runtime-libdir-via-CLANG.patch
new file mode 100644
index 000000000000..da737c19811e
--- /dev/null
+++ b/sys-devel/clang/files/9999/0005-cmake-Supporting-overriding-runtime-libdir-via-CLANG.patch
@@ -0,0 +1,86 @@
+From 8864d8f9da1b30c9539e9dc0388c5d0dccca3a34 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sun, 21 Aug 2016 23:31:06 +0200
+Subject: [PATCH 5/7] cmake: Supporting overriding runtime libdir via
+ CLANG_LIBDIR_SUFFIX
+
+Make it possible to override the value of CLANG_LIBDIR_SUFFIX, and use
+it uniformly to control install location of runtimes (i.e. lib/clang),
+therefore supporting sharing a common runtime between multiple multilib
+variants.
+
+Previously, CLANG_LIBDIR_SUFFIX was pinned to LLVM_LIBDIR_SUFFIX
+and used only to define runtime path in driver code. This patch extends
+its use to building and installing the runtime (the former is needed for
+tests to work correctly).
+
+The goal is to support install layout alike "LLVM_LIBDIR_SUFFIX=64
+CLANG_LIBDIR_SUFFIX=''" -- where all shared libraries would be installed
+into ABI-specific /usr/lib64, while runtime (that is common between
+multilib ABIs) would be installed into /usr/lib.
+
+Bug: https://llvm.org/bugs/show_bug.cgi?id=23792
+Patch: https://reviews.llvm.org/D23752
+---
+ CMakeLists.txt | 5 +++--
+ lib/Headers/CMakeLists.txt | 4 ++--
+ runtime/CMakeLists.txt | 4 ++--
+ 3 files changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e95ab52..67b85b5 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -235,8 +235,9 @@ endif()
+ set(CLANG_VENDOR_UTI "org.llvm.clang" CACHE STRING
+ "Vendor-specific uti.")
+
+-# The libdir suffix must exactly match whatever LLVM's configuration used.
+-set(CLANG_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX}")
++set(CLANG_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX}" CACHE
++ STRING "Define suffix of library directory name for clang runtime (32/64)")
++set(CLANG_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${CLANG_LIBDIR_SUFFIX})
+
+ set(CLANG_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+ set(CLANG_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
+diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt
+index 600fece..86a70c5 100644
+--- a/lib/Headers/CMakeLists.txt
++++ b/lib/Headers/CMakeLists.txt
+@@ -88,7 +88,7 @@ set(files
+ xtestintrin.h
+ )
+
+-set(output_dir ${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION}/include)
++set(output_dir ${CLANG_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION}/include)
+
+ # Generate arm_neon.h
+ clang_tablegen(arm_neon.h -gen-arm-neon
+@@ -118,7 +118,7 @@ install(
+ FILES ${files} ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h
+ COMPONENT clang-headers
+ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+- DESTINATION lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
++ DESTINATION lib${CLANG_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
+
+ if (NOT CMAKE_CONFIGURATION_TYPES) # don't add this for IDE's.
+ add_custom_target(install-clang-headers
+diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt
+index 814857f..9348615 100644
+--- a/runtime/CMakeLists.txt
++++ b/runtime/CMakeLists.txt
+@@ -71,9 +71,9 @@ if(LLVM_BUILD_EXTERNAL_COMPILER_RT AND EXISTS ${COMPILER_RT_SRC_ROOT}/)
+ -DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
+ -DLLVM_CONFIG_PATH=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-config
+ -DLLVM_LIT_ARGS=${LLVM_LIT_ARGS}
+- -DCOMPILER_RT_OUTPUT_DIR=${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION}
++ -DCOMPILER_RT_OUTPUT_DIR=${CLANG_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION}
+ -DCOMPILER_RT_EXEC_OUTPUT_DIR=${LLVM_RUNTIME_OUTPUT_INTDIR}
+- -DCOMPILER_RT_INSTALL_PATH:STRING=lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}
++ -DCOMPILER_RT_INSTALL_PATH:STRING=lib${CLANG_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}
+ -DCOMPILER_RT_INCLUDE_TESTS=${LLVM_INCLUDE_TESTS}
+ -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
+ -DLLVM_LIBDIR_SUFFIX=${LLVM_LIBDIR_SUFFIX}
+--
+2.9.3
+
diff --git a/sys-devel/clang/files/9999/0006-cmake-Add-CLANG_GOLD_LIBDIR_SUFFIX-to-specify-loc-of.patch b/sys-devel/clang/files/9999/0006-cmake-Add-CLANG_GOLD_LIBDIR_SUFFIX-to-specify-loc-of.patch
new file mode 100644
index 000000000000..18adcca8bad0
--- /dev/null
+++ b/sys-devel/clang/files/9999/0006-cmake-Add-CLANG_GOLD_LIBDIR_SUFFIX-to-specify-loc-of.patch
@@ -0,0 +1,64 @@
+From cf60af04f0ac2836f50d5a042acc89ef76e76a66 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sun, 21 Aug 2016 23:31:28 +0200
+Subject: [PATCH 6/7] cmake: Add CLANG_GOLD_LIBDIR_SUFFIX to specify loc of
+ LLVMgold.so
+
+Add CLANG_GOLD_LIBDIR_SUFFIX that defaults to ${LLVM_LIBDIR_SUFFIX}
+and can be overriden if LLVMgold.so is installed elsewhere. The use case
+are multilib systems where binutils is 64-bit and clang is 32-bit,
+therefore the gold plugin is installed in 64-bit libdir while clang
+is not.
+
+Bug: https://llvm.org/bugs/show_bug.cgi?id=23793
+Patch: https://reviews.llvm.org/D23754
+---
+ CMakeLists.txt | 3 +++
+ include/clang/Config/config.h.cmake | 3 +++
+ lib/Driver/Tools.cpp | 2 +-
+ 3 files changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 67b85b5..8ed8c10 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -239,6 +239,9 @@ set(CLANG_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX}" CACHE
+ STRING "Define suffix of library directory name for clang runtime (32/64)")
+ set(CLANG_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${CLANG_LIBDIR_SUFFIX})
+
++set(CLANG_GOLD_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX}" CACHE
++ STRING "Define suffix of library directory name that contains LLVMgold.so (32/64)")
++
+ set(CLANG_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+ set(CLANG_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
+
+diff --git a/include/clang/Config/config.h.cmake b/include/clang/Config/config.h.cmake
+index 9bf9ea5..26e0e7e 100644
+--- a/include/clang/Config/config.h.cmake
++++ b/include/clang/Config/config.h.cmake
+@@ -20,6 +20,9 @@
+ /* Multilib suffix for libdir. */
+ #define CLANG_LIBDIR_SUFFIX "${CLANG_LIBDIR_SUFFIX}"
+
++/* Multilib suffix for libdir containing LLVMgold.so. */
++#define CLANG_GOLD_LIBDIR_SUFFIX "${CLANG_GOLD_LIBDIR_SUFFIX}"
++
+ /* Relative directory for resource files */
+ #define CLANG_RESOURCE_DIR "${CLANG_RESOURCE_DIR}"
+
+diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
+index a814df3..333a2e9 100644
+--- a/lib/Driver/Tools.cpp
++++ b/lib/Driver/Tools.cpp
+@@ -2007,7 +2007,7 @@ static void AddGoldPlugin(const ToolChain &ToolChain, const ArgList &Args,
+ // forward.
+ CmdArgs.push_back("-plugin");
+ std::string Plugin =
+- ToolChain.getDriver().Dir + "/../lib" CLANG_LIBDIR_SUFFIX "/LLVMgold.so";
++ ToolChain.getDriver().Dir + "/../lib" CLANG_GOLD_LIBDIR_SUFFIX "/LLVMgold.so";
+ CmdArgs.push_back(Args.MakeArgString(Plugin));
+
+ // Try to pass driver level flags relevant to LTO code generation down to
+--
+2.9.3
+
diff --git a/sys-devel/clang/files/9999/0007-cmake-Support-stand-alone-Sphinx-doxygen-doc-build.patch b/sys-devel/clang/files/9999/0007-cmake-Support-stand-alone-Sphinx-doxygen-doc-build.patch
new file mode 100644
index 000000000000..0ecd5bc0e8c1
--- /dev/null
+++ b/sys-devel/clang/files/9999/0007-cmake-Support-stand-alone-Sphinx-doxygen-doc-build.patch
@@ -0,0 +1,64 @@
+From 8dd12df445c9a35f7b1c0202eb7c74b954b0980d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sun, 21 Aug 2016 23:31:55 +0200
+Subject: [PATCH 7/7] cmake: Support stand-alone Sphinx & doxygen doc build
+
+Copy the necessary options and configuration checks from LLVM to clang,
+to support stand-alone documentation builds.
+
+Patch: https://reviews.llvm.org/D23758
+---
+ CMakeLists.txt | 37 +++++++++++++++++++++++++++++++++++++
+ 1 file changed, 37 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8ed8c10..3f34d8c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -162,6 +162,43 @@ Please install Python or specify the PYTHON_EXECUTABLE CMake variable.")
+ endif()
+ endif()
+
++ option (LLVM_BUILD_DOCS "Build the llvm documentation." OFF)
++ option (LLVM_INCLUDE_DOCS "Generate build targets for llvm documentation." ON)
++ option (LLVM_ENABLE_DOXYGEN "Use doxygen to generate llvm API documentation." OFF)
++ option (LLVM_ENABLE_SPHINX "Use Sphinx to generate llvm documentation." OFF)
++
++ if (LLVM_ENABLE_DOXYGEN)
++ message(STATUS "Doxygen enabled.")
++ find_package(Doxygen REQUIRED)
++
++ if (DOXYGEN_FOUND)
++ # If we find doxygen and we want to enable doxygen by default create a
++ # global aggregate doxygen target for generating llvm and any/all
++ # subprojects doxygen documentation.
++ if (LLVM_BUILD_DOCS)
++ add_custom_target(doxygen ALL)
++ endif()
++
++ option(LLVM_DOXYGEN_EXTERNAL_SEARCH "Enable doxygen external search." OFF)
++ if (LLVM_DOXYGEN_EXTERNAL_SEARCH)
++ set(LLVM_DOXYGEN_SEARCHENGINE_URL "" CACHE STRING "URL to use for external search.")
++ set(LLVM_DOXYGEN_SEARCH_MAPPINGS "" CACHE STRING "Doxygen Search Mappings")
++ endif()
++ endif()
++ else()
++ message(STATUS "Doxygen disabled.")
++ endif()
++
++ if (LLVM_ENABLE_SPHINX)
++ message(STATUS "Sphinx enabled.")
++ find_package(Sphinx REQUIRED)
++ if (LLVM_BUILD_DOCS)
++ add_custom_target(sphinx ALL)
++ endif()
++ else()
++ message(STATUS "Sphinx disabled.")
++ endif()
++
+ set( CLANG_BUILT_STANDALONE 1 )
+ set(BACKEND_PACKAGE_STRING "LLVM ${LLVM_PACKAGE_VERSION}")
+ else()
+--
+2.9.3
+