# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
---
task-defaults:
    worker-type: b-linux-gcp
    worker:
        max-run-time: 1800
    run:
        using: toolchain-script
        script: build-libunwind.sh

android-aarch64-libunwind-17:
    description: "android aarch64 libunwind for Clang 17 toolchain build"
    treeherder:
        symbol: TA(aarch64-unwind-17)
    run:
        arguments:
            - build/build-clang/clang-17.json
        resources:
            - build/build-clang/clang-17.json
            - taskcluster/scripts/misc/build-llvm-common.sh
        toolchain-artifact: public/build/libunwind-aarch64-linux-android.tar.zst
    fetches:
        fetch:
            - clang-17
        toolchain:
            - android-aarch64-compiler-rt-17
            - linux64-clang-17-stage1
            - linux64-android-ndk-linux-repack

android-arm-libunwind-17:
    description: "android arm libunwind for Clang 17 toolchain build"
    treeherder:
        symbol: TA(arm-unwind-17)
    run:
        arguments:
            - build/build-clang/clang-17.json
        resources:
            - build/build-clang/clang-17.json
            - taskcluster/scripts/misc/build-llvm-common.sh
        toolchain-artifact: public/build/libunwind-armv7-linux-android.tar.zst
    fetches:
        fetch:
            - clang-17
        toolchain:
            - android-arm-compiler-rt-17
            - linux64-clang-17-stage1
            - linux64-android-ndk-linux-repack

android-x86-libunwind-17:
    description: "android x86 libunwind for Clang 17 toolchain build"
    treeherder:
        symbol: TA(x86-unwind-17)
    run:
        arguments:
            - build/build-clang/clang-17.json
        resources:
            - build/build-clang/clang-17.json
            - taskcluster/scripts/misc/build-llvm-common.sh
        toolchain-artifact: public/build/libunwind-i686-linux-android.tar.zst
    fetches:
        fetch:
            - clang-17
        toolchain:
            - android-x86-compiler-rt-17
            - linux64-clang-17-stage1
            - linux64-android-ndk-linux-repack

android-x64-libunwind-17:
    description: "android x64 libunwind for Clang 17 toolchain build"
    treeherder:
        symbol: TA(x64-unwind-17)
    run:
        arguments:
            - build/build-clang/clang-17.json
        resources:
            - build/build-clang/clang-17.json
            - taskcluster/scripts/misc/build-llvm-common.sh
        toolchain-artifact: public/build/libunwind-x86_64-linux-android.tar.zst
    fetches:
        fetch:
            - clang-17
        toolchain:
            - android-x64-compiler-rt-17
            - linux64-clang-17-stage1
            - linux64-android-ndk-linux-repack

android-aarch64-libunwind-18:
    description: "android aarch64 libunwind for Clang 18 toolchain build"
    treeherder:
        symbol: TA(aarch64-unwind-18)
    run:
        arguments:
            - build/build-clang/clang-18.json
        resources:
            - build/build-clang/clang-18.json
            - taskcluster/scripts/misc/build-llvm-common.sh
        toolchain-artifact: public/build/libunwind-aarch64-linux-android.tar.zst
    fetches:
        fetch:
            - clang-18
        toolchain:
            - android-aarch64-compiler-rt-18
            - linux64-clang-18-stage1
            - linux64-android-ndk-linux-repack

android-arm-libunwind-18:
    description: "android arm libunwind for Clang 18 toolchain build"
    treeherder:
        symbol: TA(arm-unwind-18)
    run:
        arguments:
            - build/build-clang/clang-18.json
        resources:
            - build/build-clang/clang-18.json
            - taskcluster/scripts/misc/build-llvm-common.sh
        toolchain-artifact: public/build/libunwind-armv7-linux-android.tar.zst
    fetches:
        fetch:
            - clang-18
        toolchain:
            - android-arm-compiler-rt-18
            - linux64-clang-18-stage1
            - linux64-android-ndk-linux-repack

android-x86-libunwind-18:
    description: "android x86 libunwind for Clang 18 toolchain build"
    treeherder:
        symbol: TA(x86-unwind-18)
    run:
        arguments:
            - build/build-clang/clang-18.json
        resources:
            - build/build-clang/clang-18.json
            - taskcluster/scripts/misc/build-llvm-common.sh
        toolchain-artifact: public/build/libunwind-i686-linux-android.tar.zst
    fetches:
        fetch:
            - clang-18
        toolchain:
            - android-x86-compiler-rt-18
            - linux64-clang-18-stage1
            - linux64-android-ndk-linux-repack

android-x64-libunwind-18:
    description: "android x64 libunwind for Clang 18 toolchain build"
    treeherder:
        symbol: TA(x64-unwind-18)
    run:
        arguments:
            - build/build-clang/clang-18.json
        resources:
            - build/build-clang/clang-18.json
            - taskcluster/scripts/misc/build-llvm-common.sh
        toolchain-artifact: public/build/libunwind-x86_64-linux-android.tar.zst
    fetches:
        fetch:
            - clang-18
        toolchain:
            - android-x64-compiler-rt-18
            - linux64-clang-18-stage1
            - linux64-android-ndk-linux-repack

android-aarch64-libunwind-trunk:
    description: "android aarch64 libunwind for Clang trunk toolchain build"
    attributes:
        cached_task: false
    treeherder:
        symbol: TA(aarch64-unwind-trunk)
    run:
        arguments:
            - build/build-clang/clang-trunk.json
        resources:
            - build/build-clang/clang-trunk.json
            - taskcluster/scripts/misc/build-llvm-common.sh
        toolchain-artifact: public/build/libunwind-aarch64-linux-android.tar.zst
    fetches:
        fetch:
            - clang-trunk
        toolchain:
            - android-aarch64-compiler-rt-trunk
            - linux64-clang-trunk-stage1
            - linux64-android-ndk-linux-repack

android-arm-libunwind-trunk:
    description: "android arm libunwind for Clang trunk toolchain build"
    attributes:
        cached_task: false
    treeherder:
        symbol: TA(arm-unwind-trunk)
    run:
        arguments:
            - build/build-clang/clang-trunk.json
        resources:
            - build/build-clang/clang-trunk.json
            - taskcluster/scripts/misc/build-llvm-common.sh
        toolchain-artifact: public/build/libunwind-armv7-linux-android.tar.zst
    fetches:
        fetch:
            - clang-trunk
        toolchain:
            - android-arm-compiler-rt-trunk
            - linux64-clang-trunk-stage1
            - linux64-android-ndk-linux-repack

android-x86-libunwind-trunk:
    description: "android x86 libunwind for Clang trunk toolchain build"
    attributes:
        cached_task: false
    treeherder:
        symbol: TA(x86-unwind-trunk)
    run:
        arguments:
            - build/build-clang/clang-trunk.json
        resources:
            - build/build-clang/clang-trunk.json
            - taskcluster/scripts/misc/build-llvm-common.sh
        toolchain-artifact: public/build/libunwind-i686-linux-android.tar.zst
    fetches:
        fetch:
            - clang-trunk
        toolchain:
            - android-x86-compiler-rt-trunk
            - linux64-clang-trunk-stage1
            - linux64-android-ndk-linux-repack

android-x64-libunwind-trunk:
    description: "android x64 libunwind for Clang trunk toolchain build"
    attributes:
        cached_task: false
    treeherder:
        symbol: TA(x64-unwind-trunk)
    run:
        arguments:
            - build/build-clang/clang-trunk.json
        resources:
            - build/build-clang/clang-trunk.json
            - taskcluster/scripts/misc/build-llvm-common.sh
        toolchain-artifact: public/build/libunwind-x86_64-linux-android.tar.zst
    fetches:
        fetch:
            - clang-trunk
        toolchain:
            - android-x64-compiler-rt-trunk
            - linux64-clang-trunk-stage1
            - linux64-android-ndk-linux-repack
