3 ms·
Direct linking is a compiler option so it affects any source you are compiling with the flag on. If the dependency jar has source files (.clj) and you transiti
by puredanger 11y ago
Direct linking is a compiler option so it affects any source you are compiling with the flag on.
If the dependency jar has source files (.clj) and you transitively AOT compile your app with direct linking, then yes.
If the jar has class files (.class) then you won't affect that dependency jars calls within itself or out to other libs. But you can compile your own app to directly link into a compiled dependency if it was compiled with Clojure 1.8 (and has the direct methods to call).
Clojure core itself is AOT compiled (that has always been true) with direct linking on. So calls within clojure core itself are direct linked - how you compile your own code to call into them is up to the choices you make when you compile. Code compiled with direct linking actually retains both the direct and dynamic call paths so this is always a compile-time decision.