Commit Graph

67 Commits

Author SHA1 Message Date
Axel Naumann
09a061dc5d Hide C and C++ symbols alike:
We had symbols exposed, which in turn meant symbols were resolved by the dynamic loader,
which in turn meant another libllvm.so could interfere with those of cling. By hiding these
symbols, all symbols are self-contained and not external symbols leak into libCling.
cling needs to resolve its own symbols, so unhide those.
2019-12-17 16:44:40 +01:00
Simeon Ehrig
9470e538f4 Adds a check to the CMakeLists.txt if the NVPTX backend is enabled 2019-11-07 19:29:15 +01:00
Axel Naumann
646ccb8b9c Enable warnings for cling, disable them for llvm. 2019-09-10 16:29:09 +02:00
Vassil Vassilev
1cb36481ba Add missing dependency. 2019-03-17 08:15:02 +01:00
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
Bertrand Bellenot
e26a6cb2df Several fixes for Windows
- cling: add missing symbol in the export list and fix semicolon issue in CMakeList.txt (it has to be in quotes)
 - cling-demo: export symbols and format hexadecimal output
2018-03-22 13:44:16 +01:00
Vassil Vassilev
911071a080 CLANG_INCLUDE_DIRS and LLVM_INCLUDE_DIRS can be lists of values.
The cmake lists are semicolon-separated strings which we fail to pass
to the colon-expecting interface.
2018-03-08 22:44:16 +01:00
Vassil Vassilev
3a5d26ebf0 Enable ROOT's builtin_llvm=Off
This patch allows ROOT to be built against compatible external llvm (5.0
or 5.0.1). Note that we still need to build clang (eg. we require
builtin_clang=On) due to the ROOT-specific patches which are not yet
upstream.

Since we have externally installed llvm, we configure and build clang as
a standalone project. The configuration relies on finding llvm-config-5.0
and uses an adapted version of the standard clang standalone build
procedure.

Clang provides dependencies such as FileCheck and not which are used by
cling's testsuite and are not being installed with the standard llvm
package.

Cling (which depends on llvm and clang) is built as a clang tool to avoid
unresolved dependencies to clang and complicating further the already
complicated cmake setup.

This patch intends a minimal change and follows the initial (suboptimal)
design to configure and build llvm, clang and cling as part of ROOT. An
ultimate solution would be to have llvm, clang and cling built as separate
standalone projects (following the recommended way by the LLVM cmake
developers).
2018-02-20 13:44:05 +01:00
Vassil Vassilev
75b9ee317f Fix typo. 2018-02-20 13:44:05 +01:00
Vassil Vassilev
0fa6cbe4f7 Use the standard cmake variables showing the include path. 2018-02-20 13:44:05 +01:00
Bertrand Bellenot
cf766f02ee Add comment for VS 2017 2017-08-29 15:21:36 +02:00
Bertrand Bellenot
5d4a7b51a7 Add support for Visual Studio 2017 2017-08-29 15:21:36 +02:00
Vassil Vassilev
b2a4fbbcf4 Configure cling from the outside. Reduces the ROOT-patches branch. 2017-06-08 10:29:13 +02:00
Frederich Munch
02d00992e0 CMake: Don’t add compiler flags as preprocessor definitions. 2017-03-09 08:29:28 +01:00
Axel Naumann
53bed3dce6 Export cling (for the JIT) and a few key functions from libCling; hide everything else. 2016-12-20 17:29:10 +01:00
Axel Naumann
a7bb139829 Whitespace. 2016-12-20 12:59:08 +01:00
Frederich Munch
f846990f8d Windows: Fix InterpreterException not being caught and terminating. 2016-12-20 12:59:08 +01:00
Frederich Munch
ce31cab80e CMake: Add clang-headers dependency. 2016-12-02 14:14:06 +01:00
Vassil Vassilev
e0c52bc29a Unbreak the builds of cling standalone. 2016-10-16 11:39:16 +02:00
Pere Mato
466279d16d Fix for ROOT-8375 - Spurious CMake warning in configure/make configuration 2016-10-14 13:42:49 +02:00
Axel Naumann
83b879cd3a Fix detection of available compilation flags. 2016-09-29 11:33:53 +02:00
Vassil Vassilev
95f07ec272 Cling standalone cmake builds on Windows require cmake 3.6.2.
We need to export symbols from cling's executable which was not possible until
the accepted in cmake patch by Bertrand.
2016-09-17 12:38:03 +02:00
Roman Zulak
3a4063090e CMake: Move Windows setting cling_include_deflt under if (CLING_INCLUDE_TESTS). 2016-09-16 10:27:58 +02:00
Roman Zulak
a2ee62913b CMake: Fix cling_include_deflt now being set to itself. 2016-09-16 10:27:58 +02:00
Danilo Piparo
8f60f8dc30 Further polish list of include paths 2016-09-15 10:20:17 +02:00
Danilo Piparo
f33ef5e6f0 Polish include path inclusion. We do not need LLVM in ROOT. 2016-09-14 18:29:38 +02:00
Danilo Piparo
b1ce4dbc1f Do not inject in the cling include paths portions of the sources
unless we are in a regime where CLING_INCLUDE_TESTS is defined.
This requires to re-balance the dictionary construction adding the
paths for the runtime universe.
2016-09-14 18:29:38 +02:00
Axel Naumann
a1ee1c31cf ROOT does not need the cling-install -I path. 2016-09-12 18:20:05 +02:00
Axel Naumann
c2736a6cc2 Help cling binary find llvm headers when part of ROOT. 2016-09-12 13:29:13 +02:00
Frederich Munch
63ead8d92e Windows: Fix CMake generation of CLING_INCLUDE_PATHS. 2016-09-09 09:29:49 +02:00
Axel Naumann
27b505e2a2 Disable some more warnings from clang. 2016-09-05 11:14:08 +02:00
Frederich Munch
ea25014f1f Add -DCLING_INCLUDE_PATHS to CMake.
This allows a user to prepend to CLING_INCLUDE_PATHS any additional include paths
they want to add on startup.

Refactor common path splitting code into Utils/Paths

Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
2016-08-18 15:44:18 +02:00
Axel Naumann
b9539a473f Install cling Jupyter kernel. 2016-07-22 19:29:12 +02:00
Axel Naumann
a758044f79 Declare dependency on tablegen-ed files.
Much better than depending on the library targets.
2016-07-19 17:59:14 +02:00
Pere Mato
809a9ad727 Better fix for ROOT-8267 2016-07-13 17:44:14 +02:00
Pere Mato
547d42919d Fix for ROOT-8267 - ROOT 6 master fails to compile if clang present in system include paths, picks up system's clang includes! 2016-07-13 14:59:39 +02:00
Axel Naumann
ec74408174 Force CMake 3.4.3 like llvm. 2016-06-18 16:44:29 +02:00
Axel Naumann
7cc8e65c90 From Bertrand (slight mods by me): fix CMake for Windows. 2016-06-15 14:14:34 +02:00
Axel Naumann
110763c786 Refresh CMakeLists.txt from clang. 2016-06-15 14:14:32 +02:00
Bertrand Bellenot
2649f0d318 Fix cling compilation errors on Windows (with VS 2015) 2016-02-23 09:29:07 +01:00
Axel Naumann
51faf8c1fd Enable doxygen target for CMake. 2016-01-05 09:14:07 +01:00
Axel Naumann
ba8e6b2834 Add install dir to cling include path; move -DCLING_VERSION.
The latter fixes CMake cling tests.
2016-01-02 20:48:01 +01:00
Pere Mato
1d1a9c185f Attempt to fix ROOT-7744 by hiding all the LLVM/clang symbols present in libCling.so. The cling symbols are left unhidden. 2015-10-30 17:09:07 +01:00
Axel Naumann
9ac315678b Fix for standalone cling build where CLANG_MAJOR is undefined (Thanks, Pere!). 2015-06-12 15:01:10 +02:00
Danilo Piparo
2441d473ec Suppress warning on apple platforms 2015-04-17 09:38:39 +02:00
Danilo Piparo
7d189c2665 Eliminate warnings for CMake builds
o All warnings which are not due to cling in 3.5
o Unused local typedefs in 3.6 (in 35 the switch is missing)
2015-03-21 12:58:59 +01:00
Bertrand Bellenot
f03fa76597 Re-introduce correct include directories search path when building standalone Cling on Windows 2014-10-02 12:40:04 +02:00
Pere Mato
052db346d8 Finish - Do not display suggestions only for ROOT. 2014-09-20 16:25:06 +02:00
Pere Mato
1330543641 Avoid copying or creating soft link of cling under llvm/src/tools. This solved the problem of soft links on Windows. 2014-09-04 17:49:17 +02:00
Philippe Canal
417dfa1c6f More <TAB> removal 2014-08-13 16:08:29 +02:00