[PATCH] D60974: Clang IFSO driver action.
Puyan Lotfi via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 23 11:49:13 PDT 2019
plotfi added a comment.
In D60974#1474777 <https://reviews.llvm.org/D60974#1474777>, @jakehehrlich wrote:
> In D60974#1474751 <https://reviews.llvm.org/D60974#1474751>, @plotfi wrote:
> > There are a few that I have in mind.
> > 1. -emit-ifso could be added to a build to produce .so files as part of a device SDK (where we don't want to ship the runnable bits in the SDK, we ship those on the device updates).
> This would require creating a linker for these files. Is this what you intend to do?
No, I do not intend to write any sort of linker in the classical sense. At most I'd be handling and merging symbol names from yaml files or possibly going from yaml -> elf .o -> .so. Weighing options.
>> 2. -emit-ifso could be added to whatever the existing set of build flags are to be run as a pre-build step to produce tapi-like .so files that break up build dependencies.
> How would this work? To be clear, this would happen at the same time that .o files are produced correct? The build graph would basically look the same but your new linking step would replace the original link step and there would be a pendent node for the original link step. This would not break up the build graph much at all save for the fact that we might imagine that this new link step would be much faster.
I was thinking that since -emit-ifso doesn't invoke the backend, it could be run as a pre-build step. Then during the build, linking is done against the ifso stubs that are already generated instead of the actual .so files.
>> 3. -emit-ifso -fvisibility=hidden could added to the invocation to disallow usage of non-public apis.
> Can you be more specific? This is already how the actual modules do this today so what is the advantage here.
I believe modules produce much more data than what I am doing here. What I am doing is trying to use visibility semantics to produce the bare minimum ELF and bare minimum symbols while still being able to link with the resulting .so file.
CHANGES SINCE LAST ACTION
More information about the cfe-commits