[swift-dev] Fwd: History of build-script, build-script-impl, and CMake?

Brian Gesiak modocache at gmail.com
Fri Sep 8 15:39:25 CDT 2017

Oops, sent this off-list accidentally.

---------- Forwarded message ----------
From: Brian Gesiak <modocache at gmail.com>
Date: Fri, Sep 8, 2017 at 3:38 PM
Subject: Re: [swift-dev] History of build-script, build-script-impl, and CMake?
To: Jordan Rose <jordan_rose at apple.com>

Great, thanks for the detailed response, Jordan!

On Fri, Sep 8, 2017 at 12:58 PM, Jordan Rose <jordan_rose at apple.com> wrote:
> 5/6. This is actually a misdirection! [5] is when build-script appeared, as
> part of a big push to get everyone building using the same tool. All the
> buildbots had their presets recorded in the build-presets file, which was
> the biggest win: if your own configuration didn't reproduce something, you
> didn't have to crawl int Jenkins to figure out what was different. And the
> Python was, in theory, much more maintainable than the increasingly-esoteric
> shell code used in build-script-impl (formerly buildbot-script.sh). That's
> why we had the task to migrate everything into Python, even though we never
> quite managed it.
> The trouble was that we also had a bunch of Apple-internal configuration
> mixed in here. Rather than try to separate out the Apple and non-Apple parts
> in the commit log, we just removed it from the SVN history, took out the
> Apple parts, and then stuck in back in wholesale. That's [6].

Ah, I see! So that's why [5] included the utils/SwiftBuildSupport.py
Python helpers, but not the Python utils/build-script itself. Thanks
for the info!

> (also, "Garland" ;-) )

Oops! Sorry, I knew this in my head, but my hands mistyped!

> So your guesses are all pretty much on the nose. The other thing that's
> cemented build-script and build-script-impl, though, is that they handle
> building multiple projects, even those with non-LLVMish build systems.
> (There's long been an advantage for Xcode users to build LLVM/Clang and
> Swift separately, but for things like swiftpm and swift-corelibs-foundation
> we'd never have a chance. And even LLDB is only just recently building like
> the other LLVM projects, if I remember correctly.)

This is a good point, thanks. It sounds like the goals are:

1. To eliminate the shellscript utils/build-script-impl, since it
provides no benefit over 100% Python utils/build-script.
2. To migrate as many of the non-CMake builds over to CMake. Thanks to
CMake support having been added to corelibs-libdispatch [1], I guess
corelibs-foundation could be built with CMake as well...?

- Brian Gesiak

[1] https://github.com/apple/swift-corelibs-libdispatch/pull/196

More information about the swift-dev mailing list