-
- Downloads
Disassociate disable-autoloading from disable-loading-of-library.
Add TCling::fAllowLibLoad (false in rootcling, true otherwise). This re-enable TCling::AutoLoad by default and repairs ROOT-6580. Historical notes: There is two distinct part of the autoloading. (a) The autoloading callback that is triggered during parsing by the interpreter of user code or header files (This can also be triggered by lookup in the type database, for example by ResolveTypedef). (b) The function TInterpreter::AutoLoad which is explicitly called when the library for a TClass is needed, for example from the I/O or from the code implementing the callbacks for (a). (a) was enabled only when we have a TApplication (See commit 73449447). It was also enabled in rootcint when called by ACLiC but with a different implementation of the autoload callback. In rootcling, the same behavior has been implementated using a different callback in ROOT::Scanner rather than in the interpreter. (b) was never disabled and the calling code was the only decider of whether to execute it or not. Once we connected libRIO to rootcling, we need a way to avoid the library loading; we found it easiest to re-use the disabling of the autoloading (a) to also cancel the side effect of (b) [For example the inadvertent loading of the actual libRIO.so eventhough the .o are already linked in.] However disabling (b) when (a) is disabled (or not yet enabled) changes the behavior of executables (for example 'hadd') that do not have a TApplication. The two functionalities are really semantically distinct: (a) load library when the interpreter receive a request for the type (b) load the library when the calling code 'knows' it needs the TClass. As the rest of the code currently stand, allowing the execution of TCling::AutoLoad does *not* lead to any visible problem during the build of ROOT or the execution of roottest. However there is never any good reason to have rootcling load any libraries, so we must keep TCling::AutoLoad disabled during rootcling execution.
Please register or sign in to comment