Skip to content

Commit a9aaadb

Browse files
committed
Revert accidental check in
I included too much in here accidentally and I want to add it to my other PR to make it more clear for future git blames This partially reverts commit bfd1767.
1 parent bfd1767 commit a9aaadb

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

apple/internal/apple_xcframework_import.bzl

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -183,23 +183,20 @@ def _get_xcframework_library_from_paths(*, target_triplet, xcframework):
183183
if not library_identifier:
184184
return None
185185

186-
def _matches_library(file):
187-
return library_identifier in file.short_path.split("/")
188-
189186
files = xcframework.files_by_category
190-
binaries = [f for f in files.binary_imports if _matches_library(f)]
191-
framework_imports = [f for f in files.bundling_imports if _matches_library(f)]
192-
headers = [f for f in files.header_imports if _matches_library(f)]
193-
module_maps = [f for f in files.module_map_imports if _matches_library(f)]
187+
binaries = [f for f in files.binary_imports if library_identifier in f.short_path]
188+
framework_imports = [f for f in files.bundling_imports if library_identifier in f.short_path]
189+
headers = [f for f in files.header_imports if library_identifier in f.short_path]
190+
module_maps = [f for f in files.module_map_imports if library_identifier in f.short_path]
194191
swiftmodules = [
195192
f
196193
for f in files.swift_module_imports
197-
if _matches_library(f) and
194+
if library_identifier in f.short_path and
198195
f.basename.startswith(target_triplet.architecture)
199196
]
200197

201198
framework_dirs = [f.dirname for f in binaries]
202-
framework_files = [f for f in xcframework.files if _matches_library(f)]
199+
framework_files = [f for f in xcframework.files if library_identifier in f.short_path]
203200

204201
includes = []
205202
framework_includes = []

0 commit comments

Comments
 (0)