Troubles building LLVM and swift (release) after OS upgrade

Yesterday I've dragged my feet to upgrading my machine to Mojave after master started to require Xcode 10.2-beta. OS and Xcode updates went without any issue. I've switched the default compiler to the latest:
xcode-select -s /Applications/
… but then my usual
swift-source$ ./swift/utils/build-script -R --no-assertions
failed with
fatal error: 'libxml/parser.h' file not found
An old post in the forums (libxml/parser.h not found?) suggested I needed to add --reconfigure to my usual invocation and it did help with unsticking the build…

My issue now is that the build has now ran out of disk space. It looks like the llvm build in release mode is now 17.4 GB. Previously it did only take about 1.5 GB… So I'm guessing some of the defaults have changed since last time I generated full configuration. I've been staring at build-script --help in despair — there's nothing about LLVM architectures...

How do I make it build only minimal x86-64 libs and tools required to working on swift locally on Mac?

Update: after getting through the LLVM, I still got stuck on the same error:

swift-source/swift/tools/swift-ide-test/XMLValidator.cpp:22:10: fatal error: 'libxml/parser.h' file not found
#include <libxml/parser.h>
1 error generated.

@blangmuir Can you help?

In the meantime, I've deleted the build directory and I am trying again with ./swift/utils/build-script -R --no-assertions --reconfigure --darwin-deployment-version-osx 10.14

I have no idea if that is normal or not; I only ever build with debug info. My RelWithDebInfo build of llvm is ~18 GB.

This sounds like a configuration issue to me. What SDK is being used during the build? The header should exist at <sdk>/usr/include/libxml2/libxml/parser.h.

This invocation did make it work in the end:

… and the resulting llvm-macosx-x86_64 is 1.56 GB :+1:

I guess this implies that some of the original defaults are failing with the latest build-script. On cursory look through the implementation I see some efforts to autodetect target from the platform, but my experience says it incorrectly(?) defaults to building all instead? Should I file a bug or is this new intended behavior?