@@ -2704,6 +2704,69 @@ jobs:
2704
2704
run : |
2705
2705
cmake --build ${{ github.workspace }}/BinaryCache/ExperimentalObservation --target install
2706
2706
2707
+ - name : Configure Experimental Differentiation
2708
+ if : matrix.os != 'Android' || inputs.build_android
2709
+ run : |
2710
+ $CLANG = cygpath -m "${{ github.workspace }}/BinaryCache/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr/bin/clang.exe"
2711
+ $CLANGXX = cygpath -m "${{ github.workspace }}/BinaryCache/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr/bin/clang++.exe"
2712
+ $CLANG_CL = cygpath -m "${{ github.workspace }}/BinaryCache/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr/bin/clang-cl.exe"
2713
+ $SWIFTC = cygpath -m "${{ github.workspace }}/BinaryCache/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr/bin/swiftc.exe"
2714
+ $SwiftFlags = "${{ matrix.swiftflags }}"
2715
+
2716
+ if ("${{ matrix.os }}" -eq "Android") {
2717
+ # Used by matrix definitions.
2718
+ $NDKPATH = cygpath -m ${{ steps.setup-ndk.outputs.ndk-path }}
2719
+ }
2720
+
2721
+ if ("${{ matrix.os }}" -eq "Windows") {
2722
+ $WINDOWS_VFS_OVERLAY = cygpath -m "${{ github.workspace }}/BinaryCache/swift/stdlib/windows-vfs-overlay.yaml"
2723
+ $SwiftResourceDir = cygpath -m "${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift"
2724
+ $SwiftFlags += " -vfsoverlay ${WINDOWS_VFS_OVERLAY}"
2725
+ $SwiftFlags += " -strict-implicit-module-context"
2726
+ $SwiftFlags += " -Xcc -Xclang -Xcc -fbuiltin-headers-in-system-modules"
2727
+ $SwiftFlags += " -resource-dir $SwiftResourceDir"
2728
+ $SwiftFlags += " -L $SwiftResourceDir/windows"
2729
+ } elseif ("${{ matrix.os }}" -eq "Android") {
2730
+ $SwiftResourceDir = cygpath -m "${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/Android.platform/Developer/SDKs/Android.sdk/usr/lib/swift"
2731
+ $SwiftFlags += " -sdk $NDKPATH/toolchains/llvm/prebuilt/windows-x86_64/sysroot"
2732
+ $SwiftFlags += " -resource-dir $SwiftResourceDir"
2733
+ $SwiftFlags += " -L $SwiftResourceDir/android"
2734
+ }
2735
+
2736
+ cmake -B ${{ github.workspace }}/BinaryCache/ExperimentalDifferentiation `
2737
+ -D CMAKE_BUILD_TYPE=Release `
2738
+ -D CMAKE_C_COMPILER=${{ matrix.gnu-cc }} `
2739
+ -D CMAKE_C_COMPILER_LAUNCHER=sccache `
2740
+ -D CMAKE_C_COMPILER_TARGET=${{ matrix.triple }} `
2741
+ -D CMAKE_C_FLAGS="${{ matrix.gnu-cflags }}" `
2742
+ -D CMAKE_CXX_COMPILER=${{ matrix.gnu-cxx }} `
2743
+ -D CMAKE_CXX_COMPILER_LAUNCHER=sccache `
2744
+ -D CMAKE_CXX_COMPILER_TARGET=${{ matrix.triple }} `
2745
+ -D CMAKE_CXX_FLAGS="${{ matrix.gnu-cxxflags }}" `
2746
+ -D CMAKE_Swift_COMPILER=${SWIFTC} `
2747
+ -D CMAKE_Swift_COMPILER_TARGET=${{ matrix.triple_no_api_level }} `
2748
+ -D CMAKE_Swift_FLAGS="${SwiftFlags}" `
2749
+ -D CMAKE_Swift_COMPILER_WORKS=YES `
2750
+ -D CMAKE_Swift_COMPILER_USE_OLD_DRIVER=YES `
2751
+ -D BUILD_SHARED_LIBS=NO `
2752
+ -D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}Experimental.sdk/usr `
2753
+ -D CMAKE_FIND_PACKAGE_PREFER_CONFIG=YES `
2754
+ -D CMAKE_STATIC_LIBRARY_PREFIX_Swift="lib" `
2755
+ ${{ matrix.gnu-linker_flags }} `
2756
+ ${{ matrix.extra_flags }} `
2757
+ -G Ninja `
2758
+ -S ${{ github.workspace }}/SourceCache/swift/Runtimes/Supplemental/Differentiation `
2759
+ -D SwiftCore_DIR=${{ github.workspace }}/BinaryCache/ExperimentalRuntime/cmake/SwiftCore `
2760
+ -D SwiftOverlay_DIR=${{ github.workspace }}/BinaryCache/ExperimentalOverlay/cmake/SwiftOverlay
2761
+ - name : Build Experimental Differentiation
2762
+ if : matrix.os != 'Android' || inputs.build_android
2763
+ run : |
2764
+ cmake --build ${{ github.workspace }}/BinaryCache/ExperimentalDifferentiation
2765
+ - name : Install Experimental Differentiation
2766
+ if : matrix.os != 'Android' || inputs.build_android
2767
+ run : |
2768
+ cmake --build ${{ github.workspace }}/BinaryCache/ExperimentalDifferentiation --target install
2769
+
2707
2770
- name : Configure Experimental Dispatch
2708
2771
if : matrix.os != 'Android' || inputs.build_android
2709
2772
run : |
0 commit comments