- Apr 19, 2021
-
-
Pratyush Das authored
Template taken from root-project/root's issue template
-
- Apr 14, 2021
-
-
Enrico Guiraud authored
In order to specialize cling's value-printing logic for collections we perform some SFINAE checks. Among other things, the checks assert that `++(obj.begin())` is well-formed. That compiles for `std::vector` and other collections with "fat" iterators, but does not compile for collections that use raw pointers as iterators: ```cpp auto beg(std::vector<int> &v) { return v.begin(); } int *beg2(std::vector<int> &v) { return &v[0]; } int main() { std::vector<int> v{1,2,3}; beg(v) += 1; //beg2(v) += 1; // does not compile - beg2(v) is not an lvalue return 0; } ``` Requiring instead `std::begin(obj)` to be well-formed should be backward compatible and it should allow collections that use raw pointers as iterators to also be pretty-printed by cling. Co-authored-by:
Axel Naumann <Axel.Naumann@cern.ch>
-
- Apr 09, 2021
-
-
Jonas Hahnfeld authored
Backport of D99607, commit 6415f424bc. Original commit message: --- When using the large code model with FastISel (for example via clang -O0 which adds the optnone attribute), FP constants could still be materialized using adrp + ldr. Unconditionally enable the existing path for MachO to materialize the constant in code. [...] --- See the discussion in https://github.com/cms-sw/cmssw/issues/31123 for context on the observed crashes.
-
- Apr 06, 2021
-
-
Jonas Hahnfeld authored
The argument -Xclang -triple=... completely bypasses Clang's Driver logic and only sets the triple in CC1. This suffices for most code generation tasks, but the Driver cannot compute the correct ABI and sets the generic AArch64 "aapcs" instead of the specific "darwinpcs". In turn, this causes integer arguments with less than 32 bits not being sign-extended but being passed directly, which for example manifests as (short)-1 being read as 65535 on the callee side. The new argument --target=arm64-apple-darwin20.3.0 matches what Apple's and LLVM main's clang return for --print-target-triple. Fixes #7090
-
- Apr 05, 2021
-
-
Axel Naumann authored
Outer RAIIs might still reference the Transaction, and unload is assuming that it owns the transaction and can delete it / put it into the TransactionPool. This fixes https://github.com/root-project/root/issues/7657 We still need to track ownership as what has happened here (unload of a Transaction held by an RAII) can happen again / elsewhere. This will be addressed by a subsequent PR in master.
-
Axel Naumann authored
a cheap way to notice what went wrong in https://github.com/root-project/root/issues/7657.
-
Axel Naumann authored
-
Axel Naumann authored
-
Axel Naumann authored
-
Axel Naumann authored
new of a char array might not have the correct alignment to hold a Transaction. Allocate a Transaction itself directly, instead of in-place constructing it in the character array. Each Transaction in the pool is thus constructed through `new Transaction(S)` and destructed through `delete T`, which is nicely symmetrical. The use of `::operator new` and `::operator delete` isn't actually necessary. While I'm at it, improve the assert message's wording.
-
- Apr 02, 2021
-
-
Vassil Vassilev authored
-
- Apr 01, 2021
-
-
Bertrand Bellenot authored
* First step to port ROOT on Windows 64 bit - Introduce the Win64 option and flags in the CMake build system - Introduce the new `Longptr_t` and `ULongptr_t` types to hold a pointer (4 bytes on Win32 and 8 bytes on Win64), aimed to replace the `Long_t` and `ULong_t` used to cast pointers, and being both 4 bytes on Windows. Their values will not change on other platforms (`Long_t` and `ULong_t`) for backward compatibility - Add the 64 bit export symbols in `core/metacling/src/CMakeLists.txt` - Add the 64 bit version of lzma (xz-5.2.4-win64.tar.gz) * Add forgotten semicolons
-
- Mar 31, 2021
-
-
Pratyush Das authored
Only fixes builds from LLVM 9 source. Builds using an LLVM 9 binary release is still broken. Drop Ubuntu 16.04 Clang build, since Clang 3.8 is very old and causes build failure.
-
Axel Naumann authored
As llvm JIT cannot catch exceptions on Apple M1 (see https://github.com/root-project/root/issues/7541) cling should throw less. This is a hack to reduce the impact a bit.
-
- Mar 23, 2021
-
-
Bertrand Bellenot authored
Resolves root-project/cling#399 Fix the following linker errors: 253>cling.exp : error LNK2001: unresolved external symbol "public: static class std::basic_string<char,struct std::char_traits,class std::allocator > __cdecl clang::QualType::getAsString(class clang::Type const *,class clang::Qualifiers)" (?getAsString@QualType@clang@@sa?AV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@PEBVType@2@VQualifiers@2@@z) 253>cling.exp : error LNK2001: unresolved external symbol "private: virtual void __cdecl llvm::raw_ostream::handle(void)" (?handle@raw_ostream@llvm@@EEAAXXZ) 253>D:\work\libs\cling\src\build\Release\bin\cling.exe : fatal error LNK1120: 2 unresolved externals
-
- Mar 21, 2021
-
-
Vassil Vassilev authored
The CMAKE_OSX_SYSROOT exports the exact version of the sdk which we build against. However, this means that binary releases become sensitive to minor sdk upgrades (eg. MacOSX11.1.sdk -> MacOSX11.2.sdk). Our infrastructure is relatively resilient to such changes. This patch introduces a workaround to address this issue -- it uses the fact that the current sdk's parent directory has a symlink MacOSX.sdk which points to the current sdk. This should resolve root-project/root#7021.
-
- Mar 18, 2021
-
-
Pratyush Das authored
Build compiler can be set using CMake flag
-
Axel Naumann authored
Before, pre-existing fwd decls of specializations got unloaded. OTOH, any decl produced during (failed) template instantiation must also be unloaded; see #6331. Those are easiest identified by unloading the whole (failed) transaction. ``` error: no member named 'value' in 'std::__and_<std::is_copy_assignable<std::__cxx11::basic_string<char> >, std::is_copy_assignable<Inner<int> > >' is_copy_assignable<_T2>>::value, ~~~~~~~~~~~~~~~~~~~~~~~~~~^ ``` which is due to the first decl being invalid (as `Inner<int>` does not have a deinition and a `static_assert` /usr/lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/type_traits:1093 being triggered), then not unloaded, and then picked up again where we *do* have the definition for `Inner<int>`. Add test for templt spec lookup vs unloading.
-
Axel Naumann authored
There is no point in emitting a transaction that has been rolled back to CodeGen. To make matters worse, a rolled-back transaction will not show up in the list of transactions.
-
Axel Naumann authored
If Lookup fails to instantiate, its transaction should not be committed, as we know it's useless and must be unloaded as it might contain invalid Decls. But that means Lookup needs to unload a non-committed transaction.
-
Axel Naumann authored
To determine the file magic, the file needs to be opened and read. This is done with *each* file in $LD_LIBRARY_PATH, including ./ If one of them is e.g. a FIFO then reading blocks until someone writes into the FIFO, which might cause the process to hang. This was reported a couple of times, such as at https://root-forum.cern.ch/t/compiling-from-source-first-interactive-command-hangs/43997/5 Solution: only check for the file magic of *regular* files. Sadly, llvm::sys::fs::get_file_type never sets file_not_found but returns an unspecific status_error.
-
David Lange authored
make minimal adjustments (for removed headers) to boost modulemap for boost 1.75.0 (+patches for missing includes)
-
Jonas Hahnfeld authored
Backport of D27629, commit 18805ea951. Original commit message: --- Makes sure that the unwind info uses 64bits pcrel relocation if a large code model is specified and handle the corresponding relocation in the ExecutionEngine. This can happen with certain kernel configuration (the same as the one in https://reviews.llvm.org/D27609, found at least on the ArchLinux stock kernel and the one used on https://www.packet.net/ ) using the builtin JIT memory manager. Co-authored-by:
Yichao Yu <yyc1992@gmail.com> Co-authored-by:
Valentin Churavy <v.churavy@gmail.com> --- Note: The handling in ExecutionEngine was committed in a different revision and is already part of LLVM 9. We need the part about emitting relocations because eh_frame (allocated in a data section) may be more than 4Gb away from the code section it references. See the discussion in https://github.com/cms-sw/cmssw/issues/31123 for context.
-
- Mar 16, 2021
-
-
Axel Naumann authored
With llvm9, the module ptr gets reset upon emission. Instead, just look for the symbol in the JIT - where it should be found, as Init() is injecting it there, and we want to find *that* symbol, not the one from the binary. Fixes `CodeUnloading/AtExit.C` cling test.
-
Axel Naumann authored
it is needed for test/Autoloading/AutoForwarding.C.
-
Axel Naumann authored
was failing before but due to `REQUIRES: vanilla-cling` not run.
-
Axel Naumann authored
A failure to load the library will *not* trigger loading the same file as a source file: `#pragma load` will cause zero or one diagnostics, not two. Now that the diagnostic for a missing file to be `#pragma load`ed is "file not found", re-use the existing `expected-error@input_line_12` line!.
-
Axel Naumann authored
-
- Mar 11, 2021
-
-
Vassil Vassilev authored
-
Bertrand Bellenot authored
Silent the following zillion of warnings on Windows: ``` C:\Users\sftnight\git\master\interpreter\llvm\src\include\llvm/Support/type_traits.h(97,1): warning C4624: 'llvm::detail::trivial_helper<T>': destructor was implicitly defined as deleted [C:\Users\sftnight\build\relwithdebinfo\interpreter\cling\lib\Interpreter\obj.clingInterpreter.vcxproj] with [ T=clang::Sema::ModuleScope ] C:\Users\sftnight\git\master\interpreter\llvm\src\include\llvm/Support/type_traits.h(150): message : see reference to class template instantiation 'llvm::detail::trivial_helper<T>' being compiled [C:\Users\sftnight\build\relwithdebinfo\interpreter\cling\lib\Interpreter\obj.clingInterpreter.vcxproj] with [ T=clang::Sema::ModuleScope ] C:\Users\sftnight\git\master\interpreter\llvm\src\include\llvm/ADT/SmallVector.h(315): message : see reference to class template instantiation 'llvm::is_trivially_copyable<T>' being compiled [C:\Users\sftnight\build\relwithdebinfo\interpreter\cling\lib\Interpreter\obj.clingInterpreter.vcxproj] with [ T=clang::Sema::ModuleScope ] C:\Users\sftnight\git\master\interpreter\llvm\src\include\llvm/ADT/SmallVector.h(837): message : see reference to class template instantiation 'llvm::SmallVectorImpl<T>' being compiled [C:\Users\sftnight\build\relwithdebinfo\interpreter\cling\lib\Interpreter\obj.clingInterpreter.vcxproj] with [ T=clang::Sema::ModuleScope ] C:\Users\sftnight\git\master\interpreter\llvm\src\tools\clang\include\clang/Sema/Sema.h(1724): message : see reference to class template instantiation 'llvm::SmallVector<clang::Sema::ModuleScope,16>' being compiled [C:\Users\sftnight\build\relwithdebinfo\interpreter\cling\lib\Interpreter\obj.clingInterpreter.vcxproj] ```
-
- Mar 09, 2021
-
-
Jonas Hahnfeld authored
In tests on an Apple M1 after the upgrade to LLVM 9, this new instruction selection framework emits branches / calls that expect all code to be reachable in +/- 128 MB. This cannot be guaranteed during JIT, which generates code into allocated pages on the heap and could span the entire address space of the process.
-
- Mar 07, 2021
-
-
Vassil Vassilev authored
This patch is a complementary chenge to root-project/root@d2c0929e0d It will turn off the isOutOfDate checks for transient files with different size on disk. This is quite dangerous but we are supposed to control the build environment which prepares the distributable binaries. This should fix the cmssw issue: StdDictionaries/src/DataFormatsStdDictionaries/a/DataFormatsStdDictionaries_all_def.xml input_line_8:1:22: error: file '/usr/include/linux/falloc.h' from the precompiled header has been overridden ^ rootcling: /build/cmsbld/jenkins/workspace/build-any-ib/w/BUILD/slc7_amd64_gcc820/lcg/root/6.17.01/root-6.17.01/interpreter/llvm/src/tools/clang/include/clang/Serialization/Module.h:72: clang::serialization::InputFile::InputFile(const clang::FileEntry*, bool, bool): Assertion `!(isOverridden && isOutOfDate) && "an overridden cannot be out-of-date"' failed. The error tells us that `falloc.h` has different file size on the build machine and on the distribution machine. We should probably rely on an environment variable to turn off this diagnostic selectively and more the reponsibility if something goes wrong to the distribution team. They should have better knowledge what is safe to be ignored anyway.
-
Vassil Vassilev authored
In clang a transient file is a header file which is stored in the pch/pcm file. If this file does not exist, clang creates a virtual file of the unzipped stored file. However, if the file exists it compares the size of the file on disk and the size of the transent file. If the two sizes are different it does not complain (as validation is off) but it triggers an assert in when constructing and outdated clang::InputFile. The implementation disallows a overridden or transient file to be out of date. This patch extends the DisableValidation abilities to span not only for timestamps but we avoid checking the file sizes if the file is on the disk. And, instead we just create a virtual file of the file that we already have. This patch should fix a relocation issue for cmssw and some of the reported LCG issues.
-
- Mar 06, 2021
-
-
Axel Naumann authored
-
Axel Naumann authored
-
Axel Naumann authored
Fixes CMS dictionary build issue with forward declaring a template argument of enum constant type - something we do not forward declare.
-
Axel Naumann authored
-
Simeon Ehrig authored
- solves the bug, that error messages of the device compiler was not prefixed with "cling-ptx"
-
- Mar 05, 2021
-
-
Pratyush Das authored
-
Pratyush Das authored
-