Since 66de359836e375a070a6edde29c22cc5754c5e90, .dylib files are packaged into the target .app file. However it seems other unnecessary files with CcInfo are also packaged.
For example, Frameworks/Myfwk.framework/Myfwk are also packaged as Frameworks/Myfwk.
Frameworks/generated_dynamic_macos_xcframework is packaged in addition to Frameworks/generated_dynamic_macos_xcframework.framework/generated_dynamic_macos_xcframework.
Since 66de359836e375a070a6edde29c22cc5754c5e90,
.dylib
files are packaged into the target.app
file. However it seems other unnecessary files withCcInfo
are also packaged.For example,
Frameworks/Myfwk.framework/Myfwk
are also packaged asFrameworks/Myfwk
.Steps to reproduce the issue
Actual behavior
Frameworks/generated_dynamic_macos_xcframework
is packaged in addition toFrameworks/generated_dynamic_macos_xcframework.framework/generated_dynamic_macos_xcframework
.Expected behavior
Possible solution
This issue can be addressed by making
cc_info_dylibs_partial
handle only.dylib
files.https://github.com/bazelbuild/rules_apple/blob/master/apple/internal/partials/cc_info_dylibs.bzl#L35
Additional contexts
The current version does not work with frameworks of universal binary (e.g. QtCore). Because:
cc_info_dylibs_partial
addes multiple items to bundle_files (e.g. QtCore/x86, QtCore/arm64).processor
fails as multiple files are placed in the bundle.Here's an actual example