@@ -76,11 +76,17 @@ else:
7676 else :
7777 swift_exec .extend ([
7878 '-Xlinker' , '-rpath' , '-Xlinker' , foundation_dir ,
79- '-Xlinker' , '-rpath' , '-Xlinker' , os .path .join (foundation_dir , 'Foundation' )
79+ '-Xlinker' , '-rpath' , '-Xlinker' , os .path .join (foundation_dir , 'Foundation' ),
80+ '-Xlinker' , '-rpath' , '-Xlinker' , os .path .join (foundation_dir , 'Sources' , 'Foundation' ),
81+ '-Xlinker' , '-rpath' , '-Xlinker' , os .path .join (foundation_dir , 'Sources' , 'FoundationNetworking' ),
82+ '-Xlinker' , '-rpath' , '-Xlinker' , os .path .join (foundation_dir , 'Sources' , 'FoundationXML' ),
8083 ])
8184 swift_exec .extend ([
8285 '-L' , foundation_dir ,
8386 '-L' , os .path .join (foundation_dir , 'Foundation' ),
87+ '-L' , os .path .join (foundation_dir , 'Sources' , 'Foundation' ),
88+ '-L' , os .path .join (foundation_dir , 'Sources' , 'FoundationNetworking' ),
89+ '-L' , os .path .join (foundation_dir , 'Sources' , 'FoundationXML' ),
8490 '-I' , foundation_dir ,
8591 '-I' , os .path .join (foundation_dir , 'swift' ),
8692 '-Xcc' , '-F' , '-Xcc' , foundation_dir ,
@@ -103,7 +109,15 @@ else:
103109 '-L' , os .path .join (libdispatch_build_dir , 'src' ),
104110 ])
105111
106- config .environment ['LD_LIBRARY_PATH' ] = "{}:{}/src:{}:{}" .format (libdispatch_build_dir , libdispatch_build_dir , foundation_dir , os .path .join (foundation_dir , 'Foundation' ))
112+ config .environment ['LD_LIBRARY_PATH' ] = ":" .join ([
113+ libdispatch_build_dir ,
114+ os .path .join (libdispatch_build_dir , 'src' ),
115+ foundation_dir ,
116+ os .path .join (foundation_dir , 'Foundation' ),
117+ os .path .join (foundation_dir , 'Sources' , 'Foundation' ),
118+ os .path .join (foundation_dir , 'Sources' , 'FoundationNetworking' ),
119+ os .path .join (foundation_dir , 'Sources' , 'FoundationXML' ),
120+ ])
107121
108122# Having prepared the swiftc command, we set the substitution.
109123config .substitutions .append (('%{swiftc}' , ' ' .join (swift_exec )))
0 commit comments