Error building compiler due to Foundation

So, I have been trying to run some tests and I am building the compiler with the following flags: -r -T --skip-build-benchmarks, however it fails:

[1029/1216][ 84%][1006.494s] Compiling /Users/suyashsrijan/Documents/swift-src/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/stdlib/public/core/macosx/x86_64/Swift.o
ninja: build stopped: subcommand failed.
./utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting

and it fails on:

FAILED: lib/swift/macosx/x86_64/Foundation.swiftmodule lib/swift/macosx/x86_64/Foundation.swiftdoc lib/swift/macosx/x86_64/Foundation.swiftinterface
cd /Users/suyashsrijan/Documents/swift-src/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/stdlib/public/Darwin/Foundation && /usr/local/Cellar/cmake/3.12.4/bin/cmake -E remove -f /Users/suyashsrijan/Documents/swift-src/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/./lib/swift/macosx/x86_64/Foundation.swiftmodule /Users/suyashsrijan/Documents/swift-src/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/./lib/swift/macosx/x86_64/Foundation.swiftdoc /Users/suyashsrijan/Documents/swift-src/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/./lib/swift/macosx/x86_64/Foundation.swiftinterface && /usr/bin/python /Users/suyashsrijan/Documents/swift-src/swift/utils/line-directive @/Users/suyashsrijan/Documents/swift-src/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/stdlib/public/Darwin/Foundation/EDgmP.txt -- /Users/suyashsrijan/Documents/swift-src/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/./bin/swiftc -emit-module -o /Users/suyashsrijan/Documents/swift-src/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/./lib/swift/macosx/x86_64/Foundation.swiftmodule -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -target x86_64-apple-macosx10.9 -resource-dir /Users/suyashsrijan/Documents/swift-src/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/./lib/swift -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/../../../Developer/Library/Frameworks -O -g -D INTERNAL_CHECKS_ENABLED -D SWIFT_ENABLE_RUNTIME_FUNCTION_COUNTERS -I /Users/suyashsrijan/Documents/swift-src/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/./lib/swift/macosx/x86_64 -module-cache-path /Users/suyashsrijan/Documents/swift-src/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/./module-cache -no-link-objc-runtime -Xfrontend -enable-resilience -Xfrontend -enable-sil-ownership -Xfrontend -enable-mandatory-semantic-arc-opts -Xfrontend -enforce-exclusivity=unchecked -swift-version 5 -swift-version 4 -autolink-force-load -warn-swift3-objc-inference-complete -Xfrontend -verify-syntax-tree -Xllvm -sil-inline-generics -Xllvm -sil-partial-specialization -swift-version 5 -warn-implicit-overrides -Fsystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/PrivateFrameworks/ -module-link-name swiftFoundation -force-single-frontend-invocation -parse-as-library -emit-parseable-module-interface @/Users/suyashsrijan/Documents/swift-src/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/stdlib/public/Darwin/Foundation/EDgmP.txt

There are a bunch of warnings related to Hashable but I am not sure if that's the reason behind the failure:

warning: 'Hashable.hashValue' is deprecated as a protocol requirement; conform type 'UUID' to 'Hashable' by implementing 'hash(into:)' instead

I tried doing a clean build and re-checking out all the sources, but no luck. It was working before :thinking:

Does anyone have any ideas why the build could be failing? Is there a log somewhere I can take a look at to check the exact error?

Nevermind, I found the reason why. Mods - please close this thread.