├── clang ├── lldb ├── llvm ├── libcxx ├── compiler-rt ├── clang-tools-extra ├── .gitignore ├── README.md ├── azure-pipelines.yml ├── mac-azure-pipelines.yml ├── ci-build-mac.sh ├── ci-build.sh └── .gitmodules /clang: -------------------------------------------------------------------------------- 1 | llvm-project/clang -------------------------------------------------------------------------------- /lldb: -------------------------------------------------------------------------------- 1 | llvm-project/lldb -------------------------------------------------------------------------------- /llvm: -------------------------------------------------------------------------------- 1 | llvm-project/llvm -------------------------------------------------------------------------------- /libcxx: -------------------------------------------------------------------------------- 1 | llvm-project/libcxx -------------------------------------------------------------------------------- /compiler-rt: -------------------------------------------------------------------------------- 1 | llvm-project/compiler-rt -------------------------------------------------------------------------------- /clang-tools-extra: -------------------------------------------------------------------------------- 1 | llvm-project/clang-tools-extra -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | .vscode 3 | icu_out 4 | wasi-sdk 5 | wasi-sdk.tar.gz 6 | icu.tar.xz 7 | .DS_Store 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Build scripts for SwiftWasm. 2 | 3 | Ubuntu 16.04 build: 4 | 5 | [![Build Status](https://dev.azure.com/swiftwasm/swiftwasm-sdk/_apis/build/status/swiftwasm.swiftwasm-sdk?branchName=master)](https://dev.azure.com/swiftwasm/swiftwasm-sdk/_build/latest?definitionId=3&branchName=master) 6 | 7 | macOS 10.14 build: 8 | 9 | [![Build Status](https://dev.azure.com/swiftwasm/swiftwasm-sdk/_apis/build/status/swiftwasm.swiftwasm-sdk-mac?branchName=master)](https://dev.azure.com/swiftwasm/swiftwasm-sdk/_build/latest?definitionId=4&branchName=master) 10 | -------------------------------------------------------------------------------- /azure-pipelines.yml: -------------------------------------------------------------------------------- 1 | trigger: 2 | - master 3 | 4 | jobs: 5 | - job: Build 6 | timeoutInMinutes: 0 7 | pool: 8 | vmImage: 'Ubuntu-16.04' 9 | steps: 10 | - script: | 11 | ./ci-build.sh 12 | displayName: 'ci-build' 13 | timeoutInMinutes: 0 14 | - task: PublishBuildArtifacts@1 15 | inputs: 16 | pathtoPublish: $(Build.ArtifactStagingDirectory) 17 | artifactName: swiftwasm-sdk 18 | - task: GitHubRelease@0 19 | inputs: 20 | gitHubConnection: github-release 21 | tagSource: manual 22 | tag: $(Build.BuildNumber).linux 23 | assets: | 24 | $(Build.ArtifactStagingDirectory)/* 25 | -------------------------------------------------------------------------------- /mac-azure-pipelines.yml: -------------------------------------------------------------------------------- 1 | trigger: 2 | - master 3 | 4 | jobs: 5 | - job: Build 6 | timeoutInMinutes: 0 7 | pool: 8 | vmImage: 'macos-10.14' 9 | steps: 10 | - script: | 11 | ./ci-build-mac.sh 12 | displayName: 'ci-build' 13 | timeoutInMinutes: 0 14 | - task: PublishBuildArtifacts@1 15 | inputs: 16 | pathtoPublish: $(Build.ArtifactStagingDirectory) 17 | artifactName: swiftwasm-sdk-mac 18 | - task: GitHubRelease@0 19 | inputs: 20 | gitHubConnection: github-release 21 | tagSource: manual 22 | tag: $(Build.BuildNumber).mac 23 | assets: | 24 | $(Build.ArtifactStagingDirectory)/* 25 | -------------------------------------------------------------------------------- /ci-build-mac.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # On Mac, we don't build Stdlib, just the compiler, since macOS doesn't support cross compiling for non-Darwin targets. 3 | set -e 4 | sourcedir="$PWD" 5 | 6 | sudo xcode-select --switch /Applications/Xcode_11.1.app/Contents/Developer 7 | # install dependencies 8 | brew install ninja llvm 9 | # start build 10 | cd swift 11 | utils/build-script --release \ 12 | --llvm-targets-to-build "X86;WebAssembly" \ 13 | --llvm-max-parallel-lto-link-jobs 1 --swift-tools-max-parallel-lto-link-jobs 1 \ 14 | --stdlib-deployment-targets "macosx-x86_64" \ 15 | --extra-cmake-options="-DSWIFT_WASM_WASI_SDK_PATH=/usr/local/opt/llvm" \ 16 | --install-swift \ 17 | --install-prefix="/opt/swiftwasm-sdk" \ 18 | --install-destdir="$sourcedir/install" \ 19 | --installable-package="$sourcedir/swiftwasm-mac.tar.gz" 20 | "$@" 21 | # copy the result 22 | cp "$sourcedir/swiftwasm-mac.tar.gz" "$BUILD_ARTIFACTSTAGINGDIRECTORY/" 23 | 24 | -------------------------------------------------------------------------------- /ci-build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | sourcedir="$PWD" 4 | # install dependencies 5 | sudo apt-get update 6 | sudo apt-get install apt-transport-https ca-certificates gnupg \ 7 | software-properties-common wget git ninja-build clang python uuid-dev \ 8 | libicu-dev icu-devtools libbsd-dev libedit-dev libxml2-dev libsqlite3-dev \ 9 | swig libpython-dev libncurses5-dev pkg-config libblocksruntime-dev \ 10 | libcurl4-openssl-dev systemtap-sdt-dev tzdata rsync 11 | # install latest cmake 12 | sudo rm /usr/local/bin/cmake 13 | wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | sudo apt-key add - 14 | sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ xenial main' 15 | sudo apt-get update 16 | sudo apt-get install cmake 17 | # install the WASI sdk 18 | wget -O wasisdk.deb "https://github.com/swiftwasm/wasi-sdk/releases/download/20190421.6/wasi-sdk_3.19gefb17cb478f9.m_amd64.deb" 19 | sudo dpkg -i wasisdk.deb 20 | # download ICU 21 | wget -O icu.tar.xz "https://github.com/swiftwasm/icu4c-wasi/releases/download/20190421.3/icu4c-wasi.tar.xz" 22 | tar xf icu.tar.xz 23 | # start build 24 | cd swift 25 | utils/build-script --release --wasm \ 26 | --llvm-targets-to-build "X86;WebAssembly" \ 27 | --llvm-max-parallel-lto-link-jobs 1 --swift-tools-max-parallel-lto-link-jobs 1 \ 28 | --wasm-wasi-sdk "/opt/wasi-sdk" \ 29 | --wasm-icu-uc "todo" \ 30 | --wasm-icu-uc-include "$sourcedir/icu_out/include" \ 31 | --wasm-icu-i18n "todo" \ 32 | --wasm-icu-i18n-include "todo" \ 33 | --wasm-icu-data "todo" \ 34 | --build-swift-static-stdlib \ 35 | --install-swift \ 36 | --install-prefix="/opt/swiftwasm-sdk" \ 37 | --install-destdir="$sourcedir/install" \ 38 | --installable-package="$sourcedir/swiftwasm.tar.gz" 39 | # copy the result 40 | cp "$sourcedir/swiftwasm.tar.gz" "$BUILD_ARTIFACTSTAGINGDIRECTORY/" 41 | 42 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "swift"] 2 | path = swift 3 | url = https://github.com/swiftwasm/swift.git 4 | branch = swiftwasm 5 | [submodule "cmark"] 6 | path = cmark 7 | url = https://github.com/apple/swift-cmark.git 8 | branch = master 9 | [submodule "llbuild"] 10 | path = llbuild 11 | url = https://github.com/apple/swift-llbuild.git 12 | branch = master 13 | [submodule "swiftpm"] 14 | path = swiftpm 15 | url = https://github.com/apple/swift-package-manager.git 16 | branch = master 17 | [submodule "swift-syntax"] 18 | path = swift-syntax 19 | url = https://github.com/apple/swift-syntax.git 20 | branch = master 21 | [submodule "swift-stress-tester"] 22 | path = swift-stress-tester 23 | url = https://github.com/apple/swift-stress-tester.git 24 | branch = master 25 | [submodule "swift-corelibs-xctest"] 26 | path = swift-corelibs-xctest 27 | url = https://github.com/apple/swift-corelibs-xctest.git 28 | branch = master 29 | [submodule "swift-corelibs-foundation"] 30 | path = swift-corelibs-foundation 31 | url = https://github.com/apple/swift-corelibs-foundation.git 32 | branch = master 33 | [submodule "swift-corelibs-libdispatch"] 34 | path = swift-corelibs-libdispatch 35 | url = https://github.com/apple/swift-corelibs-libdispatch.git 36 | branch = master 37 | [submodule "swift-integration-tests"] 38 | path = swift-integration-tests 39 | url = https://github.com/apple/swift-integration-tests.git 40 | branch = master 41 | [submodule "swift-xcode-playground-support"] 42 | path = swift-xcode-playground-support 43 | url = https://github.com/apple/swift-xcode-playground-support.git 44 | branch = master 45 | [submodule "ninja"] 46 | path = ninja 47 | url = https://github.com/ninja-build/ninja.git 48 | branch = release 49 | [submodule "indexstore-db"] 50 | path = indexstore-db 51 | url = https://github.com/apple/indexstore-db.git 52 | branch = master 53 | [submodule "sourcekit-lsp"] 54 | path = sourcekit-lsp 55 | url = https://github.com/apple/sourcekit-lsp.git 56 | branch = master 57 | [submodule "icu"] 58 | path = icu 59 | url = https://github.com/unicode-org/icu.git 60 | [submodule "llvm-project"] 61 | path = llvm-project 62 | url = https://github.com/swiftwasm/llvm-project.git 63 | branch = swiftwasm 64 | --------------------------------------------------------------------------------