-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add force load libs to CcInfo linking context in Bazel 7 #811
Add force load libs to CcInfo linking context in Bazel 7 #811
Conversation
78e3354
to
31e11cf
Compare
a42c44a
to
7e5570a
Compare
After fixing the force_load issue we have another issue with
for all the linking on non MaxOSX targets This will be addressed separately in another PR |
8979d1d
to
c459bdf
Compare
8709099
to
34e7a7f
Compare
…ework_provider_flag
ec7779c
to
ed7b03d
Compare
ad4e0e9
to
04a2334
Compare
04a2334
to
86a4f3d
Compare
@@ -121,7 +163,9 @@ def _framework_middleman(ctx): | |||
|
|||
framework_middleman = rule( | |||
implementation = _framework_middleman, | |||
attrs = dicts.add(split_transition_rule_attrs, { | |||
fragments = ["cpp"], | |||
toolchains = ["@bazel_tools//tools/cpp:toolchain_type"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update this to use use_cpp_toolchain
instead, similarly to what i did in #845
@@ -121,7 +163,9 @@ def _framework_middleman(ctx): | |||
|
|||
framework_middleman = rule( | |||
implementation = _framework_middleman, | |||
attrs = dicts.add(split_transition_rule_attrs, { | |||
fragments = ["cpp"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is fragments
here needed/do we need objc as well?
@@ -37,7 +37,7 @@ def _merge_objc_providers(providers, transitive = []): | |||
) | |||
return apple_common.new_objc_provider(**objc_provider_fields) | |||
|
|||
def _merge_dynamic_framework_providers(dynamic_framework_providers): | |||
def _merge_dynamic_framework_providers(dynamic_framework_providers, supports_cc_info_in_dynamic_framework_provider): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: lets just check for bazel 7 here directly like we do elsewhere, it makes it easier to remove in the future than deleting the param
@@ -188,9 +237,13 @@ def _dep_middleman(ctx): | |||
cc_providers = [] | |||
avoid_libraries = {} | |||
|
|||
_is_bazel_7 = not hasattr(apple_common, "apple_crosstool_transition") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mind updating all usage of this to use utils.bzl
is_bazel_7
, i landed that recently.
Rebased and fixed merge commit for bazel-ios#811
Rebased and fixed merge commit for bazel-ios#811 (cherry picked from commit fb395f9)
Rebased and fixed merge commit for bazel-ios#811 (cherry picked from commit fb395f9)
Merged in #850 |
Issue
When we build an executable e.g.
We get a linker error e.g.
Disgnostic
The linker args/flags file, e.g.
iOS-14.0-AppHost_bin-2.params
file, is missing the -force_load of the forced linked libs in the executable e.g.Resource
Following guide from here
Overall effort here
Example migrations for rules_apple here
Migration plan
//rules:migrates_cc_info_linking_info