Skip to content

Commit 8be09c9

Browse files
authored
Fix modules path for XCBuild (#7180)
When using XCBuild, we don't segment Swift modules into a "Modules" subdirectory, so we have to special case this during installation. This should fix the same issue as the revert in #7173
1 parent d2eb0ca commit 8be09c9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Utilities/bootstrap

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,9 @@ def install_dylib(args, library_name, install_dir, module_names):
449449
# Install the swiftmodule/swiftinterface and swiftdoc files for all the modules.
450450
for module in module_names:
451451
# If we're cross-compiling, we expect the .swiftmodule to be a directory that contains everything.
452-
if args.cross_compile_hosts:
452+
if args.cross_compile_hosts and re.match("macosx-", args.cross_compile_hosts):
453+
install_binary(args, module + ".swiftmodule", install_dir, ['Project', '*.swiftmodule'])
454+
elif args.cross_compile_hosts:
453455
install_binary(args, module + ".swiftmodule", install_dir, ['Project', '*.swiftmodule'], subpath="Modules")
454456
else:
455457
# Otherwise we have either a .swiftinterface or a .swiftmodule, plus a .swiftdoc.

0 commit comments

Comments
 (0)