Is it possible to link with a lib statically in release builds and dynamically in debug builds? Is so how?
Motivation:
On one hand app startup time depends on the amount of dynamically loaded libs (dylibs). The more dylibs I have the slower the startup time, hence I'd like to link with all libs statically to improve user experience.
On the other hand static linking increases the compilation time, which affects developer's experience & productivity.
Hence in order to win in both cases I'd like to link statically with all libs in release and dynamically with the same libs in debug builds.
Progress:
During a WWDC lab I've been told to:
and running clang with -v doesn't help...
Motivation:
On one hand app startup time depends on the amount of dynamically loaded libs (dylibs). The more dylibs I have the slower the startup time, hence I'd like to link with all libs statically to improve user experience.
On the other hand static linking increases the compilation time, which affects developer's experience & productivity.
Hence in order to win in both cases I'd like to link statically with all libs in release and dynamically with the same libs in debug builds.
Progress:
During a WWDC lab I've been told to:
Set the MACH_O_TYPE of the relevant target to staticlib on Release configuration and dylib for Debug configuration.
Add custom script that embed and sign the relevant framework only for Debug configuration.
Code Block LLVM ERROR: Function Import: link error clang: error: linker command failed with exit code 1 (use -v to see invocation)
and running clang with -v doesn't help...