# 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-docker-amd
    worker:
        max-run-time: 1800
    run:
        using: toolchain-script
        script: build-libunwind.sh

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

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

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

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

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

android-x64-libunwind-20:
    description: "android x64 libunwind for Clang 20 toolchain build"
    treeherder:
        symbol: TA(x64-unwind-20)
    run:
        arguments:
            - build/build-clang/clang-20.json
        resources:
            - build/build-clang/clang-20.json
            - taskcluster/scripts/misc/build-llvm-common.sh
        toolchain-artifact: public/build/libunwind-x86_64-linux-android.tar.zst
    fetches:
        fetch:
            - clang-20
        toolchain:
            - android-x64-compiler-rt-20
            - linux64-clang-20-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-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
