How is Swift toolchain used when building Swift from source code?

Hi everyone :wave:

I have a newbie question, and I hope people don't mind if I ask this here.

How is Swift toolchain used when building Swift from source code? And, is there any other dependencies when building Swift? Even in the first place, what is Swift toolchain?

I've been working on my pull request adding benchmarks to Swift Benchmark Suite on apple/swift. I built swift-macosx-x86_64 from the source code with Ninja and build-script on my machine. When I make some changes, I re-build the benchmark suite with ninja swift-benchmark-macosx-x86_64. I started my PR when Xcode 11 beta 1 was released. I built Swift with swift-DEVELOPMENT-SNAPSHOT-2019-06-06-a.xctoolchain at the time. Now when I re-build Swift, there Xcode 11 beta 4 as well as Xcode 11 beta 1 and Xcode 10.2 on my machine. Does it matter which Swift toolchain is selected for building Swift? Besides the toolchain, Xcode has the option for Command Line Tools configured by xcode-select. Does this affect Swift build as well?

Sorry my question is a little bit unorganized. I was wondering what things affect Swift build. Just only Swift toolchain? Command Line Tools as well? Anything else?

According to Marcin's blog post, Swift toolchain contains swift executable. Do we need to build Swift itself from the source code? :thinking:

It would be great if you could let me know how these things are related to each other. Thanks!

Terms of Service

Privacy Policy

Cookie Policy