Skip to content

Commit

Permalink
Fix building with Xcode 12.5 (facebook#2622)
Browse files Browse the repository at this point in the history
* Fix building in Xcode 12.4+

* Update libswiftCompatibility from 50 to 51

Co-authored-by: Anton Pomozov <[email protected]>
  • Loading branch information
pomozoff and Anton Pomozov authored May 18, 2021
1 parent ddf2941 commit b3b2934
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2549,7 +2549,7 @@ private ImmutableMap<String, String> getFrameworkAndLibrarySearchPathConfigs(

librarySearchPaths.add("$DT_TOOLCHAIN_DIR/usr/lib/swift/$PLATFORM_NAME");
if (options.shouldLinkSystemSwift()) {
librarySearchPaths.add("$DT_TOOLCHAIN_DIR/usr/lib/swift-5.0/$PLATFORM_NAME");
librarySearchPaths.add("$DT_TOOLCHAIN_DIR/usr/lib/swift-5.2/$PLATFORM_NAME");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1863,7 +1863,7 @@ private ImmutableMap<String, String> getFrameworkAndLibrarySearchPathConfigs(
// folder changes in a future release this can be revisited.
librarySearchPaths.add("$DT_TOOLCHAIN_DIR/usr/lib/swift/$PLATFORM_NAME");
if (options.shouldLinkSystemSwift()) {
librarySearchPaths.add("$DT_TOOLCHAIN_DIR/usr/lib/swift-5.0/$PLATFORM_NAME");
librarySearchPaths.add("$DT_TOOLCHAIN_DIR/usr/lib/swift-5.2/$PLATFORM_NAME");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ public static Optional<Path> findSwiftCompatibilityRuntimePath(
}

// Currently Xcode includes swift and swift-5.0 directories, and each contains different
// contents. Specifically, swift/platform contains the libswiftCompatibility50 and
// contents. Specifically, swift/platform contains the libswiftCompatibility51 and
// libswiftCompatibilityDynamicReplacements libraries which are *also* necessary.
Path swiftRuntimePath = toolchainPath.resolve("usr/lib/swift").resolve(platformName);
String libSwiftCompatibilityLibraryName = "libswiftCompatibility50.a";
String libSwiftCompatibilityLibraryName = "libswiftCompatibility51.a";
LOG.debug("Searching for swift compatibility toolchain in %s", toolchainPath.toString());
if (Files.exists(swiftRuntimePath.resolve(libSwiftCompatibilityLibraryName))) {
LOG.debug("Found swift compatibility toolchain at %s", toolchainPath.toString());
Expand Down

0 comments on commit b3b2934

Please sign in to comment.