Commit Graph

4723 Commits

Author SHA1 Message Date
Pratyush Das
cb6178da2b New flag --cling-branch to specify particular cling branch
Motivated by the need to clone the PR branch for CI in Github Actions.
The earlier "branch/branches" tag did not allow binaries to be created.
2020-11-02 08:14:08 +01:00
Axel Naumann
e0ec1c7f85 Force char-signedness of host. Fixes #6465. 2020-10-22 21:14:08 +02:00
Vassil Vassilev
4f26582330 Merge the build steps for msvc and unix. 2020-10-12 10:59:09 +02:00
Axel Naumann
856f8e92f8 Survive NNS not being a namespace. 2020-10-07 17:44:10 +02:00
Philippe Canal
758b053e64 cling:clad sync windows config with unix 2020-09-16 23:44:07 +02:00
Vassil Vassilev
6a98af7e48 Debug win 2020-09-16 23:44:07 +02:00
Vassil Vassilev
d35e45f431 Bump clad version to v0.7.
The new release includes some improvements:
  * Implement hessian matrices via the clad::jacobian interface.

See more at: https://github.com/vgvassilev/clad/blob/v0.7/docs/ReleaseNotes.md

This patch should be the last part of the fix for ROOT-10886.
2020-09-16 23:44:07 +02:00
Philippe Canal
8e0b7158b1 Tell clad where to find LLVM.
This is needed to fix ROOT-10886 in conjunction with
https://github.com/vgvassilev/clad/pull/170.
2020-09-11 21:14:07 +02:00
Sylvain Corlay
dcc486834b Add missing windows-include.
Fixes https://github.com/root-project/cling/issues/352
2020-09-09 09:59:06 +02:00
Axel Naumann
4203690c46 Adjust to changed clang::ExceptionSpecificationType. 2020-09-08 17:44:06 +02:00
Axel Naumann
7e6762da4f Remove statement about "policy restrictions" wrt repos (NFC);
addresses https://github.com/root-project/cling/issues/307
2020-09-02 10:29:05 +02:00
Vassil Vassilev
b88b2346c4 Fix boost_iostreams. 2020-08-24 09:29:09 +02:00
Vassil Vassilev
0c9fd59c66 Do not include all headers as submodules as some are disjoint sets.
boost_align and boost_python have umbrella header design, however we cannot
use that specifier because then it warns about all the rest of boost not being
part of the particular module.

This patch just adds align.hpp and python.hpp in the module. This may lead to
some duplicates which we will hunt down and fix if needed. The patch should fix
cmssw.
2020-08-24 09:29:09 +02:00
Vaibhav Garg
570a82c807 Fix MathCore.pcm build on Windows 2020-08-24 08:14:07 +02:00
Vassil Vassilev
547d597ebb Bump version to 0.8~dev. 2020-08-22 12:29:08 +02:00
Vassil Vassilev
70163975ee Prepare for releasing cling v0.7. 2020-08-22 11:59:07 +02:00
Bertrand Bellenot
d01c183b0f Move the workaround for latest VS2019 from rootcling_impl.cxx to CIFactory.cpp
Following the discussion [on GitHub](df0e84968a#), move back the workaround for Visual Studio 2019 v16.7.0 from `rootcling_impl.cxx` to `CIFactory.cpp`
2020-08-21 09:59:06 +02:00
Axel Naumann
dfb84fe995 Support GCC10 type name:
(std::pair<std::__strip_reference_wrapper<const char *>::__type, std::__strip_reference_wrapper<int>::__type>) { "s", 10 }
i.e. the array size is not part of the type.
2020-08-20 17:29:08 +02:00
Frederich Munch
06afb308e4 Report ValueExtractionSynthesizer errors with DiagnosticsEngine. 2020-08-20 09:44:06 +02:00
Frederich Munch
89fb4566ab Fix crash in ValueExtractionSynthesizer::FindAndCacheRuntimeDecls() and report errors. 2020-08-20 09:44:05 +02:00
Frederich Munch
1d20335456 Propagate errors and report them a bit better in ValueExtractionSynthesizer::Transform. 2020-08-20 09:44:05 +02:00
Axel Naumann
a28b92c121 clingInterpreter needs -ldl for DynamicLibraryManagerSymbol. 2020-08-19 18:44:09 +02:00
Axel Naumann
266fcb7b42 Fix warnings:
- default argument specified for lambda parameter [-Wpedantic];
- will be initialized after [-Wreorder]
2020-08-19 18:44:09 +02:00
Vassil Vassilev
843c95f0e5 Add export clauses to each top module. 2020-08-19 14:29:08 +02:00
Vassil Vassilev
a8dc21fa5a Use umbrellas for python and align. 2020-08-19 14:29:08 +02:00
Vassil Vassilev
f56d588494 Fix thread and spirit. 2020-08-19 14:29:08 +02:00
Vassil Vassilev
3a2a2995a6 Ignore dinkumware.hpp working around an operator= module mismatch 2020-08-19 14:29:07 +02:00
Enrico Guiraud
9969d52ace Do not segfault when root_hist has zero lines
Pressing ctrl-r when no ~/.root_hist file is present or possibly
when it contains 0 lines used to cause a segfault. The culprit
if an out-of-bound access in History::GetLine, as the case in which
the history has zero entries was not taken into account.

With this patch, Histoy::GetLine returns an empty string instead.
This fixes ROOT-10917.

Co-authored-by: Axel Naumann <Axel.Naumann@cern.ch>
2020-08-18 16:09:42 +02:00
Bertrand Bellenot
d0e77739a7 Fix redirection (.> blah.txt) on Windows
Fix output redirection (`.> blah.txt`) which is curently freezing the console input on Windows
When a file (or console) has been created without the `FILE_SHARE_READ | FILE_SHARE_WRITE` flags, there is no way to change this, but by closing it and re-opening it (or a new one) . And I suspect that a standard console doesn't have those flags, so when redirecting the output to a file with `.> blah.txt`, all the output is going to the file, without any echo on the console, and when typing `.>` to suppress the redirection, the file contains this kind of errors:
```
Error 6 in textinput::TerminalDisplayWin attaching to console output: The handle is invalid.

Error 6 in textinput::TerminalDisplayWin attaching / getting console info: The handle is invalid.

Error 6 in textinput::TerminalDisplayWin writing to output: The handle is invalid.
```
This patch solves those issues, even if I'm not sure if it is the root of the problem (it might be something else deep in the `MetaSema::actOnRedirectCommand` function).
NB I don't know if this can have any side effect, but I didn't see any so far...

And for info, one could Enable Console Virtual Terminal Sequences (ANSI escape code) that can control cursor movement, color/font mode, and other operations when written to the output stream by adding the ENABLE_VIRTUAL_TERMINAL_PROCESSING flag, but then it breaks the WRAP_AT_EOL_OUTPUT. With this feature, the escape sequences like `\033[39m` would work in the Windows 10 command prompt as well.
This is a known issue, see https://github.com/microsoft/terminal/issues/349
2020-08-18 16:09:42 +02:00
Philippe Canal
6c1d592420 Fix array index in assignment.
V519 The 'Line[Cursor]' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 352, 353. Editor.cpp 353
2020-08-18 16:09:42 +02:00
Vassil Vassilev
0ce064ae6f Enable the semantic global module index to boost performance.
The global module index (GMI) is an optimization which hides the introduced by
clang overhead when pre-loading the C++ modules at startup.

The GMI represents a mapping between an identifier and a set of modules which
contain this indentifier. This mean that if we TH1 is undeclared the GMI will
load all modules which contain this identifier which is usually suboptimal, too.

The semantic GMI maps identifiers only to modules which contain a definition of
the entity behind the identifier. For cases such as typedefs where the entity
introduces a synonym (rather than declaration) we map the first module we
encounter. For namespaces we add all modules which has a namespace partition.
The namespace case is still suboptimal and further improved by inspecting
what exactly is being looked up in the namespace by the qualified lookup facilities.
2020-08-13 19:44:06 +02:00
Vassil Vassilev
3769bd22cb Improve boost modulemap. 2020-08-13 19:29:08 +02:00
Vaibhav Garg
e4e18fb9b4 Teach DLM to recognise symbols in COFF Object Files.
On Windows, the .dll files contain symbol information in COFF Format
which DLM currently fails to understand properly. This leads to
unrecognized symbol errors while starting ROOT with modules.

This commit teaches DLM to correctly read symbols when the Object File
is in COFF executable format.
2020-08-13 16:59:06 +02:00
Axel Naumann
68ede76505 Remove fwddecl files; RUN: often fails. 2020-08-12 09:14:07 +02:00
Bertrand Bellenot
cf7aa69c52 Move the workaround from CIFactory.cpp to rootcling_impl.cxx 2020-08-11 12:14:07 +02:00
Bertrand Bellenot
df0e84968a Fix for Visual Studio 2019 v16.7.0
Silly workaround for rootcling not being able to parse the STL headers anymore after the update of Visual Studio to the version 16.7.0:
```
  Generating G__Core.cxx, ../bin/libCore.rootmap
  In file included from input_line_5:1:
  In file included from C:/Users/sftnight/build/release/include\Rtypes.h:191:
  In file included from C:/Users/sftnight/build/release/include/TGenericClassInfo.h:21:
  In file included from C:/Users/sftnight/build/release/include/TSchemaHelper.h:17:
  In file included from C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.291  10\\include\string:11:
  In file included from C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.291  10\\include\xstring:14:
  In file included from C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.291  10\\include\xmemory:16:
  In file included from C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.291  10\\include\xutility:15:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\\include\utility(137,9): error G08EB1F86: expected member name or ';' after declaration specifiers [C:\Users\sftnight\build\release\core\G__Core.vcxproj]
          !_Is_implicitly_default_constructible<_Uty1>::value || !_Is_implicitly_default_constructible<_Uty2>::value)
          ^
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\\include\utility(137,9): error GC66A3811: expected ')' [C:\Users\sftnight\build\release\core\G__Core.vcxproj]
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\\include\utility:136:23: note: to match this '('
      constexpr explicit(
                        ^
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\\include\utility(218,24): error G08EB1F86: expected member name or ';' after declaration specifiers [C:\Users\sftnight\build\release\core\G__Core.vcxproj]
      constexpr explicit(!is_convertible_v<const _Other1&, _Ty1> || !is_convertible_v<const _Other2&, _Ty2>)
      ~~~~~~~~~~~~~~~~~~ ^
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\\include\utility(218,24): error GC66A3811: expected ')' [C:\Users\sftnight\build\release\core\G__Core.vcxproj]
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\\include\utility:218:23: note: to match this '('
      constexpr explicit(!is_convertible_v<const _Other1&, _Ty1> || !is_convertible_v<const _Other2&, _Ty2>)
                        ^
  In file included from input_line_5:1:
  In file included from C:/Users/sftnight/build/release/include\Rtypes.h:191:
  In file included from C:/Users/sftnight/build/release/include/TGenericClassInfo.h:21:
  In file included from C:/Users/sftnight/build/release/include/TSchemaHelper.h:17:
  In file included from C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\\include\string:11:
  In file included from C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\\include\xstring:14:
  In file included from C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\\include\xmemory:16:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\\include\xutility(63,31): error G959205E0: '_To' does not refer to a value [C:\Users\sftnight\build\release\core\G__Core.vcxproj]
      return __builtin_bit_cast(_To, _Val);
                                ^
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\\include\xutility:51:17: note: declared here
  template <class _To, class _From,
                  ^
CUSTOMBUILD : error : Error loading the default header files. [C:\Users\sftnight\build\release\core\G__Core.vcxproj]
```
To be checked/removed after the upgrade of LLVM & Clang
2020-08-11 12:14:07 +02:00
Axel Naumann
33be2c79c0 Help llvm5 find ARM Mac triple. 2020-08-05 14:44:07 +02:00
Axel Naumann
722a6f6b97 Explicitly resolve symbols also from injected libs:
Some platforms respect RTLD_LOCAL: symbols from libraries loaded with
this flag cannot be resolved by dlsym through the process. They should
instead be exposed to the JIT by calling ExposeHiddenSharedLibrarySymbols().
But then the JIT needs to actually make use of these libraries from
symbol resolution. That is done by setting SearchOrder to SO_LoadedLast, as
nicely documented in that flag.

Fixes ROOT not finding libCling symbols on some platforms, e.g. CentOS7,
Ubuntu 16 and 18.
2020-08-05 14:44:07 +02:00
Vassil Vassilev
964ad807c5 Allow only the system modulemaps to be overriden by already present ones.
This patch is a workaround once again for the poor LCG design where we have
all header files (and modulemaps) installed in the same folder.
2020-08-05 11:14:09 +02:00
Axel Naumann
2d03378e96 We do not resolve clang/llvm symbols from cling:
As interpreted user code needs to match their binaries, cling
should find the same symbols as the binaries. This fixes ROOT-10499.
2020-08-04 18:14:08 +02:00
Vassil Vassilev
4b5ad54a0a Make more modules such as uuid to work.
This patch also fixes an accidental merge problem where we essentially
added the same content of the modulemap twice.
2020-07-24 11:44:08 +02:00
Vassil Vassilev
8dc9aab8fe Move more modules at top level. 2020-07-23 17:14:06 +02:00
Vassil Vassilev
c130d10139 Reduce depdendencies, move few modules out of the boost_modules_wrapper. 2020-07-23 17:14:06 +02:00
Vaibhav Garg
18f9c31d5d Fix libary path of modules for Windows
This commit fixes the library path of modules in Windows by adding the Bin directory in the list of paths. Previously, ROOT by default assumes that modules are present in the Lib directory which is not the case for Windows.
2020-07-18 23:29:07 +02:00
Vassil Vassilev
3d7672afe3 Make the modulemap more maintainable.
Reduce the headers and adapt it to boost 1.72
2020-07-18 13:44:08 +02:00
Chris Burr
3676d5c179 ROOT-10812: Fix building clad with external clang (#5945)
ROOT-10812: Fix building clad with external clang
2020-07-08 13:29:07 +02:00
Jonas Hahnfeld
f2b3a8408e IsClassOrFunction: Handle signedness modifiers
When using these modifiers, a type can consist of multiple tokens
as for example "unsigned int". However the keyword "int" can also
be omitted, making "unsigned" itself also a valid type.

Note that this only handles the most basic case for the modifiers.
The size modifiers "short", "long", and "long long" would need
similar treatment. Moreover the standard permits any order for the
type specifiers, ie "unsigned long long int" and "long int unsigned
long" are both valid (and actually the same type).
2020-07-01 22:44:08 +02:00
Vassil Vassilev
8b34a4ce85 External llvm does not have config.h
This should fix the issue when cling is built against prebuilt llvm on setups
such as conda.
2020-06-29 09:44:06 +02:00
Pratyush Das
74b99152db Fix llvm binary tarball requirement
Removed redundant is_llvm_binary_compatible() and fixed zlib prerequisite
2020-06-14 11:59:05 +02:00
Pratyush Das
be615cb351 Move declarations to fix faulty logic
llvm_vers variable required earlier for linux platform initialization
2020-06-10 12:44:04 +02:00