Commit Graph

4845 Commits

Author SHA1 Message Date
saisoma123
f1f0fc1e24 Created new extract_tar function to extract tar files. Replaced tar subprocess calls with new function call and also replaced pythonic tar extractions with new function call. 2022-07-28 16:44:04 +02:00
Jonas Hahnfeld
52fdb631cf Use logical operators for boolean operands (#10787)
This addresses a warning of recent Clang versions about the "use of
bitwise '|' with boolean operands [-Wbitwise-instead-of-logical]".
2022-07-27 11:44:07 +02:00
saisoma123
6f44b45ad3 Added extra spacing between functions to get rid of E302 error code. This is necessary for getting the code to be flake8 compliant. 2022-07-18 12:44:05 +02:00
Surya Somayyajula
b1ef074c09 Added skip-cleanup flags for check-requirements and create-dev-env [skip-ci] (#10960)
Added skip-cleanup flags for create-dev-env.
This would instruct the cpt to build cling, clang, and llvm, without
deleting the build area, as the cpt normally would delete the build
area due to the use of memory running out when linking, because
of too many build subprocesses.
2022-07-17 13:14:03 +02:00
saisoma123
1890a4f39f Added indentation for visual indent. Makes the code more flake8 compliant. 2022-07-17 08:59:06 +02:00
saisoma123
0a8571da4e Fixed invalid escape characters. This makes the code more flake8 compliant. 2022-07-17 08:59:06 +02:00
saisoma123
afc77bf839 Added extra whitespace around operators. This will make code more flake8 compliant. 2022-07-17 08:59:06 +02:00
saisoma123
3feec559a9 Added new dependent arguments, specifically llvm_tar and llvm_binary as well as llvm_tar and llvm_url. I added these dependent arguments because they were listed as a rewrite step for the argument parser in the meta-issue list. Also, it wouldn't make sense to download both the LLVM binary and tar. I also added the tar and url dependency because there was a binary and url dependency. 2022-07-16 18:59:03 +02:00
Surya Somayyajula
39738dc98f Fixed argument nomenclature [skip-ci] (#10936) 2022-07-15 11:59:07 +02:00
saisoma123
a1a8a9d149 Fixed formatting and made new helper function for setting llvm_flags 2022-06-28 18:29:04 +02:00
saisoma123
f7fdcf6773 Formatting changes 2022-06-28 18:29:04 +02:00
saisoma123
476a7d13fa Forgot extra plus sign 2022-06-28 18:29:04 +02:00
saisoma123
13013617fe Added verbose flag to the llvm_flags variable, if the verbose option is called 2022-06-28 18:29:04 +02:00
saisoma123
f5402eefab Added verbose flag to the llvm_flags variable 2022-06-28 18:29:04 +02:00
saisoma123
cabadcf6f4 Edited verbose output flag 2022-06-28 18:29:04 +02:00
saisoma123
3bd9d02ab1 Added new starting point for cpt.py.
Added new main block because this was mentioned in the meta issue
list (#406 in cling) as one of the rewrite steps. This also allows for
the main code to be run as opposed to running the main code plus the
function defintions.
2022-06-28 18:29:04 +02:00
saisoma123
1fee0d4b10 This fixes the undefined llvm_flag error when the --last-stable option is called. I added a download_llvm_binary function call, which sets the llvm_flags. 2022-06-15 15:14:02 +02:00
saisoma123
717eea7c47 Added cmakeDir for Windows 2022-06-11 20:44:02 +02:00
Enrico Guiraud
5f0c2a38ae Remove unused include of "llvm/Config/config.h"
Including that header from cling breaks building ROOT with
external llvm and clang (which is needed e.g. for the conda
package): `config.h` is not avaiable in that scenario.
2022-06-08 15:14:03 +02:00
Guilherme Amadio
bbc1089732 Add support for profiling/debugging interpreted/JITted code
This commit builds on previous work for getting GDB support for JITted
and interpreted code working in cling. It adds a JIT event listener as
well to create perf map files to allow profiling of interpreted/JITted
code with cling.

The functionality provided is disabled by default. The interface to
enable it has been chosen to be via environment variables to allow both
interpreted code in the prompt as well as linked code to be able to
optionally enable debugging/profiling. Using ld.so as example, where
LD_DEBUG and LD_PROFILE exist, we chose CLING_DEBUG and CLING_PROFILE
to enable these features. For the moment, setting these variables to
anything enables the feature. Later on, if support for oprofile is
added, for example, it may be better to enable specific JIT event
listeners depending on the value of the variables, for example with
CLING_PROFILE=perf or CLING_PROFILE=oprofile, respectively.
2022-06-07 21:59:05 +02:00
Axel Naumann
cf44b102bf Fix cached_realpath.C test by removing stale test dir. 2022-05-31 15:44:05 +02:00
Axel Naumann
881b2e2629 Remove unneeded #include <new>: breaks -x c. 2022-05-31 15:44:05 +02:00
Simeon Ehrig
521bf307eb Fix crash, if cling is started with the arguments -xcuda -fsyntax-only
The crash occurs due to a missing guard that prevents `libcudart.so` from being
loaded. Loading a library requires an executor which is not available in
syntax-only mode.
2022-05-30 17:59:03 +02:00
Simeon Ehrig
5754b5ada3 DynamicLibraryManager::loadLibrary if the parameter resolve is false
The error occurs only when `loadLibrary()` is called with the argument `resolved = false`.
A const string reference is not possible here because a temporary copy of
lResolved would be referenced. The return type of libStem.str() has the
value type prvalue. Therefore, lResolved requires the same type and the
compiler inserts a copy constructor to satisfy this. For more details
see rule 3.3.1 here:
https://en.cppreference.com/w/cpp/language/operator_other#Conditional_operator
2022-05-19 15:29:04 +02:00
Jonas Hahnfeld
da46c747a1 Do not throw CompilationExceptions on Apple M1 (#10561)
See https://github.com/root-project/root/issues/7541 for details.

Closes #7744
2022-05-11 14:14:04 +02:00
Jonas Hahnfeld
35b71f2d93 Fix test/DynamicLibraryManager/callable_lib_L_AB_abs.C (#10542)
Just pass the absolute path, do not prefix with -l which confuses ld.
2022-05-11 09:44:06 +02:00
Sergey Linev
460e7b8877 Use override syntax in cling classes 2022-05-06 20:59:03 +02:00
Jonas Hahnfeld
13616ee4f3 Fix std.modulemap for older GCC (#10529)
The header bits/utility.h only exists since libstdc++-12.
2022-05-05 18:29:05 +02:00
Vassil Vassilev
43170a0739 Reduce the amount of header duplications in the modules.
This resolves a merging bug with libstdc++12. Fixes root-project/root#10478
2022-05-04 08:29:05 +02:00
Axel Naumann
4d3d8b6ca3 .typedef: separate underlying and type alias name by space. 2022-04-26 14:14:02 +02:00
ferdymercury
b6e5c228bf fix missing newline also for class 2022-04-26 14:14:02 +02:00
ferdymercury
f7a3d879ac add missing newline
otherwise .typedef command shows weird format
2022-04-26 14:14:02 +02:00
ferdymercury
6486be661b Allow '.Class' command to take a class name
* make .Class the verbose equivalent of .class and take into account name passed to .Class. As it was the case in CINT.
* merge similar functions into one with a verbose arg
2022-04-25 17:44:06 +02:00
ferdymercury
877dbb58b4 Minor aesthetic fix in cling '.help' message
fix indentation
2022-04-25 17:44:06 +02:00
ferdymercury
19a2c1b73e Improve output of .help command
Co-authored-by: Javier Lopez-Gomez <javier.lopez.gomez@cern.ch>
2022-04-05 23:44:05 +02:00
Vassil Vassilev
ba45950236 Update the requires clauses of the modulemap.
Some headers do not exist before c++17.
2022-04-05 08:59:06 +02:00
Vassil Vassilev
3ed473bf3a Revert "[cxxmodules] Allow submodules to contain headers which may be missing."
This reverts commit f4ea5ad76c74671ebbdfb64fdaeffb986811420d.

We do not need to support gcc 4.8 anymore.
2022-03-27 15:14:05 +02:00
ferdymercury
329af99e47 fix typo (#10156)
* fix typo

* make it visible for doxygen
2022-03-17 13:14:04 +01:00
Bertrand Bellenot
e20302182f Fix compilation on Windows (32 and 64 bit)
Properly set the export symbols for `x86` and `x64` and don't export the `llvm`, `clang` and already exported internal `cling` symbols for both `cling` and `cling-demo`
2022-03-16 09:59:03 +01:00
ferdymercury
e359b1bacd add short version of help, as in quit (#10055)
* MetaSema: add short version of help, as in quit
Primer: join help and ?, mention .quit and .exit
TRint: mention .?
TApplication: mention .? and CINT 2 Cling

* clarify class name with ROOT7
2022-03-15 11:29:03 +01:00
Javier Lopez-Gomez
9d09611d77 TransactionUnloader: ensure function instantiations are processed only once
Implicit instantiation of a function template calls
`DeclCollector::HandleCXXImplicitFunctionInstantiation()`, which appends the
FunctionDecl to the transaction.  According to clang documentation, the body of
the function has not yet been instantiated. `HandleTopLevelDecl()` will be
called again for this decl at the end of the TU, which will append it
again to the transaction - same `Decl *`, different ConsumerCallInfo.

This is by design. However, unloading of decls in the transaction should
not process the same `Decl *` twice. In particular, entries with ConsumerCallInfo
== `kCCIHandleCXXImplicitFunctionInstantiation` will omitted.

Fixes issue #9850.
2022-03-03 18:29:03 +01:00
Javier Lopez-Gomez
2ec73dd62a DeclUnloader: reset the anonymous namespace in the enclosing DC
From SemaDeclCXX.cpp:
```
C++ [namespace.unnamed]p1.  An unnamed-namespace-definition behaves as if it
were replaced by
     namespace unique { /* empty body */ }
     using namespace unique;
     namespace unique { namespace-body }
where all occurrences of 'unique' in a translation unit are replaced by the same
identifier and this identifier differs from all other identifiers in the entire
program.
```

Thus, the first declaration of an unnamed namespace creates an implicit
UsingDirectiveDecl that makes the names available in the parent DC.

If we are reverting such first declaration, make sure we reset the anonymous
namespace for the parent DeclContext so that the implicit UsingDirectiveDecl
is created again when parsing the next anonymous namespace.

Fixes issue #7483.
2022-03-01 12:59:03 +01:00
Axel Naumann
b651b2bdb4 DynamicLibraryManagerSymbol.cpp formatting (NFC). 2022-02-24 18:14:07 +01:00
Jonas Hahnfeld
c8a0551b0a Remove defaulted copy constructors (#9970)
Clang warns that "definition of implicit copy assignment operator for
'...' is deprecated because it has a user-declared copy constructor".
My understanding is that we should either declare both or none, and
the compiler will default both unless there is a custom destructor.
2022-02-24 15:44:07 +01:00
Axel Naumann
1eceb4880a realpath: add continue back, fixing https://github.com/root-project/root/pull/9911
(cherry picked from commit 573e70bf979a764ec2221eecb3db5b87bea2dad6)
2022-02-23 09:29:06 +01:00
Javier Lopez-Gomez
f85dfc1173 Update CREDITS.txt 2022-02-22 17:59:04 +01:00
Javier Lopez-Gomez
970b844364 Add test against ROOT-9687 2022-02-22 17:59:04 +01:00
Javier Lopez-Gomez
e9474a2fc9 ValuePrinter: minor readability improvement 2022-02-22 17:59:04 +01:00
Javier Lopez-Gomez
ba4ece8f3d ValuePrinter: for auto decls, we should use the deduced type
Value printing an expression of type `AutoType` ended up in calling the general
fallback `printValue(const void *)`.
To call the appropriate overload, the deduced type should be used instead.

Fixes ROOT-9687.
2022-02-22 17:59:04 +01:00
Vassil Vassilev
abe65b3bed Add forgotten comment as part of d7da914fa0 2022-02-22 15:59:06 +01:00