@@ -257,15 +257,11 @@ class Target(object):
257
257
258
258
if args .foundation_path :
259
259
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" ))
264
262
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" ))
269
265
if args .libdispatch_source_dir :
270
266
import_paths .append (args .libdispatch_source_dir )
271
267
if args .xctest_path :
@@ -1188,16 +1184,14 @@ def main():
1188
1184
build_flags .extend (create_versoning_args (args ))
1189
1185
1190
1186
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 )])
1193
1190
# Tell the linker where to look for XCTest, but autolinking
1194
1191
# knows to pass -lXCTest.
1195
1192
build_flags .extend (["-Xlinker" , "-L" , "-Xlinker" , args .foundation_path ])
1196
1193
# 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 ])
1201
1195
1202
1196
if args .xctest_path :
1203
1197
# Tell the linker where to look for XCTest, but autolinking
0 commit comments