Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
include dep in symlink tree if lib output style is shared
Summary: NOTE: `runtime_dependency_handling` hasn't been used yet, so this will not impact existing builds. As discussed previously (see bottom of diff summary), compilation is broken under some scenarios when `runtime_dependency_handling = "symlink"`, which will prevent this setting from being rolled out unconditionally (or at least more broadly) across arvr. I think I figured out why and how to fix it. Looking at this table (the cells are the lib_output_style): -------------------------------------------------------------- | preferred_linkage | link_strategy | | |----------------------------------------| | | static | static_pic | shared | -------------------------------------------------------------| | static | *archive | *pic_archive | *pic_archive | | shared | shared | shared | shared | | any | *archive | *pic_archive | shared | -------------------------------------------------------------- I think this is the behavior we want: ``` if lib_output_style is shared: include all shlibs in symlink tree ``` Whereas we are are currently doing: ``` if runtime_dependency_handling is symlink or link_strategy is shared: include all shlibs in symlink tree ``` This row is problematic under the current implementation: -------------------------------------------------------------- | preferred_linkage | link_strategy | | |----------------------------------------| | | static | static_pic | shared | -------------------------------------------------------------| | any | *archive | *pic_archive | shared | -------------------------------------------------------------- If link_strategy is *not* shared, then the archive or pic_archive version of the library is linked. If runtime_dependency_handling is set to symlink mode, then the shared library will *also* be included in the symlink tree, which seems to break the compilation. To fix this, we can look at the lib_output_style of each dependency to determine what is included in the symlink tree instead of using just the link strategy. Reviewed By: jtbraun Differential Revision: D67610026 fbshipit-source-id: f44da42372197ed3e6f23b9cb7dd390d57ffd7a4
- Loading branch information