Skip to content

Commit 823f245

Browse files
committed
bootstrap: update for foundation layout
Update the bootstrap script for the new Foundation build layout.
1 parent 5aa8f5b commit 823f245

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

Utilities/bootstrap

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -257,15 +257,11 @@ class Target(object):
257257

258258
if args.foundation_path:
259259
import_paths.append(args.foundation_path)
260-
import_paths.append(os.path.join(args.foundation_path,
261-
"usr/lib/swift/CoreFoundation"))
262-
import_paths.append(os.path.join(args.foundation_path,
263-
"usr/lib/swift"))
260+
other_args.extend(["-F", os.path.join(args.foundation_path, "CoreFoundation-prefix", "System", "Library", "Frameworks")])
261+
import_paths.append(os.path.join(args.foundation_path, "swift"))
264262
if args.libdispatch_build_dir:
265-
import_paths.append(os.path.join(args.libdispatch_build_dir,
266-
"src"))
267-
import_paths.append(os.path.join(args.libdispatch_build_dir,
268-
"src", "swift"))
263+
import_paths.append(os.path.join(args.libdispatch_build_dir, "src"))
264+
import_paths.append(os.path.join(args.libdispatch_build_dir, "src", "swift"))
269265
if args.libdispatch_source_dir:
270266
import_paths.append(args.libdispatch_source_dir)
271267
if args.xctest_path:
@@ -1188,16 +1184,14 @@ def main():
11881184
build_flags.extend(create_versoning_args(args))
11891185

11901186
if args.foundation_path:
1191-
core_foundation_path = os.path.join(
1192-
args.foundation_path, "usr", "lib", "swift")
1187+
build_flags.extend(["-Xswiftc", "-I{}".format(os.path.join(args.foundation_path, "swift"))])
1188+
core_foundation_path = os.path.join(args.foundation_path, "CoreFoundation-prefix", "System", "Library", "Frameworks")
1189+
build_flags.extend(["-Xswiftc", "-Xcc", "-Xswiftc", "-F{}".format(core_foundation_path)])
11931190
# Tell the linker where to look for XCTest, but autolinking
11941191
# knows to pass -lXCTest.
11951192
build_flags.extend(["-Xlinker", "-L", "-Xlinker", args.foundation_path])
11961193
# Add an RPATH, so that the tests can be run directly.
1197-
build_flags.extend(["-Xlinker", "-rpath", "-Xlinker",
1198-
args.foundation_path])
1199-
build_flags.extend(["-Xswiftc", "-I{}".format(args.foundation_path)])
1200-
build_flags.extend(["-Xswiftc", "-I{}".format(core_foundation_path)])
1194+
build_flags.extend(["-Xlinker", "-rpath", "-Xlinker", args.foundation_path])
12011195

12021196
if args.xctest_path:
12031197
# Tell the linker where to look for XCTest, but autolinking

0 commit comments

Comments
 (0)