summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorPreston Gurd <preston.gurd@intel.com>2012-05-07 19:38:40 +0000
committerPreston Gurd <preston.gurd@intel.com>2012-05-07 19:38:40 +0000
commit754935418133ece1f51d1857a61d538797c34891 (patch)
tree843fa67247a5cea76767ba4b2179c5833de50ea3 /CMakeLists.txt
parente74ba3a46d1c86bb218e0d3ba5f28f986eb6e062 (diff)
downloadllvm-754935418133ece1f51d1857a61d538797c34891.tar.gz
llvm-754935418133ece1f51d1857a61d538797c34891.tar.bz2
llvm-754935418133ece1f51d1857a61d538797c34891.tar.xz
Make IntelJITEvents and OProfileJIT as optional libraries and add
optional library support to the llvm-build tool: - Add new command line parameter to llvm-build: “--enable-optional-libraries” - Add handing of new llvm-build library type “OptionalLibrary” - Update Cmake and automake build systems to pass correct flags to llvm-build based on configuration Patch by Dan Malea! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156319 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b1344565ca..9fcdd247ec 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -269,11 +269,21 @@ set(LLVMCONFIGLIBRARYDEPENDENCIESINC
"${LLVM_BINARY_DIR}/tools/llvm-config/LibraryDependencies.inc")
set(LLVMBUILDCMAKEFRAG
"${LLVM_BINARY_DIR}/LLVMBuild.cmake")
+
+# Create the list of optional components that are enabled
+if (LLVM_USE_INTEL_JITEVENTS)
+ set(LLVMOPTIONALCOMPONENTS IntelJITEvents)
+endif (LLVM_USE_INTEL_JITEVENTS)
+if (LLVM_USE_OPROFILE)
+ set(LLVMOPTIONALCOMPONENTS ${LLVMOPTIONALCOMPONENTS} OProfileJIT)
+endif (LLVM_USE_OPROFILE)
+
message(STATUS "Constructing LLVMBuild project information")
execute_process(
COMMAND ${PYTHON_EXECUTABLE} ${LLVMBUILDTOOL}
--native-target "${LLVM_NATIVE_ARCH}"
--enable-targets "${LLVM_TARGETS_TO_BUILD}"
+ --enable-optional-components "${LLVMOPTIONALCOMPONENTS}"
--write-library-table ${LLVMCONFIGLIBRARYDEPENDENCIESINC}
--write-cmake-fragment ${LLVMBUILDCMAKEFRAG}
ERROR_VARIABLE LLVMBUILDOUTPUT