Skip to content

Commit dd4d38f

Browse files
authored
Merge pull request #2359 from compnerd/staging-paths
bootstrap: check the new Foundation layout
2 parents 3c8fbec + 3dcd3a3 commit dd4d38f

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Utilities/bootstrap

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,10 @@ class llbuild(object):
584584
link_command.extend(
585585
["-Xlinker", "-rpath=$ORIGIN/../lib/swift/linux"])
586586
if self.args.foundation_path:
587-
link_command.extend(["-L", self.args.foundation_path])
587+
link_command.extend([
588+
"-L", self.args.foundation_path,
589+
"-L", os.path.join(self.args.foundation_path, "Foundation")
590+
])
588591
if self.args.libdispatch_build_dir:
589592
link_command.extend(['-L', self.args.libdispatch_build_dir,
590593
'-L', os.path.join(self.args.libdispatch_build_dir, 'lib'),
@@ -1199,7 +1202,11 @@ def main():
11991202

12001203
for module in ["Foundation", "FoundationNetworking", "FoundationXML"]:
12011204
# Add the library.
1202-
symlink_force(os.path.join(args.foundation_path, 'lib' + module + '.so'), libswiftdir)
1205+
for subdir in ['Foundation', '']:
1206+
path = os.path.join(args.foundation_path, subdir, 'lib{}.so'.format(module))
1207+
if os.path.exists(path):
1208+
symlink_force(path, libswiftdir)
1209+
break
12031210

12041211
# Add Foundation's swiftmodule.
12051212
for extension in [".swiftmodule", ".swiftdoc"]:

0 commit comments

Comments
 (0)