Make VDT a private dependency; don't install headers of builtins into the global install prefix - #22958
Conversation
Test Results 23 files 23 suites 3d 15h 49m 41s ⏱️ Results for commit 75a613f. ♻️ This comment has been updated with latest results. |
I was just suggesting to only forward declare So we'd have to update your new post-install test when my PR gets merged. Maybe a more robust way (independent of my PR getting merged or not) to test what you actually want to cover ("ensure that the VDT headers are found correctly"), is just to check that the Or is there an advantage of testing this indirectly via |
2b895e4 to
42fc1d7
Compare
If VDT is not included, trying to call these functions would produce an error. So we are shifting the error on inclusion to an error on call. I think that's fair, but your installation is broken in both cases.
It's not exactly the same: If CMake finds the header (because you gave it enough search hints), you might still not be able to compile an RVec program, because we need to test that all the So should we say:
|
Agreed with that! Let's continue the discussion in #22927 for now, and then adapt the test in this PR. |
a4f5506 to
52dd787
Compare
One of the only builtins that ROOT depends on publicly is VDT. When using RVec.h, the VDT headers need to be visible, so this small test tries to invoke a VDT function on an RVec.
52dd787 to
e8f47f6
Compare
e8f47f6 to
9030b8f
Compare
|
@guitargeek, here is what we discussed. VDT is now completely outlined, so we don't need to search it nor install it. |
9030b8f to
d6433c6
Compare
By moving all calls to VDT to the .cxx, the interpreter doesn't need to know about it, and ROOT doesn't need to install builtin-vdt's headers. - Outline all vdt-related functions in RVec.cxx - Convert the builtin-vdt library from .so to header only - Move the builtin-vdt artifacts to builtins/vdt/install - Don't install any of VDT's artifacts Fix root-project#9736.
Now that the VDT dependency is private, an installed ROOT does not anymore require VDT.
d6433c6 to
75a613f
Compare
guitargeek
left a comment
There was a problem hiding this comment.
Thank you very much for this!
Now, the compiler can't decide to inline the RVec fast_* functions anymore, but given this is an unclear presumed performance benefit to a niche user group this is an acceptable tradeoff to get more relocatable builds without public dependencies!
This improves the situation of #8655, by not unconditionally installing the XRootD and VDT headers into /include.
The only builtins that were publicly visible were XRootD and VDT. The former is already a private dependency, so its headers didn't need to be installed, any more. #22970
By outlining VDT from RVec.hxx, it can be made private, too. Therefore, it doesn't need to be installed, and modules are independent of whether or not VDT was present at build time, which fixes the last missing piece to close #9736.
A small post-install test was added to test that the RVec VDT functions work without an installed VDT.