bazelbuild / rules_apple

Bazel rules to build apps for Apple platforms.
Apache License 2.0
512 stars 269 forks source link

Bazel 7: Linking actions missing`-framework` flags for framework imports #2427

Closed chiragramani closed 8 months ago

chiragramani commented 8 months ago

Repro: bazel aquery //examples/ios/HelloWorldSwift:UnitTests.__internal__.__test_bundle rules_apple-master 2.zip

-Fexamples/ios/HelloWorldSwift/ExampleFramework.xcframework/ios-arm64_x86_64-simulator \
-framework \
Lottie \

is present when building with Bazel 6.x.x but not present with Bazel 7.x.x(tested on Bazel 7.1.0rc2).

The builds are successfully finishing, but I'm uncertain whether this is the anticipated behavior. Could any adjustments be required, considering this might be linked to https://github.com/bazelbuild/bazel/issues/19000?

bazel6aquery.txt bazel7aquery.txt

brentleyjones commented 8 months ago

This is expected as part of the migration away from ObjCProvider. The executables of frameworks are listed directly in the linkopts now (you might notice they use the mangled form as well).

chiragramani commented 8 months ago

This makes sense. Appreciate you looking into it @brentleyjones. I am closing this as it's not an issue.