@@ -598,12 +598,14 @@ The xcodeproj rule requires {} rules to have a single library dep. {} has {}.\
598
598
)
599
599
600
600
cc_info = target [CcInfo ] if CcInfo in target else None
601
+ objc = target [apple_common .Objc ] if apple_common .Objc in target else None
601
602
_process_defines (
602
603
cc_info = cc_info ,
603
604
build_settings = build_settings ,
604
605
)
605
606
search_paths = _process_search_paths (
606
607
cc_info = cc_info ,
608
+ objc = objc ,
607
609
opts_search_paths = opts_search_paths ,
608
610
)
609
611
@@ -701,9 +703,9 @@ def _process_library_target(*, ctx, target, transitive_infos):
701
703
transitive_infos = transitive_infos ,
702
704
)
703
705
linker_inputs = _get_linker_inputs (cc_info = target [CcInfo ])
704
- static_framework_files = _get_static_framework_files ( objc = (
705
- target [apple_common .Objc ] if apple_common .Objc in target else None
706
- ) )
706
+
707
+ objc = target [apple_common .Objc ] if apple_common .Objc in target else None
708
+ static_framework_files = _get_static_framework_files ( objc = objc )
707
709
708
710
cpp = ctx .fragments .cpp
709
711
@@ -767,6 +769,7 @@ def _process_library_target(*, ctx, target, transitive_infos):
767
769
)
768
770
search_paths = _process_search_paths (
769
771
cc_info = cc_info ,
772
+ objc = objc ,
770
773
opts_search_paths = opts_search_paths ,
771
774
)
772
775
@@ -893,6 +896,7 @@ def _process_resource_target(*, ctx, target, transitive_infos):
893
896
894
897
search_paths = _process_search_paths (
895
898
cc_info = None ,
899
+ objc = None ,
896
900
opts_search_paths = create_opts_search_paths (
897
901
quote_includes = [],
898
902
includes = [],
@@ -957,13 +961,14 @@ def _process_non_xcode_target(*, ctx, target, transitive_infos):
957
961
The value returned from `_processed_target()`.
958
962
"""
959
963
if CcInfo in target :
960
- linker_inputs = _get_linker_inputs (cc_info = target [CcInfo ])
964
+ cc_info = target [CcInfo ]
965
+ linker_inputs = _get_linker_inputs (cc_info = cc_info )
961
966
else :
967
+ cc_info = None
962
968
linker_inputs = depset ()
963
969
964
- static_framework_files = _get_static_framework_files (objc = (
965
- target [apple_common .Objc ] if apple_common .Objc in target else None
966
- ))
970
+ objc = target [apple_common .Objc ] if apple_common .Objc in target else None
971
+ static_framework_files = _get_static_framework_files (objc = objc )
967
972
968
973
attrs_info = target [InputFileAttributesInfo ]
969
974
resource_owner = None
@@ -992,7 +997,8 @@ def _process_non_xcode_target(*, ctx, target, transitive_infos):
992
997
transitive_infos = transitive_infos ,
993
998
),
994
999
search_paths = _process_search_paths (
995
- cc_info = target [CcInfo ] if CcInfo in target else None ,
1000
+ cc_info = cc_info ,
1001
+ objc = objc ,
996
1002
opts_search_paths = create_opts_search_paths (
997
1003
quote_includes = [],
998
1004
includes = [],
@@ -1134,6 +1140,7 @@ def _skip_target(*, target, transitive_infos):
1134
1140
),
1135
1141
search_paths = _process_search_paths (
1136
1142
cc_info = None ,
1143
+ objc = None ,
1137
1144
opts_search_paths = create_opts_search_paths (
1138
1145
quote_includes = [],
1139
1146
includes = [],
@@ -1210,18 +1217,11 @@ def _process_defines(
1210
1217
def _process_search_paths (
1211
1218
* ,
1212
1219
cc_info ,
1220
+ objc ,
1213
1221
opts_search_paths ):
1214
1222
search_paths = {}
1215
1223
if cc_info :
1216
1224
compilation_context = cc_info .compilation_context
1217
- set_if_true (
1218
- search_paths ,
1219
- "framework_includes" ,
1220
- [
1221
- file_path_to_dto (parsed_file_path (path ))
1222
- for path in compilation_context .framework_includes .to_list ()
1223
- ],
1224
- )
1225
1225
set_if_true (
1226
1226
search_paths ,
1227
1227
"quote_includes" ,
@@ -1240,6 +1240,24 @@ def _process_search_paths(
1240
1240
opts_search_paths .includes )
1241
1241
],
1242
1242
)
1243
+
1244
+ if objc :
1245
+ framework_paths = depset (
1246
+ transitive = [
1247
+ objc .static_framework_paths ,
1248
+ objc .dynamic_framework_paths ,
1249
+ ],
1250
+ )
1251
+
1252
+ set_if_true (
1253
+ search_paths ,
1254
+ "framework_includes" ,
1255
+ [
1256
+ file_path_to_dto (parsed_file_path (path ))
1257
+ for path in framework_paths .to_list ()
1258
+ ],
1259
+ )
1260
+
1243
1261
return search_paths
1244
1262
1245
1263
def _farthest_parent_file_path (file , extension ):
0 commit comments