@@ -135,6 +135,11 @@ def export_sdk(tgt, swift_source_tree, swift_build_tree):
135
135
ignore = shutil .ignore_patterns ('CMakeLists.txt' ))
136
136
137
137
138
+ def export_toolchain (tgt , toolchain_dir ):
139
+ print ("assembling toolchain" )
140
+ shutil .copytree (toolchain_dir , tgt )
141
+
142
+
138
143
def export_stdlibs (exported_dir , swift_build_tree ):
139
144
ext = 'dylib'
140
145
platform = 'linux' if get_platform () == 'linux' else 'macosx'
@@ -189,6 +194,7 @@ def main(opts):
189
194
os .mkdir (tmp )
190
195
llvm_build_tree = next (opts .build_tree .glob ("llvm-*" ))
191
196
swift_build_tree = next (opts .build_tree .glob ("swift-*" ))
197
+ toolchain_dir = next (opts .build_tree .glob ("toolchain-*/codeql-toolchain" ))
192
198
earlyswiftsyntax_build_tree = next (opts .build_tree .glob ("earlyswiftsyntax-*" ))
193
199
configured = configure_dummy_project (tmp , prefixes = [llvm_build_tree , swift_build_tree ,
194
200
earlyswiftsyntax_build_tree / "cmake" / "modules" ])
@@ -199,6 +205,7 @@ def main(opts):
199
205
export_libs (exported , libs , swift_build_tree )
200
206
export_headers (exported , opts .swift_source_tree , llvm_build_tree , swift_build_tree )
201
207
export_sdk (exported / "sdk" , opts .swift_source_tree , swift_build_tree )
208
+ export_toolchain (exported / "toolchain" , toolchain_dir )
202
209
203
210
zip_dir (exported , opts .output )
204
211
0 commit comments