File tree Expand file tree Collapse file tree 1 file changed +8
-20
lines changed Expand file tree Collapse file tree 1 file changed +8
-20
lines changed Original file line number Diff line number Diff line change @@ -117,23 +117,6 @@ _DEVELOPER_DIR_SYMLINKS = [
117117 "/var/db/xcode_select_link" ,
118118]
119119
120- def _swift_developer_lib_dir (platform_framework_dir ):
121- """Returns the directory containing extra Swift developer libraries.
122-
123- Args:
124- platform_framework_dir: The developer platform framework directory for
125- the current platform.
126-
127- Returns:
128- The directory containing extra Swift-specific development libraries and
129- swiftmodules.
130- """
131- return paths .join (
132- paths .dirname (paths .dirname (platform_framework_dir )),
133- "usr" ,
134- "lib" ,
135- )
136-
137120def _platform_developer_framework_dir (developer_dir , target_triple ):
138121 """Returns the Developer framework directory for the platform.
139122
@@ -294,11 +277,16 @@ def _swift_linkopts_cc_info(
294277 # Add the linker path to the directory containing the dylib with Swift
295278 # extensions for the XCTest module.
296279 if platform_developer_framework_dir :
297- linkopts .extend ([
298- "-L{}" .format (
299- _swift_developer_lib_dir (platform_developer_framework_dir ),
280+ swift_lib_dir_path = swift_developer_lib_dir ([
281+ struct (
282+ developer_path_label = "platform" ,
283+ path = platform_developer_framework_dir ,
300284 ),
301285 ])
286+ if swift_lib_dir_path :
287+ linkopts .extend ([
288+ "-L{}" .format (swift_lib_dir_path ),
289+ ])
302290
303291 return CcInfo (
304292 linking_context = cc_common .create_linking_context (
You can’t perform that action at this time.
0 commit comments