To get the arguments of cling, which are passed on start, you can use the reflection feature of cling.
#include "cling/Interpreter/Interpreter.h"
#include "cling/Interpreter/InvocationOptions.h"
// gCling is an object of type cling::Interpreter
std::vector<const char*> remaining = gCling->getOptions().CompilerOpts.Remaining;
remaining
The solution for ROOT:
Workaround: use a cling build as the source for the necessary headers.