IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
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).
in CIFactory:
- Add -fno-threadsafe-statics flag (for Windows only), to prevent potential unresolved symbols at run-time
in MetaProcessor::readInputFromFile:
- add required std::ifstream::binary flag when opening the std::ifstream
- add missing backslashes
in PlatformWin:
- properly format error messages
- in IsDLL(): check and return false if the file size is 0
- fix _CxxThrowException symbol name (not fully understood - to be reviewed)
- filter out a couple of system dlls when looking for symbols
We rely on clang's plugin infrastructure for loading, argument processing
and unloading plugins.
This patch teaches cling to work with clang plugins such as clad -- a
clang plugin implementing automatic differentiation facilities.
TClingClassInfo has a constructor that is supposed to be used for TU
scope lookups. However, it iterates over decls and causes lots of
deserializations. It does not respect the C++ lookup rules because it
returns the first decl with the name it finds.
This patch tries to keep the original behavior by first trying to do
a regular lookup and if the result is unambigious it returns the found
decl. If the result was ambiguous we try to disambiguate it (by turning
off the using directives) and return the found result.
The getSpecialization interface now deserializes lazily template
specializations. While unloading we trigger creation of new specializations
which does not make sense.
On Linux, the same adjustments are needed as for libstdc++ and libc++,
so turn the condition into just #ifdef __linux__. However, since the
__cxa_atexit function is declared as extern "C" in libc++, we cannot
add "noexcept" to it, as is done for libstdc++.
With the attribute after "enum" and before the name, the name itself gets annotated
and subsequent lookups fail to identify the front-end token.
By moving the attribute behind the decl, the identifier is unmodified.
This marks all files in the PCH/PCM transient. This allows clang to
stream them back within the zip in the PCH rather than requiring the
files to be physically present on disk.
This should resolve an introduced regression which materializes if
the files are moved/deleted after the generation of the PCH.
- Switch object format from ELF (Linux) to COFF (Windows)
- Fix mangled symbols lookup on Windows: remove leading '_' and use malloc to simulate __imp_ variables (that are indirection pointers)
We need to disable the validation of PCM files because rootcling
serializes what it sees. For instance, we even serialize in the PCM
file some temporary lookup buffers and the contents of the module maps.
We disable the PCH validation but that is not sufficient for PCM. The
TCling code `fInterpreter->getCI()->getPreprocessorOpts().DisablePCHValidation = true`
is not enough because we rely more on the clang driver to setup correctly
our modules-aware interpreter.
This patch just uses the correct flag when setting up cling.
A proper fix to this issue is thoroughly described in RE-0003 (rootcling
refactor proposal).
For now, do not decorate enums, this leads to some errors, likely
due to incorrect merging. See https://sft.its.cern.ch/jira/browse/ROOT-9114
Note: that passing the set of forward declare and then actual declaration
to clang (both official and ROOT's custom version), there is no problem
seen.
We need to respect the existing ExternalASTSource when setting up the
interpreter. Otherwise the ASTReader (which is the existing source)
doesn't receive the required callbacks to properly load C++ modules.
This patch now creates a multiplexer that contains our new
ASTSource and the existing one if it's necessary. We also
no longer attach the existing sema source which seemingly
was only a workaround that only works for the special case
were the external sema source and the external AST source
are the same object.
TLS is currently not suppored in the JIT on some platforms.
However, it's possible to enable emulated TLS support in LLVM
which means that we now support TLS across many architectures.
The performance downsides of this are the overhead of accessing
the variable due to the additional indirection by the emulation.
However, this overhead is minimal and shouldn't affect most
programs. It also can be easily worked around from the user side.
This can be donefFor example by wrapping TLS variables into a single
TLS struct variable that then contains the other variables. Or just
minimizing referencing the TLS variable and use a normal copy of
the variable instead and write it back later.
Patch created with a lot of help from Lang Hames and Pavel Labath!