Commit Graph

17 Commits

Author SHA1 Message Date
Vassil Vassilev
6c74a386ba Enable ROOT to be built with prebuilt clang and llvm.
To do so one needs to pass -Dbuiltin_llvm=Off -Dbuiltin_clang=Off and the
PATH should contain the path to llvm-config.

Note this is not enabling ROOT to work with vanilla clang!

This patch allows ROOT to be built against a prebuilt clang and llvm from
https://root.cern.ch/git/{llvm.git,clang.git}. It allows to reduce ROOT's
build times (in cases when cmake decides to rebuild the in-tree llvm for
no good reason). It moves the common denominator of different ROOT builds
in one place to save space. It also allows easy switch between LLVM in
debug and release mode.

To build the external clang and llvm exactly in the same way as the
in-tree builds use:

CMAKE_FLAGS="\
            -DLLVM_ENABLE_WARNINGS=OFF                   \
            -DLLVM_INCLUDE_TESTS=OFF                     \
            -DCLANG_INCLUDE_TESTS=OFF                    \
            -DLLVM_INCLUDE_EXAMPLES=OFF                  \
            -DCLANG_BUILD_TOOLS=OFF                      \
            -DCLANG_TOOL_ARCMT_TEST_BUILD=OFF            \
            -DCLANG_TOOL_CLANG_CHECK_BUILD=OFF           \
            -DCLANG_TOOL_CLANG_FORMAT_BUILD=OFF          \
            -DCLANG_TOOL_CLANG_FORMAT_VS_BUILD=OFF       \
            -DCLANG_TOOL_CLANG_FUZZER_BUILD=OFF          \
            -DCLANG_TOOL_CLANG_IMPORT_TEST_BUILD=OFF     \
            -DCLANG_TOOL_CLANG_OFFLOAD_BUNDLER_BUILD=OFF \
            -DCLANG_TOOL_CLANG_RENAME_BUILD=OFF          \
            -DCLANG_TOOL_C_ARCMT_TEST_BUILD=OFF          \
            -DCLANG_TOOL_C_INDEX_TEST_BUILD=OFF          \
            -DCLANG_TOOL_DIAGTOOL_BUILD=OFF              \
            -DCLANG_TOOL_LIBCLANG_BUILD=OFF              \
            -DCLANG_TOOL_SCAN_BUILD_BUILD=OFF            \
            -DCLANG_TOOL_SCAN_VIEW_BUILD=OFF             \
            -DLLVM_BUILD_TOOLS=OFF                       \
            -DLLVM_TOOL_LLVM_AR_BUILD=OFF                \
            -DCLANG_TOOL_CLANG_OFFLOAD_BUNDLER_BUILD=OFF \
            -DLLVM_FORCE_USE_OLD_TOOLCHAIN=ON            \
            -DCLANG_ENABLE_STATIC_ANALYZER=OFF           \
            -DCLANG_ENABLE_ARCMT=OFF                     \
            -DCLANG_ENABLE_FORMAT=OFF                    \
            -DLLVM_TARGETS_TO_BUILD=host                 \
            -DLLVM_ABI_BREAKING_CHECKS=FORCE_OFF         \
            -DLLVM_ENABLE_ABI_BREAKING_CHECKS=OFF        \
            -DCMAKE_INSTALL_PREFIX=..                    \
            -DCMAKE_BUILD_TYPE=Debug"

cmake "$CMAKE_FLAGS"   ../../../sources/root-llvm/
2018-03-28 19:29:10 +02:00
Simeon Ehrig
83e3eafc44 fix CMakeFiles to allow cling build with shared libraries 2018-03-22 15:59:06 +01:00
Frederich Munch
f846990f8d Windows: Fix InterpreterException not being caught and terminating. 2016-12-20 12:59:08 +01:00
Frederich Munch
4427d1a5c2 Have .> cmd expand env-vars. Fixes OutputRedirect test on Windows. 2016-12-14 09:29:10 +01:00
Pere Mato
bd5d32f9e5 Fix for ROOT-8392 - CMake missing dependency 2016-10-12 12:59:44 +02:00
Axel Naumann
39dd90e183 Use LLVM_LINK_COMPONENTS; add_dependencies superseded by cling/CMakeLists.txt depending on tablegen-ed files. Cleanup linked libs. 2016-07-19 17:59:14 +02:00
Frederich Munch
a054b253d8 Fix CMake projects to link to proper libraries when built as shared library. 2016-07-19 17:59:14 +02:00
Axel Naumann
2e08275916 Build libcling.so based on OBJECT "library" in CMake. 2016-07-19 10:59:32 +02:00
Axel Naumann
c3fb3857ea Try to fix dependency clingMetaProcessor -> LLVMCore. 2016-06-15 14:14:33 +02:00
Axel Naumann
2023eac193 Put LINK_LIBS back, they are used by ROOT. 2015-12-16 20:29:22 +01:00
Axel Naumann
6eac3e3159 Define dependencies! 2015-12-16 20:29:22 +01:00
Axel Naumann
d7ca5b7759 Use new libdep syntax; parameterize target libs to link. 2014-03-08 18:47:09 +01:00
Bertrand Bellenot
c70ddac80a Silent compilation warnings on Windows 2014-02-19 14:55:00 +01:00
Axel Naumann
8aedeca69c Refer to license in CMake files. 2014-01-07 12:02:58 +01:00
Vassil Vassilev
68020403d7 Update cmake to compile the newly added files
git-svn-id: http://root.cern.ch/svn/root/trunk@47812 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-04 10:41:56 +00:00
Timur Pocheptsov
4e1cc75fda Remove TCintDisplayClass from the core/meta, fix MetaProcessor.cpp (wrong include path)
git-svn-id: http://root.cern.ch/svn/root/trunk@47677 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-28 16:50:13 +00:00
Axel Naumann
05ba8a3a07 Move cling from cint/ to interpreter/ (Will add a "we have moved" readme to cint/cling.)
git-svn-id: http://root.cern.ch/svn/root/trunk@45844 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-05 09:37:39 +00:00