Skip to content

Commit bf585a7

Browse files
Steelskincompnerd
authored andcommitted
build: Enable Volatile in the experimental SDK
1 parent 70b8a2d commit bf585a7

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

.github/workflows/swift-toolchain.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2719,6 +2719,70 @@ jobs:
27192719
run: |
27202720
cmake --build ${{ github.workspace }}/BinaryCache/ExperimentalObservation --target install
27212721
2722+
- name: Configure Experimental Volatile
2723+
if: matrix.os != 'Android' || inputs.build_android
2724+
run: |
2725+
$CLANG = cygpath -m "${{ github.workspace }}/BinaryCache/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr/bin/clang.exe"
2726+
$CLANGXX = cygpath -m "${{ github.workspace }}/BinaryCache/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr/bin/clang++.exe"
2727+
$CLANG_CL = cygpath -m "${{ github.workspace }}/BinaryCache/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr/bin/clang-cl.exe"
2728+
$SWIFTC = cygpath -m "${{ github.workspace }}/BinaryCache/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr/bin/swiftc.exe"
2729+
$SwiftFlags = "${{ matrix.swiftflags }}"
2730+
2731+
if ("${{ matrix.os }}" -eq "Android") {
2732+
# Used by matrix definitions.
2733+
$NDKPATH = cygpath -m ${{ steps.setup-ndk.outputs.ndk-path }}
2734+
}
2735+
2736+
if ("${{ matrix.os }}" -eq "Windows") {
2737+
$WINDOWS_VFS_OVERLAY = cygpath -m "${{ github.workspace }}/BinaryCache/swift/stdlib/windows-vfs-overlay.yaml"
2738+
$SwiftResourceDir = cygpath -m "${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift"
2739+
$SwiftFlags += " -vfsoverlay ${WINDOWS_VFS_OVERLAY}"
2740+
$SwiftFlags += " -strict-implicit-module-context"
2741+
$SwiftFlags += " -Xcc -Xclang -Xcc -fbuiltin-headers-in-system-modules"
2742+
$SwiftFlags += " -resource-dir $SwiftResourceDir"
2743+
$SwiftFlags += " -L $SwiftResourceDir/windows"
2744+
} elseif ("${{ matrix.os }}" -eq "Android") {
2745+
$SwiftResourceDir = cygpath -m "${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/Android.platform/Developer/SDKs/Android.sdk/usr/lib/swift"
2746+
$SwiftFlags += " -sdk $NDKPATH/toolchains/llvm/prebuilt/windows-x86_64/sysroot"
2747+
$SwiftFlags += " -resource-dir $SwiftResourceDir"
2748+
$SwiftFlags += " -L $SwiftResourceDir/android"
2749+
}
2750+
2751+
cmake -B ${{ github.workspace }}/BinaryCache/ExperimentalVolatile `
2752+
-D CMAKE_BUILD_TYPE=Release `
2753+
-D CMAKE_C_COMPILER=${{ matrix.gnu-cc }} `
2754+
-D CMAKE_C_COMPILER_LAUNCHER=sccache `
2755+
-D CMAKE_C_COMPILER_TARGET=${{ matrix.triple }} `
2756+
-D CMAKE_C_FLAGS="${{ matrix.gnu-cflags }}" `
2757+
-D CMAKE_CXX_COMPILER=${{ matrix.gnu-cxx }} `
2758+
-D CMAKE_CXX_COMPILER_LAUNCHER=sccache `
2759+
-D CMAKE_CXX_COMPILER_TARGET=${{ matrix.triple }} `
2760+
-D CMAKE_CXX_FLAGS="${{ matrix.gnu-cxxflags }} -I${{ github.workspace }}/BinaryCache/ExperimentalRuntime/include" `
2761+
-D CMAKE_Swift_COMPILER=${SWIFTC} `
2762+
-D CMAKE_Swift_COMPILER_TARGET=${{ matrix.triple_no_api_level }} `
2763+
-D CMAKE_Swift_FLAGS="${SwiftFlags}" `
2764+
-D CMAKE_Swift_COMPILER_WORKS=YES `
2765+
-D CMAKE_Swift_COMPILER_USE_OLD_DRIVER=YES `
2766+
-D BUILD_SHARED_LIBS=NO `
2767+
-D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}Experimental.sdk/usr `
2768+
-D CMAKE_FIND_PACKAGE_PREFER_CONFIG=YES `
2769+
-D CMAKE_STATIC_LIBRARY_PREFIX_Swift="lib" `
2770+
${{ matrix.gnu-linker_flags }} `
2771+
${{ matrix.extra_flags }} `
2772+
-G Ninja `
2773+
-S ${{ github.workspace }}/SourceCache/swift/Runtimes/Supplemental/Volatile `
2774+
-D SwiftVolatile_ENABLE_LIBRARY_EVOLUTION=NO `
2775+
-D SwiftCore_DIR=${{ github.workspace }}/BinaryCache/ExperimentalRuntime/cmake/SwiftCore `
2776+
-D SwiftOverlay_DIR=${{ github.workspace }}/BinaryCache/ExperimentalOverlay/cmake/SwiftOverlay
2777+
- name: Build Experimental Volatile
2778+
if: matrix.os != 'Android' || inputs.build_android
2779+
run: |
2780+
cmake --build ${{ github.workspace }}/BinaryCache/ExperimentalVolatile
2781+
- name: Install Experimental Volatile
2782+
if: matrix.os != 'Android' || inputs.build_android
2783+
run: |
2784+
cmake --build ${{ github.workspace }}/BinaryCache/ExperimentalVolatile --target install
2785+
27222786
- name: Configure Experimental Differentiation
27232787
if: matrix.os != 'Android' || inputs.build_android
27242788
run: |

0 commit comments

Comments
 (0)