Commit Graph

5249 Commits

Author SHA1 Message Date
b7313fd57f Writing spec process 2024-10-11 18:18:12 +03:00
Vassil Vassilev
b5e06a2a7b Prepare for releasing cling v1.1 2024-08-28 09:44:03 +02:00
Jonas Hahnfeld
a6f2255dc7 Fix lifetime of ClingMMapper
The ClingMMapper must remain available until all ClingMemoryManagers
are destructed, which is typically during shutdown of IncrementalJIT.
This was not the case for the global object MMapperInstance that was
introduced during the upgrade to LLVM 13 because libCling variables
are destructed before running TROOT atexit handlers that shut down
the JIT. In practice, it happened to work but this will change with
the upgrade to LLVM 18 where we see crashes in some tests, potentially
because of upstream commit
47f5c54f99

See also commits e0f6c04660 ("Prevent static destruction from ending
DefaultMMapper too early") and 80c14bb948 ("Extend lifetime of
SectionMemoryManager::DefaultMMapper, again") for the same problem
that we previously patched in our copy of LLVM.
2024-08-27 13:59:05 +02:00
Jonas Hahnfeld
76f5e99b9a Disable many DynamicLibraryManager test on macOS
They fail since a long time because the library linking setup is quite
fragile.
2024-08-23 09:14:07 +02:00
Jonas Hahnfeld
48b9edd51f Disable test/DynamicLibraryManager/cached_realpath.C on macOS
It uses ln -r, which is not implemented on macOS.
2024-08-23 09:14:07 +02:00
Jonas Hahnfeld
6b83c2c0a5 Always apply SetClingCustomLangOpts
It enables IncrementalExtensions, which is required for Cling to work.
This fixes test/CodeUnloading/PCH/VTables.C which loads a PCH.
2024-08-23 09:14:07 +02:00
Jonas Hahnfeld
00dd8c01b9 Delete test/Prompt/ValuePrinter/FileSystemPath.C
Unfortunately the std::filesystem symbols are provided by the static
library libstdc++fs.a, which might be stripped out by the linker.
2024-08-23 09:14:07 +02:00
Jonas Hahnfeld
7e40c5d3af Remove test/CodeUnloading/RunAgainstClangTestSuite
It relies on a very specific setup where Clang and Cling sources are
in llvm/tools, in order for the relative paths to work, which is not
anymore the recommended structure since upstream LLVM moved to a
monorepo. Also clang/test/Sema/address-constant.c is a very arbitrary
Clang test, so it seems best to just delete this test directory.
2024-08-23 09:14:07 +02:00
Jonas Hahnfeld
f517ee0b8b Never build Clad tests
Clad tests will try to use the just-built Clang compiler. First, this
dependency was not declared properly, and now results in a cycle after
commit fe6c671e85 made clang depend on clad. Since we never run the
Clad tests, never build them.
2024-08-23 09:14:07 +02:00
saisoma123
5cc4d84bd8 Formatted the beginning functions of the cpt 2024-08-21 14:44:07 +02:00
Jonas Hahnfeld
dbe8b058ee Fix DelegateGenerator on macOS
Commit 785c9df34d ("Restore symbol lookup in child interpreters")
added a DefinitionGenerator to allow symbol lookup in the parent
IncrementalJIT after the upgrade to LLVM 13. It appears that instead
of the unmangled name, we need to lookup already linker mangled names.

This fixes the tests CodeUnloading/AtExit.C and
MultipleInterpreters/MultipleInterpreters.C on macOS, which adds an
underscore during linker mangling. No change on Linux because there
is no additional linker name mangling.
2024-08-20 08:14:05 +02:00
Bertrand Bellenot
6a4cc17e26 Add current directory . case 2024-08-15 15:14:05 +02:00
Bertrand Bellenot
2bbabd25fa Handle also the non-Windows cases
Thanks Jonas for the proposal
2024-08-15 15:14:05 +02:00
Bertrand Bellenot
9325054010 Fix potential Clad build error
Fixes the following potential error when building clad:
```
  Command failed: 2
  ‘/usr/local/bin/cmake’ ‘–build’ ‘.’ ‘–config’ ‘.’
```
2024-08-15 15:14:05 +02:00
Jonas Hahnfeld
7695c7302c Turn off delayed template parsing on Windows
It is "a deprecated technique".

Co-authored-by: Bertrand Bellenot <Bertrand.Bellenot@cern.ch>
2024-08-14 13:14:06 +02:00
Jonas Hahnfeld
c83f15be45 std_darwin.modulemap: Break cyclic module dependencies
With the latest MacOSX15.0.sdk, Clang complains about a "cyclic
dependency in module 'std': std -> _wctype -> __wctype -> std".
Break this cycle by deleting the module for ctype.h in libc++,
it only includes ctype.h from the C library which has its own
module definition.

Closes #16219
2024-08-13 18:14:04 +02:00
Jonas Hahnfeld
52df1a551a Globally enable incremental extensions
We are relying on this since a while, for example for reemission of
template symbols. At the moment, we get the incremental extensions
because Preprocessor::enableIncrementalProcessing() turns them on
internally, but this will change with LLVM 18 where this method only
controls incremental processing of a single Preprocessor object.
2024-08-09 08:59:03 +02:00
Vassil Vassilev
9c3ae91ff5 Bump clad to version v1.7 2024-08-08 20:29:02 +02:00
Jonas Hahnfeld
afd3692787 Forcefully clean up TemplateIdAnnotations
Upstream Clang keeps TemplateIdAnnotations around "if they might
still be in the token stream." See upstream commit for more details:
6163aa9679
(included in Clang 11, in ROOT since the upgrade to LLVM 13)

This reasoning doesn't apply when we fully reset the Parser state in
ParserStateRAII's destructor, and we expect the swapped out vector of
TemplateIdAnnotations to be empty in order to not leak.

Fixes #16121
2024-08-02 08:29:05 +02:00
ferdymercury
42d2fb1493 Remove references to Python2
copy-pasted from pitkajuh. See https://github.com/root-project/cling/pull/519
2024-07-26 09:59:04 +02:00
ferdymercury
dac25f50f3 fix typo in cling docu 2024-07-26 07:44:02 +02:00
Vassil Vassilev
7516f5d348 Bump clad to version v1.6
The 1.6 release has critical fixes for the RooFit AD backend.
2024-07-18 09:44:04 +02:00
LiAuTraver
3a9ada1138 Update build guide for cling (#15972) 2024-07-11 08:44:07 +02:00
Jonas Hahnfeld
3e59d62c9c Simplify addOrReplaceDefinition
Calling getSymbolAddress will force symbol emission, which is not
needed if the intent is to replace it.
2024-07-03 08:29:06 +02:00
Jonas Hahnfeld
c201269a09 Simplify symbol overrides
There is no need to force symbol emission, get the address from the
JIT, and then replace the symbol once more.
2024-07-03 08:29:06 +02:00
Devajith Valaparambil Sreeramaswamy
900be1d0e8 Simplify mangling by using mangleAndIntern 2024-06-26 09:29:06 +02:00
ferdymercury
48788e4034 Remove link to rawgit as it will shut down
Fixes https://github.com/root-project/cling/issues/339

From main RawGit Webpage: If you're currently using RawGit, please stop using it as soon as you can.
2024-06-24 20:59:05 +02:00
Jonas Hahnfeld
bb6c527ccc std_darwin.modulemap: Remove headers for MacOSX15.0.sdk
Manually curating the modulemap is far from ideal because it requires
updates for changes in the libc++ library shipped with the SDK, which
must also work across all supported SDK versions. An alternative would
be to locate the modulemap shipped with libc++ during configuration
time, copy it and dynamically modify its contents to suit our needs.
2024-06-24 08:29:06 +02:00
Danilo Piparo
2f17f4b4eb Propagate the sized-deallocation to the compiler instance
explicitly if the compiler enables it.
2024-06-07 14:29:06 +02:00
Yong Gyu Lee
a462500c3a Add non-common_range test to Regression.C 2024-05-30 14:14:03 +02:00
Yong Gyu Lee
7dc8c9aca9 Fix diagnostic failure if an object return different types for begin() and end() 2024-05-30 14:14:03 +02:00
Maxim Cournoyer
d73fdd2198 build: Modernize handling of external LLVM library.
* CMakeLists.txt: Remove llvm-config related code, instead  using
modern 'find_package' constructs.

Fixes: <https://github.com/root-project/cling/issues/430>
2024-05-27 07:29:02 +02:00
Vassil Vassilev
9cd87082a9 Bump clad to version v1.5
This new release includes several fixes helping to scale the RooFit AD backend.

See more at: https://github.com/vgvassilev/clad/releases/tag/v1.5
2024-05-21 12:29:05 +02:00
Bertrand Bellenot
efa55e40ed Export missing symbols
Export the following missing symbols:
```
void * __ptr64 __cdecl operator new(unsigned __int64,struct std::nothrow_t const & __ptr64)
void * __ptr64 __cdecl operator new[](unsigned __int64,struct std::nothrow_t const & __ptr64)
```
and
```
void * __cdecl operator new[](unsigned int,struct std::nothrow_t const &)
void * __cdecl operator new(unsigned int,struct std::nothrow_t const &)
```
Fixes root-project/cling#442
2024-05-14 15:44:06 +02:00
Vincenzo Eduardo Padulano
312f39020b Comply with CMP0148
See https://cmake.org/cmake/help/latest/policy/CMP0148.html
2024-05-13 19:59:07 +02:00
ferdymercury
3229b9a2db remove remnant declaration of removed function
Function was removed here c23abbc88b

Fixes https://github.com/root-project/cling/issues/456
2024-05-11 12:44:05 +02:00
Jonas Rembser
4bd3f6b6fb Look for Python3 again in SearchInstalledSoftware.cmake
This commit essentially reverts a288ff9 from four years ago, which was
also part of the multi-python machinery that is not necessary anymore
after Python 2 support was dropped.

Also, make the choice of looked-up components consistent with what is
actually required.
2024-05-08 15:14:07 +02:00
Bertrand Bellenot
3cc2a4dd8d Add support for Visual Studio >= v17.10 2024-05-08 10:44:03 +02:00
Jonas Hahnfeld
65a2a778d1 Fix build with assertions
Fixes commit 68769cd980 ("[cling] Move parts of Parse to another
function").
2024-05-07 11:59:05 +02:00
Jonas Rembser
be35aaef26 Only build clad plugin if requested
Building clad should not depend on the result of the connectivity check,
but whether it is enabled.
2024-05-06 21:44:06 +02:00
Devajith Valaparambil Sreeramaswamy
4f2c339d5c Remove m_MemoryBuffers completely 2024-05-06 16:59:09 +02:00
Devajith Valaparambil Sreeramaswamy
ab2f942c8e Remove usage of DiagnosticErrorTrap 2024-05-06 16:59:09 +02:00
Devajith Valaparambil Sreeramaswamy
db76f2a502 Move closer to upstream 2024-05-06 16:59:09 +02:00
Devajith Valaparambil Sreeramaswamy
a943f62f14 Remove unneeded ifdefs 2024-05-06 16:59:09 +02:00
Devajith Valaparambil Sreeramaswamy
517ba1c546 Move processing of TopLevelDecls to the function 2024-05-06 16:59:09 +02:00
Devajith Valaparambil Sreeramaswamy
35b1b01abe Remove CrashRecoveryContextCleanupRegistrar 2024-05-06 16:59:09 +02:00
Devajith Valaparambil Sreeramaswamy
f4471da415 Move parts of Parse to another function 2024-05-06 16:59:09 +02:00
Devajith Valaparambil Sreeramaswamy
419c25e5f2 Use ThreadSafeContext 2024-05-06 16:59:09 +02:00
Vassil Vassilev
6e171ffe93 Remove never used code from the callbacks.
This will allow us to simplify our ASTConsumer model instead of creating many
multiplexers that are not needed. That should simplify adoption of latest
versions of clad.
2024-05-02 10:59:05 +02:00
Devajith
f9b7ba1430 Add plugin support (#15169)
Add plugin support and pass LLVM arguments after plugins have been loaded.
2024-04-12 15:59:08 +02:00