I was not aware of intentional instability of llvm and clang APIs. That certainly causes havoc.
Thanks for the suggestion about building separately ROOT’s llvm and clang. I suppose I can count on ROOT build system checking compatibility between given build of llvm and clang and the current version of ROOT, right? So that I will hit cmake error if there is some development in llvm or clang that new ROOT version needs, as opposite to hitting a compilation error few minutes in the build process.
@vvassilev@Axel@pcanal@amadio
I didn’t get an answer on how ROOT build system controls compatibility with ROOT-patches of LLVM and CLANG. Supposing that the head of ROOT-patches is right now compatible with the recent ROOT pro (e.g. v6-16-00) and supposing in 2 days 3 commits are added to ROOT-patches that are then required by ROOT v6-18-00. Now let’s suppose, that I try to build ROOT v6-18-00 against the current ROOT-patches which doesn’t contain these 3 commits. What will happen?
@amarcine I don’t think that there is any mechanism in the build system to ensure you are using a compatible LLVM/Clang version other than just the version check for 5.0.x. That said, the LLVM/Clang in ROOT has not changed much recently, so it probably remains compatible, although the external one based on ROOT-patches may not support C++ runtime modules yet.
So ROOT-patches is not updated along with LLVM inside ROOT?
As for the 5.0.x version check, is version incremented in ROOT-patches to allow for these compatibility checks or is this version just the one which is the base for ROOT-patches? Looking at tags of ROOT-patches, they do not seem to correspond to 5.0.x scheme of LLVM/CLANG versioning nor to ROOT versioning.
While I understand that pushing upstream patches to LLVM/CLANG made for ROOT is problematic and one cannot really assure compatibility of new LLVM releases with ROOT, ROOT-patches is fully under ROOT control, so I thought it should not be a major effort to assure that it is updated and that there is matching between versions there and ROOT versions.
Do you mean why do I ask the question? If so, let me summarize the discussion up to now: In a situation when I build ROOT from scratch, I wanted to reduce build time by disabling builtin llvm and clang. I was told that I cannot use official clang, so the only option is to build ROOT-patches llvm with clang. So I wanted to know to what extent this is safe. Now it looks like this is not really safe, because ROOT-patches are not synchronized with ROOT and there is no mechanism of matching ROOT versions with ROOT-patches versions.
I see. Yes indeed - for the time being and esp regarding efficiency I’d recommend to “simply” build llvm + clang with ROOT. This will improve in the future.
Several years have passed, many releases of both ROOT and llvm, and I wonder if I still need to build ROOT along with llvm and clang or if I can use upstream versions to shorten ROOT build time?
cling is still building on top of clang + a few patches, so that dependency must be build separately. At the moment, one can use an externally built vanilla LLVM without building it together with ROOT. You need to make sure that it matches the LLVM version cling needs (LLVM 16.0.6 for ROOT 6.32, LLVM 18.1.6 for current ROOT master).