forked from colemancda/swift-armv7
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sh
executable file
·45 lines (36 loc) · 976 Bytes
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
set -e
source swift-define
if [[ $OSTYPE == 'darwin'* ]]; then
echo "Install macOS build dependencies"
./setup-mac.sh
fi
# Fetch and patch sources
if [ -z $SKIP_FETCH_SOURCES ]; then
./fetch-sources.sh
fi
./fetch-binaries.sh
# Generate Xcode toolchain
if [[ $OSTYPE == 'darwin'* && ! -d "$XCTOOLCHAIN" ]]; then
mkdir -p $XCTOOLCHAIN
./generate-xcode-toolchain-impl.sh /tmp/ ./downloads/${SWIFT_VERSION}-osx.pkg $INSTALL_TAR
cp -rf /tmp/cross-toolchain/swift-armv7.xctoolchain/* $XCTOOLCHAIN/
fi
# Cleanup previous build
rm -rf $STAGING_DIR/usr/lib/swift*
# Build LLVM
./build-llvm.sh
# Build Swift
./build-swift-stdlib.sh
./build-dispatch.sh
./build-foundation.sh
./build-xctest.sh
# NOTE: Swift-testing is disabled in 6.1 since it fails to compile
if [[ $SWIFT_VERSION == *"6.0"* ]]; then
./build-swift-testing.sh
fi
# Archive
./build-tar.sh
# Cross compile test package
./generate-swiftpm-toolchain.sh
./build-swift-hello.sh