# 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-xlarge-amd
    worker:
        max-run-time: 7200
    run:
        resources:
            - 'build/build-clang/build-clang.py'

linux64-clang-14-stage1:
    description: "Clang 14 toolchain build"
    treeherder:
        symbol: TL(clang-14-stage1)
    run:
        using: toolchain-script
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-system-clang.json'
            - 'build/build-clang/clang-14.json'
            - 'build/build-clang/stage-1.json'
        resources:
            - 'build/build-clang/use-system-clang.json'
            - 'build/build-clang/clang-14.json'
            - 'build/build-clang/stage-1.json'
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        fetch:
            - clang-14
        toolchain:
            - linux64-toolchain-sysroot

macosx64-clang-14-raw:
    description: "Clang 14 toolchain build"
    treeherder:
        symbol: TM(clang-14-raw)
    worker-type: b-linux-docker-large-amd
    worker:
        max-run-time: 3600
    run:
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/macosx64.json'
            - 'build/build-clang/clang-14.json'
            - 'build/build-clang/stage-1.json'
        resources:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/macosx64.json'
            - 'build/build-clang/clang-14.json'
            - 'build/build-clang/stage-1.json'
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        fetch:
            - clang-14
        toolchain:
            - linux64-clang-14-stage1
            - macosx64-sdk-13.3

linux64-clang-17-raw:
    description: "Clang 17 toolchain build"
    treeherder:
        symbol: TL(clang-17-raw)
    worker-type: b-linux-docker-large-amd
    run:
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-system-clang.json'
            - 'build/build-clang/clang-17.json'
            - 'build/build-clang/2stages.json'
        resources:
            - 'build/build-clang/use-system-clang.json'
            - 'build/build-clang/clang-17.json'
            - 'build/build-clang/2stages.json'
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        fetch:
            - clang-17
        toolchain:
            - linux64-toolchain-sysroot

linux64-clang-17:
    description: "Clang 17 toolchain build"
    treeherder:
        symbol: TL(clang-17)
    worker-type: b-linux-docker-amd
    worker:
        max-run-time: 600
    run:
        script: repack-clang.sh
        toolchain-alias: linux64-clang-base
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        toolchain:
            - linux64-clang-17-raw
            - wasm32-wasi-compiler-rt-17

linux64-clang-19-mingw-x86:
    description: "MinGW-Clang 19 x86 toolchain build"
    treeherder:
        symbol: TMW(clang-19-x86)
    worker-type: b-linux-docker-amd
    run:
        script: build-clang-mingw.sh
        arguments:
            - 'x86'
        resources:
            - 'taskcluster/scripts/misc/mingw-*.patch'
        toolchain-artifact: public/build/clangmingw.tar.zst
    fetches:
        fetch:
            - clang-19
            - mingw-w64
            - llvm-mingw
            - gcc-9.5.0
        toolchain:
            - linux64-clang-19

linux64-clang-19-mingw-x64:
    description: "MinGW-Clang 19 x64 toolchain build"
    treeherder:
        symbol: TMW(clang-19-x64)
        tier: 1
    worker-type: b-linux-docker-amd
    run:
        script: build-clang-mingw.sh
        arguments:
            - 'x64'
        resources:
            - 'taskcluster/scripts/misc/mingw-*.patch'
        toolchain-artifact: public/build/clangmingw.tar.zst
    fetches:
        fetch:
            - clang-19
            - mingw-w64
            - llvm-mingw
            - gcc-9.5.0
        toolchain:
            - linux64-clang-19

linux64-clang-19-stage1:
    description: "Clang 19 toolchain build"
    treeherder:
        symbol: TL(clang-19-stage1)
    run:
        using: toolchain-script
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-system-clang.json'
            - 'build/build-clang/clang-19.json'
            - 'build/build-clang/stage-1.json'
        resources:
            - 'build/build-clang/use-system-clang.json'
            - 'build/build-clang/clang-19.json'
            - 'build/build-clang/stage-1.json'
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        fetch:
            - clang-19
        toolchain:
            - linux64-toolchain-sysroot

linux64-clang-19-profile:
    description: "Clang 19 toolchain build"
    treeherder:
        symbol: TL(clang-19-profile)
    run:
        using: toolchain-script
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/clang-19.json'
            - 'build/build-clang/stage-2-3-pgo.json'
        resources:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/clang-19.json'
            - 'build/build-clang/stage-2-3-pgo.json'
        toolchain-artifact: public/build/merged.profdata
    fetches:
        fetch:
            - clang-19
        toolchain:
            - linux64-clang-19-stage1
            - linux64-x64-compiler-rt-19
            - linux64-toolchain-sysroot

linux64-clang-19-raw:
    description: "Clang 19 toolchain build"
    treeherder:
        symbol: TL(clang-19-raw)
    run:
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/clang-19.json'
            - 'build/build-clang/stage-4-pgo.json'
        resources:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/clang-19.json'
            - 'build/build-clang/stage-4-pgo.json'
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        fetch:
            - clang-19
        toolchain:
            - linux64-clang-19-stage1
            - linux64-clang-19-profile
            - linux64-libxml2
            - linux64-toolchain-sysroot

linux64-clang-19:
    description: "Clang 19 toolchain build"
    attributes:
        local-toolchain: true
    treeherder:
        symbol: TL(clang-19)
    worker-type: b-linux-docker-amd
    worker:
        max-run-time: 600
    run:
        script: repack-clang.sh
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        toolchain:
            - linux64-cctools-port
            - linux64-clang-19-raw
            - android-aarch64-compiler-rt-19
            - android-aarch64-libunwind-19
            - android-arm-compiler-rt-19
            - android-arm-libunwind-19
            - android-x64-compiler-rt-19
            - android-x64-libunwind-19
            - linux64-aarch64-compiler-rt-19
            - linux64-x64-compiler-rt-19
            - linux64-x86-compiler-rt-19
            - macosx64-aarch64-compiler-rt-19
            - macosx64-x64-compiler-rt-19
            - wasm32-wasi-compiler-rt-19
            - win32-compiler-rt-19
            - win64-compiler-rt-19
            - win64-aarch64-compiler-rt-19

linux64-aarch64-clang-19-raw:
    description: "Clang 19 toolchain build"
    treeherder:
        symbol: TLA64(clang-19-raw)
    run:
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/linux64-aarch64.json'
            - 'build/build-clang/clang-19.json'
            - 'build/build-clang/stage-4-pgo.json'
        resources:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/linux64-aarch64.json'
            - 'build/build-clang/clang-19.json'
            - 'build/build-clang/stage-4-pgo.json'
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        fetch:
            - clang-19
        toolchain:
            - linux64-clang-19-stage1
            - linux64-clang-19-profile
            - linux64-aarch64-libxml2
            - linux64-aarch64-toolchain-sysroot

linux64-aarch64-clang-19:
    description: "Clang 19 toolchain build"
    attributes:
        local-toolchain: true
    treeherder:
        symbol: TLA64(clang-19)
    worker-type: b-linux-docker-amd
    worker:
        max-run-time: 600
    run:
        script: repack-clang.sh
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        toolchain:
            - linux64-cctools-port
            - linux64-aarch64-clang-19-raw
            - android-aarch64-compiler-rt-19
            - android-aarch64-libunwind-19
            - android-arm-compiler-rt-19
            - android-arm-libunwind-19
            - android-x64-compiler-rt-19
            - android-x64-libunwind-19
            - linux64-aarch64-compiler-rt-19
            - linux64-x64-compiler-rt-19
            - linux64-x86-compiler-rt-19
            - macosx64-aarch64-compiler-rt-19
            - macosx64-x64-compiler-rt-19
            - wasm32-wasi-compiler-rt-19
            - win32-compiler-rt-19
            - win64-compiler-rt-19
            - win64-aarch64-compiler-rt-19

macosx64-clang-19-stage2:
    description: "Clang 19 toolchain build"
    treeherder:
        symbol: TM(clang-19-stage2)
    run:
        using: toolchain-script
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/macosx64.json'
            - 'build/build-clang/clang-19.json'
            - 'build/build-clang/stage-2-pgo.json'
        resources:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/macosx64.json'
            - 'build/build-clang/clang-19.json'
            - 'build/build-clang/stage-2-pgo.json'
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        fetch:
            - clang-19
        toolchain:
            - linux64-clang-19-stage1
            - macosx64-x64-compiler-rt-19
            - macosx64-sdk-toolchain

macosx64-clang-19-profile:
    description: "Clang 19 toolchain build"
    treeherder:
        symbol: TM(clang-19-profile)
    worker-type: b-osx-arm64
    worker:
        max-run-time: 7200
    run:
        using: toolchain-script
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/macosx64.json'
            - 'build/build-clang/clang-19.json'
            - 'build/build-clang/stage-3-pgo.json'
        resources:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/macosx64.json'
            - 'build/build-clang/clang-19.json'
            - 'build/build-clang/stage-3-pgo.json'
        toolchain-artifact: public/build/merged.profdata
    fetches:
        fetch:
            - clang-19
            - macosx64-cmake
            - macosx64-ninja
        toolchain:
            - macosx64-clang-19-stage2
            - macosx64-sdk-toolchain

macosx64-clang-19-raw:
    description: "Clang 19 toolchain build"
    treeherder:
        symbol: TM(clang-19-raw)
    worker:
        max-run-time: 3600
    run:
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/macosx64.json'
            - 'build/build-clang/clang-19.json'
            - 'build/build-clang/stage-4-pgo.json'
        resources:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/macosx64.json'
            - 'build/build-clang/clang-19.json'
            - 'build/build-clang/stage-4-pgo.json'
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        fetch:
            - clang-19
        toolchain:
            - linux64-clang-19-stage1
            - macosx64-clang-19-profile
            - macosx64-sdk-toolchain
            - macosx64-x64-compiler-rt-19

macosx64-clang-19:
    description: "Clang 19 toolchain repack with MacOS Compiler RT libs"
    attributes:
        local-toolchain: true
    treeherder:
        symbol: TM(clang-19)
    worker-type: b-linux-docker-amd
    worker:
        max-run-time: 600
    run:
        script: repack-clang.sh
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        toolchain:
            - linux64-cctools-port
            - macosx64-clang-19-raw
            - android-aarch64-compiler-rt-19
            - android-aarch64-libunwind-19
            - android-arm-compiler-rt-19
            - android-arm-libunwind-19
            - android-x64-compiler-rt-19
            - android-x64-libunwind-19
            - linux64-aarch64-compiler-rt-19
            - linux64-x64-compiler-rt-19
            - linux64-x86-compiler-rt-19
            - macosx64-aarch64-compiler-rt-19
            - macosx64-x64-compiler-rt-19
            - wasm32-wasi-compiler-rt-19
            - win32-compiler-rt-19
            - win64-compiler-rt-19
            - win64-aarch64-compiler-rt-19

macosx64-aarch64-clang-19-stage2:
    description: "Clang 19 toolchain build"
    treeherder:
        symbol: TMA64(clang-19-stage2)
    run:
        using: toolchain-script
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/macosx64-aarch64.json'
            - 'build/build-clang/clang-19.json'
            - 'build/build-clang/stage-2-pgo.json'
        resources:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/macosx64-aarch64.json'
            - 'build/build-clang/clang-19.json'
            - 'build/build-clang/stage-2-pgo.json'
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        fetch:
            - clang-19
        toolchain:
            - linux64-clang-19-stage1
            - macosx64-aarch64-compiler-rt-19
            - macosx64-sdk-toolchain

macosx64-aarch64-clang-19-profile:
    description: "Clang 19 toolchain build"
    treeherder:
        symbol: TMA64(clang-19-profile)
    worker-type: b-osx-arm64
    worker:
        max-run-time: 7200
    run:
        using: toolchain-script
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/macosx64-aarch64.json'
            - 'build/build-clang/clang-19.json'
            - 'build/build-clang/stage-3-pgo.json'
        resources:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/macosx64-aarch64.json'
            - 'build/build-clang/clang-19.json'
            - 'build/build-clang/stage-3-pgo.json'
        toolchain-artifact: public/build/merged.profdata
    fetches:
        fetch:
            - clang-19
            - macosx64-cmake
            - macosx64-ninja
        toolchain:
            - macosx64-aarch64-clang-19-stage2
            - macosx64-sdk-toolchain

macosx64-aarch64-clang-19-raw:
    description: "Clang 19 toolchain build"
    treeherder:
        symbol: TMA64(clang-19-raw)
    worker:
        max-run-time: 3600
    run:
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/macosx64-aarch64.json'
            - 'build/build-clang/clang-19.json'
            - 'build/build-clang/stage-4-pgo.json'
        resources:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/macosx64-aarch64.json'
            - 'build/build-clang/clang-19.json'
            - 'build/build-clang/stage-4-pgo.json'
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        fetch:
            - clang-19
        toolchain:
            - linux64-clang-19-stage1
            - macosx64-aarch64-clang-19-profile
            - macosx64-aarch64-compiler-rt-19
            - macosx64-sdk-toolchain

macosx64-aarch64-clang-19:
    description: "Clang 19 toolchain repack with MacOS Compiler RT libs"
    attributes:
        local-toolchain: true
    treeherder:
        symbol: TMA64(clang-19)
    worker-type: b-linux-docker-amd
    worker:
        max-run-time: 600
    run:
        script: repack-clang.sh
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        toolchain:
            - linux64-cctools-port
            - macosx64-aarch64-clang-19-raw
            - android-aarch64-compiler-rt-19
            - android-aarch64-libunwind-19
            - android-arm-compiler-rt-19
            - android-arm-libunwind-19
            - android-x64-compiler-rt-19
            - android-x64-libunwind-19
            - linux64-aarch64-compiler-rt-19
            - linux64-x64-compiler-rt-19
            - linux64-x86-compiler-rt-19
            - macosx64-aarch64-compiler-rt-19
            - macosx64-x64-compiler-rt-19
            - wasm32-wasi-compiler-rt-19
            - win32-compiler-rt-19
            - win64-compiler-rt-19
            - win64-aarch64-compiler-rt-19

win64-clang-19-stage2:
    description: "Clang-cl 19 toolchain build"
    treeherder:
        symbol: TW64(clang-19-stage2)
    run:
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-cl-artifact.json'
            - 'build/build-clang/win64.json'
            - 'build/build-clang/clang-19.json'
            - 'build/build-clang/stage-2-pgo.json'
        resources:
            - 'build/build-clang/use-clang-cl-artifact.json'
            - 'build/build-clang/win64.json'
            - 'build/build-clang/clang-19.json'
            - 'build/build-clang/stage-2-pgo.json'
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        fetch:
            - clang-19
        toolchain:
            - linux64-clang-19-stage1
            - vs-toolchain
            - win64-compiler-rt-19
            - win64-libxml2

win64-clang-19-profile:
    description: "Clang-cl 19 toolchain build"
    treeherder:
        symbol: TW64(clang-19-profile)
    worker-type: b-win2022
    worker:
        max-run-time: 9000
    run:
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-cl-artifact.json'
            - 'build/build-clang/win64.json'
            - 'build/build-clang/clang-19.json'
            - 'build/build-clang/stage-3-pgo.json'
        resources:
            - 'build/build-clang/use-clang-cl-artifact.json'
            - 'build/build-clang/win64.json'
            - 'build/build-clang/clang-19.json'
            - 'build/build-clang/stage-3-pgo.json'
        toolchain-artifact: public/build/merged.profdata
    fetches:
        fetch:
            - clang-19
            - win64-ninja
        toolchain:
            - win64-clang-19-stage2
            - win64-cmake
            - vs-toolchain
            - win64-libxml2

win64-clang-19-raw:
    description: "Clang-cl 19 toolchain build"
    treeherder:
        symbol: TW64(clang-19-raw)
    run:
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-cl-artifact.json'
            - 'build/build-clang/win64.json'
            - 'build/build-clang/clang-19.json'
            - 'build/build-clang/stage-4-pgo.json'
            - 'build/build-clang/llvm-config.json'
        resources:
            - 'build/build-clang/use-clang-cl-artifact.json'
            - 'build/build-clang/win64.json'
            - 'build/build-clang/clang-19.json'
            - 'build/build-clang/stage-4-pgo.json'
            - 'build/build-clang/llvm-config.json'
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        fetch:
            - clang-19
        toolchain:
            - linux64-clang-19-stage1
            - win64-clang-19-profile
            - win64-compiler-rt-19
            - vs-toolchain
            - win64-libxml2

win64-clang-19:
    description: "Clang-cl 19 toolchain build"
    attributes:
        local-toolchain: true
    treeherder:
        symbol: TW64(clang-19)
    worker-type: b-linux-docker-amd
    worker:
        max-run-time: 600
    run:
        script: repack-clang.sh
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        toolchain:
            - linux64-cctools-port
            - win64-clang-19-raw
            - android-aarch64-compiler-rt-19
            - android-aarch64-libunwind-19
            - android-arm-compiler-rt-19
            - android-arm-libunwind-19
            - android-x64-compiler-rt-19
            - android-x64-libunwind-19
            - linux64-aarch64-compiler-rt-19
            - linux64-x64-compiler-rt-19
            - linux64-x86-compiler-rt-19
            - macosx64-aarch64-compiler-rt-19
            - macosx64-x64-compiler-rt-19
            - wasm32-wasi-compiler-rt-19
            - win32-compiler-rt-19
            - win64-compiler-rt-19
            - win64-aarch64-compiler-rt-19

win64-aarch64-clang-19-raw:
    description: "Clang-cl 19 toolchain build"
    treeherder:
        symbol: TWA64(clang-19-raw)
    worker:
        max-run-time: 3600
    run:
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-cl-artifact.json'
            - 'build/build-clang/win64-aarch64.json'
            - 'build/build-clang/clang-19.json'
            - 'build/build-clang/stage-4-pgo.json'
        resources:
            - 'build/build-clang/use-clang-cl-artifact.json'
            - 'build/build-clang/win64-aarch64.json'
            - 'build/build-clang/clang-19.json'
            - 'build/build-clang/stage-4-pgo.json'
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        fetch:
            - clang-19
        toolchain:
            - linux64-clang-19-stage1
            - linux64-clang-19-profile
            - win64-aarch64-compiler-rt-19
            - vs-toolchain
            - win64-aarch64-libxml2

win64-aarch64-clang-19:
    description: "Clang-cl 19 toolchain build"
    attributes:
        local-toolchain: true
    treeherder:
        symbol: TWA64(clang-19)
    worker-type: b-linux-docker-amd
    worker:
        max-run-time: 600
    run:
        script: repack-clang.sh
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        toolchain:
            - linux64-cctools-port
            - win64-aarch64-clang-19-raw
            - android-aarch64-compiler-rt-19
            - android-aarch64-libunwind-19
            - android-arm-compiler-rt-19
            - android-arm-libunwind-19
            - android-x64-compiler-rt-19
            - android-x64-libunwind-19
            - linux64-aarch64-compiler-rt-19
            - linux64-x64-compiler-rt-19
            - linux64-x86-compiler-rt-19
            - macosx64-aarch64-compiler-rt-19
            - macosx64-x64-compiler-rt-19
            - wasm32-wasi-compiler-rt-19
            - win32-compiler-rt-19
            - win64-compiler-rt-19
            - win64-aarch64-compiler-rt-19

linux64-clang-20-mingw-x86:
    description: "MinGW-Clang 20 x86 toolchain build"
    treeherder:
        symbol: TMW(clang-20-x86)
    worker-type: b-linux-docker-amd
    run:
        script: build-clang-mingw.sh
        arguments:
            - 'x86'
        resources:
            - 'taskcluster/scripts/misc/mingw-*.patch'
        toolchain-alias:
            by-project:
                toolchains: null
                default: linux64-clang-mingw-x86
        toolchain-artifact: public/build/clangmingw.tar.zst
    fetches:
        fetch:
            - clang-20
            - mingw-w64
            - llvm-mingw
            - gcc-9.5.0
        toolchain:
            - linux64-clang-20

linux64-clang-20-mingw-x64:
    description: "MinGW-Clang 20 x64 toolchain build"
    treeherder:
        symbol: TMW(clang-20-x64)
        tier: 1
    worker-type: b-linux-docker-amd
    run:
        script: build-clang-mingw.sh
        arguments:
            - 'x64'
        resources:
            - 'taskcluster/scripts/misc/mingw-*.patch'
        toolchain-alias:
            by-project:
                toolchains: null
                default: linux64-clang-mingw-x64
        toolchain-artifact: public/build/clangmingw.tar.zst
    fetches:
        fetch:
            - clang-20
            - mingw-w64
            - llvm-mingw
            - gcc-9.5.0
        toolchain:
            - linux64-clang-20

linux64-clang-20-stage1:
    description: "Clang 20 toolchain build"
    treeherder:
        symbol: TL(clang-20-stage1)
    run:
        using: toolchain-script
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-system-clang.json'
            - 'build/build-clang/clang-20.json'
            - 'build/build-clang/stage-1.json'
        resources:
            - 'build/build-clang/use-system-clang.json'
            - 'build/build-clang/clang-20.json'
            - 'build/build-clang/stage-1.json'
        toolchain-alias:
            by-project:
                toolchains: null
                default: linux64-clang-toolchain
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        fetch:
            - clang-20
        toolchain:
            - linux64-toolchain-sysroot

linux64-clang-20-profile:
    description: "Clang 20 toolchain build"
    treeherder:
        symbol: TL(clang-20-profile)
    run:
        using: toolchain-script
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/clang-20.json'
            - 'build/build-clang/stage-2-3-pgo.json'
        resources:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/clang-20.json'
            - 'build/build-clang/stage-2-3-pgo.json'
        toolchain-artifact: public/build/merged.profdata
    fetches:
        fetch:
            - clang-20
        toolchain:
            - linux64-clang-20-stage1
            - linux64-x64-compiler-rt-20
            - linux64-toolchain-sysroot

linux64-clang-20-raw:
    description: "Clang 20 toolchain build"
    treeherder:
        symbol: TL(clang-20-raw)
    run:
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/clang-20.json'
            - 'build/build-clang/stage-4-pgo.json'
        resources:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/clang-20.json'
            - 'build/build-clang/stage-4-pgo.json'
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        fetch:
            - clang-20
        toolchain:
            - linux64-clang-20-stage1
            - linux64-clang-20-profile
            - linux64-libxml2
            - linux64-toolchain-sysroot

linux64-clang-20:
    description: "Clang 20 toolchain build"
    attributes:
        local-toolchain: true
    treeherder:
        symbol: TL(clang-20)
    worker-type: b-linux-docker-amd
    worker:
        max-run-time: 600
    run:
        script: repack-clang.sh
        toolchain-alias:
            by-project:
                toolchains: null
                default: linux64-clang
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        toolchain:
            - linux64-cctools-port
            - linux64-clang-20-raw
            - android-aarch64-compiler-rt-20
            - android-aarch64-libunwind-20
            - android-arm-compiler-rt-20
            - android-arm-libunwind-20
            - android-x64-compiler-rt-20
            - android-x64-libunwind-20
            - linux64-aarch64-compiler-rt-20
            - linux64-x64-compiler-rt-20
            - linux64-x86-compiler-rt-20
            - macosx64-aarch64-compiler-rt-20
            - macosx64-x64-compiler-rt-20
            - wasm32-wasi-compiler-rt-20
            - win32-compiler-rt-20
            - win64-compiler-rt-20
            - win64-aarch64-compiler-rt-20

linux64-aarch64-clang-20-raw:
    description: "Clang 20 toolchain build"
    treeherder:
        symbol: TLA64(clang-20-raw)
    run:
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/linux64-aarch64.json'
            - 'build/build-clang/clang-20.json'
            - 'build/build-clang/stage-4-pgo.json'
        resources:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/linux64-aarch64.json'
            - 'build/build-clang/clang-20.json'
            - 'build/build-clang/stage-4-pgo.json'
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        fetch:
            - clang-20
        toolchain:
            - linux64-clang-20-stage1
            - linux64-clang-20-profile
            - linux64-aarch64-libxml2
            - linux64-aarch64-toolchain-sysroot

linux64-aarch64-clang-20:
    description: "Clang 20 toolchain build"
    attributes:
        local-toolchain: true
    treeherder:
        symbol: TLA64(clang-20)
    worker-type: b-linux-docker-amd
    worker:
        max-run-time: 600
    run:
        script: repack-clang.sh
        toolchain-alias:
            by-project:
                toolchains: null
                default: linux64-aarch64-clang
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        toolchain:
            - linux64-cctools-port
            - linux64-aarch64-clang-20-raw
            - android-aarch64-compiler-rt-20
            - android-aarch64-libunwind-20
            - android-arm-compiler-rt-20
            - android-arm-libunwind-20
            - android-x64-compiler-rt-20
            - android-x64-libunwind-20
            - linux64-aarch64-compiler-rt-20
            - linux64-x64-compiler-rt-20
            - linux64-x86-compiler-rt-20
            - macosx64-aarch64-compiler-rt-20
            - macosx64-x64-compiler-rt-20
            - wasm32-wasi-compiler-rt-20
            - win32-compiler-rt-20
            - win64-compiler-rt-20
            - win64-aarch64-compiler-rt-20

macosx64-clang-20-stage2:
    description: "Clang 20 toolchain build"
    treeherder:
        symbol: TM(clang-20-stage2)
    run:
        using: toolchain-script
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/macosx64.json'
            - 'build/build-clang/clang-20.json'
            - 'build/build-clang/stage-2-pgo.json'
        resources:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/macosx64.json'
            - 'build/build-clang/clang-20.json'
            - 'build/build-clang/stage-2-pgo.json'
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        fetch:
            - clang-20
        toolchain:
            - linux64-clang-20-stage1
            - macosx64-x64-compiler-rt-20
            - macosx64-sdk-toolchain

macosx64-clang-20-profile:
    description: "Clang 20 toolchain build"
    treeherder:
        symbol: TM(clang-20-profile)
    worker-type: b-osx-arm64
    worker:
        max-run-time: 7200
    run:
        using: toolchain-script
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/macosx64.json'
            - 'build/build-clang/clang-20.json'
            - 'build/build-clang/stage-3-pgo.json'
        resources:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/macosx64.json'
            - 'build/build-clang/clang-20.json'
            - 'build/build-clang/stage-3-pgo.json'
        toolchain-artifact: public/build/merged.profdata
    fetches:
        fetch:
            - clang-20
            - macosx64-cmake
            - macosx64-ninja
        toolchain:
            - macosx64-clang-20-stage2
            - macosx64-sdk-toolchain

macosx64-clang-20-raw:
    description: "Clang 20 toolchain build"
    treeherder:
        symbol: TM(clang-20-raw)
    worker:
        max-run-time: 3600
    run:
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/macosx64.json'
            - 'build/build-clang/clang-20.json'
            - 'build/build-clang/stage-4-pgo.json'
        resources:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/macosx64.json'
            - 'build/build-clang/clang-20.json'
            - 'build/build-clang/stage-4-pgo.json'
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        fetch:
            - clang-20
        toolchain:
            - linux64-clang-20-stage1
            - macosx64-clang-20-profile
            - macosx64-sdk-toolchain
            - macosx64-x64-compiler-rt-20

macosx64-clang-20:
    description: "Clang 20 toolchain repack with MacOS Compiler RT libs"
    attributes:
        local-toolchain: true
    treeherder:
        symbol: TM(clang-20)
    worker-type: b-linux-docker-amd
    worker:
        max-run-time: 600
    run:
        script: repack-clang.sh
        toolchain-alias:
            by-project:
                toolchains: null
                default:
                    - macosx64-clang
                    - macosx64-clang-toolchain
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        toolchain:
            - linux64-cctools-port
            - macosx64-clang-20-raw
            - android-aarch64-compiler-rt-20
            - android-aarch64-libunwind-20
            - android-arm-compiler-rt-20
            - android-arm-libunwind-20
            - android-x64-compiler-rt-20
            - android-x64-libunwind-20
            - linux64-aarch64-compiler-rt-20
            - linux64-x64-compiler-rt-20
            - linux64-x86-compiler-rt-20
            - macosx64-aarch64-compiler-rt-20
            - macosx64-x64-compiler-rt-20
            - wasm32-wasi-compiler-rt-20
            - win32-compiler-rt-20
            - win64-compiler-rt-20
            - win64-aarch64-compiler-rt-20

macosx64-aarch64-clang-20-stage2:
    description: "Clang 20 toolchain build"
    treeherder:
        symbol: TMA64(clang-20-stage2)
    run:
        using: toolchain-script
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/macosx64-aarch64.json'
            - 'build/build-clang/clang-20.json'
            - 'build/build-clang/stage-2-pgo.json'
        resources:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/macosx64-aarch64.json'
            - 'build/build-clang/clang-20.json'
            - 'build/build-clang/stage-2-pgo.json'
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        fetch:
            - clang-20
        toolchain:
            - linux64-clang-20-stage1
            - macosx64-aarch64-compiler-rt-20
            - macosx64-sdk-toolchain

macosx64-aarch64-clang-20-profile:
    description: "Clang 20 toolchain build"
    treeherder:
        symbol: TMA64(clang-20-profile)
    worker-type: b-osx-arm64
    worker:
        max-run-time: 7200
    run:
        using: toolchain-script
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/macosx64-aarch64.json'
            - 'build/build-clang/clang-20.json'
            - 'build/build-clang/stage-3-pgo.json'
        resources:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/macosx64-aarch64.json'
            - 'build/build-clang/clang-20.json'
            - 'build/build-clang/stage-3-pgo.json'
        toolchain-artifact: public/build/merged.profdata
    fetches:
        fetch:
            - clang-20
            - macosx64-cmake
            - macosx64-ninja
        toolchain:
            - macosx64-aarch64-clang-20-stage2
            - macosx64-sdk-toolchain

macosx64-aarch64-clang-20-raw:
    description: "Clang 20 toolchain build"
    treeherder:
        symbol: TMA64(clang-20-raw)
    worker:
        max-run-time: 3600
    run:
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/macosx64-aarch64.json'
            - 'build/build-clang/clang-20.json'
            - 'build/build-clang/stage-4-pgo.json'
        resources:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/macosx64-aarch64.json'
            - 'build/build-clang/clang-20.json'
            - 'build/build-clang/stage-4-pgo.json'
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        fetch:
            - clang-20
        toolchain:
            - linux64-clang-20-stage1
            - macosx64-aarch64-clang-20-profile
            - macosx64-aarch64-compiler-rt-20
            - macosx64-sdk-toolchain

macosx64-aarch64-clang-20:
    description: "Clang 20 toolchain repack with MacOS Compiler RT libs"
    attributes:
        local-toolchain: true
    treeherder:
        symbol: TMA64(clang-20)
    worker-type: b-linux-docker-amd
    worker:
        max-run-time: 600
    run:
        script: repack-clang.sh
        toolchain-alias:
            by-project:
                toolchains: null
                default: macosx64-aarch64-clang
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        toolchain:
            - linux64-cctools-port
            - macosx64-aarch64-clang-20-raw
            - android-aarch64-compiler-rt-20
            - android-aarch64-libunwind-20
            - android-arm-compiler-rt-20
            - android-arm-libunwind-20
            - android-x64-compiler-rt-20
            - android-x64-libunwind-20
            - linux64-aarch64-compiler-rt-20
            - linux64-x64-compiler-rt-20
            - linux64-x86-compiler-rt-20
            - macosx64-aarch64-compiler-rt-20
            - macosx64-x64-compiler-rt-20
            - wasm32-wasi-compiler-rt-20
            - win32-compiler-rt-20
            - win64-compiler-rt-20
            - win64-aarch64-compiler-rt-20

win64-clang-20-stage2:
    description: "Clang-cl 20 toolchain build"
    treeherder:
        symbol: TW64(clang-20-stage2)
    run:
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-cl-artifact.json'
            - 'build/build-clang/win64.json'
            - 'build/build-clang/clang-20.json'
            - 'build/build-clang/stage-2-pgo.json'
        resources:
            - 'build/build-clang/use-clang-cl-artifact.json'
            - 'build/build-clang/win64.json'
            - 'build/build-clang/clang-20.json'
            - 'build/build-clang/stage-2-pgo.json'
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        fetch:
            - clang-20
        toolchain:
            - linux64-clang-20-stage1
            - vs-toolchain
            - win64-compiler-rt-20
            - win64-libxml2

win64-clang-20-profile:
    description: "Clang-cl 20 toolchain build"
    treeherder:
        symbol: TW64(clang-20-profile)
    worker-type: b-win2022
    worker:
        max-run-time: 9000
    run:
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-cl-artifact.json'
            - 'build/build-clang/win64.json'
            - 'build/build-clang/clang-20.json'
            - 'build/build-clang/stage-3-pgo.json'
        resources:
            - 'build/build-clang/use-clang-cl-artifact.json'
            - 'build/build-clang/win64.json'
            - 'build/build-clang/clang-20.json'
            - 'build/build-clang/stage-3-pgo.json'
        toolchain-artifact: public/build/merged.profdata
    fetches:
        fetch:
            - clang-20
            - win64-ninja
        toolchain:
            - win64-clang-20-stage2
            - win64-cmake
            - vs-toolchain
            - win64-libxml2

win64-clang-20-raw:
    description: "Clang-cl 20 toolchain build"
    treeherder:
        symbol: TW64(clang-20-raw)
    run:
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-cl-artifact.json'
            - 'build/build-clang/win64.json'
            - 'build/build-clang/clang-20.json'
            - 'build/build-clang/stage-4-pgo.json'
            - 'build/build-clang/llvm-config.json'
        resources:
            - 'build/build-clang/use-clang-cl-artifact.json'
            - 'build/build-clang/win64.json'
            - 'build/build-clang/clang-20.json'
            - 'build/build-clang/stage-4-pgo.json'
            - 'build/build-clang/llvm-config.json'
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        fetch:
            - clang-20
        toolchain:
            - linux64-clang-20-stage1
            - win64-clang-20-profile
            - win64-compiler-rt-20
            - vs-toolchain
            - win64-libxml2

win64-clang-20:
    description: "Clang-cl 20 toolchain build"
    attributes:
        local-toolchain: true
    treeherder:
        symbol: TW64(clang-20)
    worker-type: b-linux-docker-amd
    worker:
        max-run-time: 600
    run:
        script: repack-clang.sh
        toolchain-alias:
            by-project:
                toolchains: null
                default:
                    - win64-clang
                    - win64-clang-toolchain
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        toolchain:
            - linux64-cctools-port
            - win64-clang-20-raw
            - android-aarch64-compiler-rt-20
            - android-aarch64-libunwind-20
            - android-arm-compiler-rt-20
            - android-arm-libunwind-20
            - android-x64-compiler-rt-20
            - android-x64-libunwind-20
            - linux64-aarch64-compiler-rt-20
            - linux64-x64-compiler-rt-20
            - linux64-x86-compiler-rt-20
            - macosx64-aarch64-compiler-rt-20
            - macosx64-x64-compiler-rt-20
            - wasm32-wasi-compiler-rt-20
            - win32-compiler-rt-20
            - win64-compiler-rt-20
            - win64-aarch64-compiler-rt-20

win64-aarch64-clang-20-raw:
    description: "Clang-cl 20 toolchain build"
    treeherder:
        symbol: TWA64(clang-20-raw)
    worker:
        max-run-time: 3600
    run:
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-cl-artifact.json'
            - 'build/build-clang/win64-aarch64.json'
            - 'build/build-clang/clang-20.json'
            - 'build/build-clang/stage-4-pgo.json'
        resources:
            - 'build/build-clang/use-clang-cl-artifact.json'
            - 'build/build-clang/win64-aarch64.json'
            - 'build/build-clang/clang-20.json'
            - 'build/build-clang/stage-4-pgo.json'
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        fetch:
            - clang-20
        toolchain:
            - linux64-clang-20-stage1
            - linux64-clang-20-profile
            - win64-aarch64-compiler-rt-20
            - vs-toolchain
            - win64-aarch64-libxml2

win64-aarch64-clang-20:
    description: "Clang-cl 20 toolchain build"
    attributes:
        local-toolchain: true
    treeherder:
        symbol: TWA64(clang-20)
    worker-type: b-linux-docker-amd
    worker:
        max-run-time: 600
    run:
        script: repack-clang.sh
        toolchain-alias:
            by-project:
                toolchains: null
                default: win64-aarch64-clang
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        toolchain:
            - linux64-cctools-port
            - win64-aarch64-clang-20-raw
            - android-aarch64-compiler-rt-20
            - android-aarch64-libunwind-20
            - android-arm-compiler-rt-20
            - android-arm-libunwind-20
            - android-x64-compiler-rt-20
            - android-x64-libunwind-20
            - linux64-aarch64-compiler-rt-20
            - linux64-x64-compiler-rt-20
            - linux64-x86-compiler-rt-20
            - macosx64-aarch64-compiler-rt-20
            - macosx64-x64-compiler-rt-20
            - wasm32-wasi-compiler-rt-20
            - win32-compiler-rt-20
            - win64-compiler-rt-20
            - win64-aarch64-compiler-rt-20

linux64-clang-trunk-mingw-x86:
    description: "MinGW-Clang trunk x86 toolchain build"
    attributes:
        cached_task: false
    treeherder:
        symbol: TMW(clang-trunk-x86)
    worker-type: b-linux-docker-amd
    run:
        script: build-clang-mingw.sh
        arguments:
            - 'x86'
        resources:
            - 'taskcluster/scripts/misc/mingw-*.patch'
        toolchain-alias:
            by-project:
                toolchains: linux64-clang-mingw-x86
                default: null
        toolchain-artifact: public/build/clangmingw.tar.zst
    fetches:
        fetch:
            - clang-trunk
            - mingw-w64-trunk
            - llvm-mingw
            - gcc-9.5.0
        toolchain:
            - linux64-clang-trunk

linux64-clang-trunk-mingw-x64:
    description: "MinGW-Clang trunk x64 toolchain build"
    attributes:
        cached_task: false
    treeherder:
        symbol: TMW(clang-trunk-x64)
        tier: 1
    worker-type: b-linux-docker-amd
    run:
        script: build-clang-mingw.sh
        arguments:
            - 'x64'
        resources:
            - 'taskcluster/scripts/misc/mingw-*.patch'
        toolchain-alias:
            by-project:
                toolchains: linux64-clang-mingw-x64
                default: null
        toolchain-artifact: public/build/clangmingw.tar.zst
    fetches:
        fetch:
            - clang-trunk
            - mingw-w64-trunk
            - llvm-mingw
            - gcc-9.5.0
        toolchain:
            - linux64-clang-trunk

linux64-clang-trunk-stage1:
    description: "Clang trunk toolchain build"
    attributes:
        cached_task: false
    treeherder:
        symbol: TL(clang-trunk-stage1)
    run:
        using: toolchain-script
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-system-clang.json'
            - 'build/build-clang/clang-trunk.json'
            - 'build/build-clang/stage-1.json'
        resources:
            - 'build/build-clang/use-system-clang.json'
            - 'build/build-clang/clang-trunk.json'
            - 'build/build-clang/stage-1.json'
        toolchain-alias:
            by-project:
                toolchains: linux64-clang-toolchain
                default: null
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        fetch:
            - clang-trunk
        toolchain:
            - linux64-toolchain-sysroot

linux64-clang-trunk-profile:
    description: "Clang trunk toolchain build"
    attributes:
        cached_task: false
    treeherder:
        symbol: TL(clang-trunk-profile)
    run:
        using: toolchain-script
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/clang-trunk.json'
            - 'build/build-clang/stage-2-3-pgo.json'
        resources:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/clang-trunk.json'
            - 'build/build-clang/stage-2-3-pgo.json'
        toolchain-artifact: public/build/merged.profdata
    fetches:
        fetch:
            - clang-trunk
        toolchain:
            - linux64-clang-trunk-stage1
            - linux64-x64-compiler-rt-trunk
            - linux64-toolchain-sysroot

linux64-clang-trunk-raw:
    description: "Clang trunk toolchain build"
    attributes:
        cached_task: false
    treeherder:
        symbol: TL(clang-trunk-raw)
    run:
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/clang-trunk.json'
            - 'build/build-clang/stage-4-pgo.json'
            - 'build/build-clang/stage-4-bolt.json'
        resources:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/clang-trunk.json'
            - 'build/build-clang/stage-4-pgo.json'
            - 'build/build-clang/stage-4-bolt.json'
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        fetch:
            - clang-trunk
        toolchain:
            - linux64-clang-trunk-stage1
            - linux64-clang-trunk-profile
            - linux64-libxml2
            - linux64-toolchain-sysroot

linux64-clang-trunk:
    description: "Clang trunk toolchain build"
    attributes:
        cached_task: false
    treeherder:
        symbol: TL(clang-trunk)
    worker-type: b-linux-docker-amd
    worker:
        max-run-time: 600
    run:
        script: repack-clang.sh
        toolchain-alias:
            by-project:
                toolchains: linux64-clang
                default: null
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        toolchain:
            - linux64-cctools-port
            - linux64-clang-trunk-raw
            - android-aarch64-compiler-rt-trunk
            - android-aarch64-libunwind-trunk
            - android-arm-compiler-rt-trunk
            - android-arm-libunwind-trunk
            - android-x64-compiler-rt-trunk
            - android-x64-libunwind-trunk
            - linux64-aarch64-compiler-rt-trunk
            - linux64-x64-compiler-rt-trunk
            - linux64-x86-compiler-rt-trunk
            - macosx64-aarch64-compiler-rt-trunk
            - macosx64-x64-compiler-rt-trunk
            - wasm32-wasi-compiler-rt-trunk
            - win32-compiler-rt-trunk
            - win64-compiler-rt-trunk
            - win64-aarch64-compiler-rt-trunk

linux64-aarch64-clang-trunk-raw:
    description: "Clang trunk toolchain build"
    attributes:
        cached_task: false
    treeherder:
        symbol: TLA64(clang-trunk-raw)
    run:
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/linux64-aarch64.json'
            - 'build/build-clang/clang-trunk.json'
            - 'build/build-clang/stage-4-pgo.json'
        resources:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/linux64-aarch64.json'
            - 'build/build-clang/clang-trunk.json'
            - 'build/build-clang/stage-4-pgo.json'
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        fetch:
            - clang-trunk
        toolchain:
            - linux64-clang-trunk-stage1
            - linux64-clang-trunk-profile
            - linux64-aarch64-libxml2
            - linux64-aarch64-toolchain-sysroot

linux64-aarch64-clang-trunk:
    description: "Clang trunk toolchain build"
    attributes:
        cached_task: false
    treeherder:
        symbol: TLA64(clang-trunk)
    worker-type: b-linux-docker-amd
    worker:
        max-run-time: 600
    run:
        script: repack-clang.sh
        toolchain-alias:
            by-project:
                toolchains: linux64-aarch64-clang
                default: null
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        toolchain:
            - linux64-cctools-port
            - linux64-aarch64-clang-trunk-raw
            - android-aarch64-compiler-rt-trunk
            - android-aarch64-libunwind-trunk
            - android-arm-compiler-rt-trunk
            - android-arm-libunwind-trunk
            - android-x64-compiler-rt-trunk
            - android-x64-libunwind-trunk
            - linux64-aarch64-compiler-rt-trunk
            - linux64-x64-compiler-rt-trunk
            - linux64-x86-compiler-rt-trunk
            - macosx64-aarch64-compiler-rt-trunk
            - macosx64-x64-compiler-rt-trunk
            - wasm32-wasi-compiler-rt-trunk
            - win32-compiler-rt-trunk
            - win64-compiler-rt-trunk
            - win64-aarch64-compiler-rt-trunk

macosx64-clang-trunk-stage2:
    description: "Clang trunk toolchain build"
    attributes:
        cached_task: false
    treeherder:
        symbol: TM(clang-trunk-stage2)
    run:
        using: toolchain-script
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/macosx64.json'
            - 'build/build-clang/clang-trunk.json'
            - 'build/build-clang/stage-2-pgo.json'
        resources:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/macosx64.json'
            - 'build/build-clang/clang-trunk.json'
            - 'build/build-clang/stage-2-pgo.json'
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        fetch:
            - clang-trunk
        toolchain:
            - linux64-clang-trunk-stage1
            - macosx64-x64-compiler-rt-trunk
            - macosx64-sdk-toolchain

macosx64-clang-trunk-profile:
    description: "Clang trunk toolchain build"
    attributes:
        cached_task: false
    treeherder:
        symbol: TM(clang-trunk-profile)
    worker-type: b-osx-arm64
    worker:
        max-run-time: 7200
    run:
        using: toolchain-script
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/macosx64.json'
            - 'build/build-clang/clang-trunk.json'
            - 'build/build-clang/stage-3-pgo.json'
        resources:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/macosx64.json'
            - 'build/build-clang/clang-trunk.json'
            - 'build/build-clang/stage-3-pgo.json'
        toolchain-artifact: public/build/merged.profdata
    fetches:
        fetch:
            - clang-trunk
            - macosx64-cmake
            - macosx64-ninja
        toolchain:
            - macosx64-clang-trunk-stage2
            - macosx64-sdk-toolchain

macosx64-clang-trunk-raw:
    description: "Clang trunk toolchain build"
    attributes:
        cached_task: false
    treeherder:
        symbol: TM(clang-trunk-raw)
    worker:
        max-run-time: 3600
    run:
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/macosx64.json'
            - 'build/build-clang/clang-trunk.json'
            - 'build/build-clang/stage-4-pgo.json'
        resources:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/macosx64.json'
            - 'build/build-clang/clang-trunk.json'
            - 'build/build-clang/stage-4-pgo.json'
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        fetch:
            - clang-trunk
        toolchain:
            - linux64-clang-trunk-stage1
            - macosx64-clang-trunk-profile
            - macosx64-sdk-toolchain
            - macosx64-x64-compiler-rt-trunk

macosx64-clang-trunk:
    description: "Clang trunk toolchain repack with MacOS Compiler RT libs"
    attributes:
        cached_task: false
    treeherder:
        symbol: TM(clang-trunk)
    worker-type: b-linux-docker-amd
    worker:
        max-run-time: 600
    run:
        script: repack-clang.sh
        toolchain-alias:
            by-project:
                toolchains:
                    - macosx64-clang
                    - macosx64-clang-toolchain
                default: null
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        toolchain:
            - linux64-cctools-port
            - macosx64-clang-trunk-raw
            - android-aarch64-compiler-rt-trunk
            - android-aarch64-libunwind-trunk
            - android-arm-compiler-rt-trunk
            - android-arm-libunwind-trunk
            - android-x64-compiler-rt-trunk
            - android-x64-libunwind-trunk
            - linux64-aarch64-compiler-rt-trunk
            - linux64-x64-compiler-rt-trunk
            - linux64-x86-compiler-rt-trunk
            - macosx64-aarch64-compiler-rt-trunk
            - macosx64-x64-compiler-rt-trunk
            - wasm32-wasi-compiler-rt-trunk
            - win32-compiler-rt-trunk
            - win64-compiler-rt-trunk
            - win64-aarch64-compiler-rt-trunk

macosx64-aarch64-clang-trunk-stage2:
    description: "Clang trunk toolchain build"
    attributes:
        cached_task: false
    treeherder:
        symbol: TMA64(clang-trunk-stage2)
    run:
        using: toolchain-script
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/macosx64-aarch64.json'
            - 'build/build-clang/clang-trunk.json'
            - 'build/build-clang/stage-2-pgo.json'
        resources:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/macosx64-aarch64.json'
            - 'build/build-clang/clang-trunk.json'
            - 'build/build-clang/stage-2-pgo.json'
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        fetch:
            - clang-trunk
        toolchain:
            - linux64-clang-trunk-stage1
            - macosx64-aarch64-compiler-rt-trunk
            - macosx64-sdk-toolchain

macosx64-aarch64-clang-trunk-profile:
    description: "Clang trunk toolchain build"
    attributes:
        cached_task: false
    treeherder:
        symbol: TMA64(clang-trunk-profile)
    worker-type: b-osx-arm64
    worker:
        max-run-time: 7200
    run:
        using: toolchain-script
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/macosx64-aarch64.json'
            - 'build/build-clang/clang-trunk.json'
            - 'build/build-clang/stage-3-pgo.json'
        resources:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/macosx64-aarch64.json'
            - 'build/build-clang/clang-trunk.json'
            - 'build/build-clang/stage-3-pgo.json'
        toolchain-artifact: public/build/merged.profdata
    fetches:
        fetch:
            - clang-trunk
            - macosx64-cmake
            - macosx64-ninja
        toolchain:
            - macosx64-aarch64-clang-trunk-stage2
            - macosx64-sdk-toolchain

macosx64-aarch64-clang-trunk-raw:
    description: "Clang trunk toolchain build"
    attributes:
        cached_task: false
    treeherder:
        symbol: TMA64(clang-trunk-raw)
    worker:
        max-run-time: 3600
    run:
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/macosx64-aarch64.json'
            - 'build/build-clang/clang-trunk.json'
            - 'build/build-clang/stage-4-pgo.json'
        resources:
            - 'build/build-clang/use-clang-artifact.json'
            - 'build/build-clang/macosx64-aarch64.json'
            - 'build/build-clang/clang-trunk.json'
            - 'build/build-clang/stage-4-pgo.json'
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        fetch:
            - clang-trunk
        toolchain:
            - linux64-clang-trunk-stage1
            - macosx64-aarch64-clang-trunk-profile
            - macosx64-aarch64-compiler-rt-trunk
            - macosx64-sdk-toolchain

macosx64-aarch64-clang-trunk:
    description: "Clang trunk toolchain repack with MacOS Compiler RT libs"
    attributes:
        cached_task: false
    treeherder:
        symbol: TMA64(clang-trunk)
    worker-type: b-linux-docker-amd
    worker:
        max-run-time: 600
    run:
        script: repack-clang.sh
        toolchain-alias:
            by-project:
                toolchains: macosx64-aarch64-clang
                default: null
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        toolchain:
            - linux64-cctools-port
            - macosx64-aarch64-clang-trunk-raw
            - android-aarch64-compiler-rt-trunk
            - android-aarch64-libunwind-trunk
            - android-arm-compiler-rt-trunk
            - android-arm-libunwind-trunk
            - android-x64-compiler-rt-trunk
            - android-x64-libunwind-trunk
            - linux64-aarch64-compiler-rt-trunk
            - linux64-x64-compiler-rt-trunk
            - linux64-x86-compiler-rt-trunk
            - macosx64-aarch64-compiler-rt-trunk
            - macosx64-x64-compiler-rt-trunk
            - wasm32-wasi-compiler-rt-trunk
            - win32-compiler-rt-trunk
            - win64-compiler-rt-trunk
            - win64-aarch64-compiler-rt-trunk

win64-clang-trunk-stage2:
    description: "Clang-cl trunk toolchain build"
    attributes:
        cached_task: false
    treeherder:
        symbol: TW64(clang-trunk-stage2)
    run:
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-cl-artifact.json'
            - 'build/build-clang/win64.json'
            - 'build/build-clang/clang-trunk.json'
            - 'build/build-clang/stage-2-pgo.json'
        resources:
            - 'build/build-clang/use-clang-cl-artifact.json'
            - 'build/build-clang/win64.json'
            - 'build/build-clang/clang-trunk.json'
            - 'build/build-clang/stage-2-pgo.json'
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        fetch:
            - clang-trunk
        toolchain:
            - linux64-clang-trunk-stage1
            - vs-toolchain
            - win64-compiler-rt-trunk
            - win64-libxml2

win64-clang-trunk-profile:
    description: "Clang-cl trunk toolchain build"
    attributes:
        cached_task: false
    treeherder:
        symbol: TW64(clang-trunk-profile)
    worker-type: b-win2022
    worker:
        max-run-time: 9000
    run:
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-cl-artifact.json'
            - 'build/build-clang/win64.json'
            - 'build/build-clang/clang-trunk.json'
            - 'build/build-clang/stage-3-pgo.json'
        resources:
            - 'build/build-clang/use-clang-cl-artifact.json'
            - 'build/build-clang/win64.json'
            - 'build/build-clang/clang-trunk.json'
            - 'build/build-clang/stage-3-pgo.json'
        toolchain-artifact: public/build/merged.profdata
    fetches:
        fetch:
            - clang-trunk
            - win64-ninja
        toolchain:
            - win64-clang-trunk-stage2
            - win64-cmake
            - vs-toolchain
            - win64-libxml2

win64-clang-trunk-raw:
    description: "Clang-cl trunk toolchain build"
    attributes:
        cached_task: false
    treeherder:
        symbol: TW64(clang-trunk-raw)
    run:
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-cl-artifact.json'
            - 'build/build-clang/win64.json'
            - 'build/build-clang/clang-trunk.json'
            - 'build/build-clang/stage-4-pgo.json'
        resources:
            - 'build/build-clang/use-clang-cl-artifact.json'
            - 'build/build-clang/win64.json'
            - 'build/build-clang/clang-trunk.json'
            - 'build/build-clang/stage-4-pgo.json'
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        fetch:
            - clang-trunk
        toolchain:
            - linux64-clang-trunk-stage1
            - win64-clang-trunk-profile
            - win64-compiler-rt-trunk
            - vs-toolchain
            - win64-libxml2

win64-clang-trunk:
    description: "Clang-cl trunk toolchain build"
    attributes:
        cached_task: false
    treeherder:
        symbol: TW64(clang-trunk)
    worker-type: b-linux-docker-amd
    worker:
        max-run-time: 600
    run:
        script: repack-clang.sh
        toolchain-alias:
            by-project:
                toolchains:
                    - win64-clang
                    - win64-clang-toolchain
                default: null
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        toolchain:
            - linux64-cctools-port
            - win64-clang-trunk-raw
            - android-aarch64-compiler-rt-trunk
            - android-aarch64-libunwind-trunk
            - android-arm-compiler-rt-trunk
            - android-arm-libunwind-trunk
            - android-x64-compiler-rt-trunk
            - android-x64-libunwind-trunk
            - linux64-aarch64-compiler-rt-trunk
            - linux64-x64-compiler-rt-trunk
            - linux64-x86-compiler-rt-trunk
            - macosx64-aarch64-compiler-rt-trunk
            - macosx64-x64-compiler-rt-trunk
            - wasm32-wasi-compiler-rt-trunk
            - win32-compiler-rt-trunk
            - win64-compiler-rt-trunk
            - win64-aarch64-compiler-rt-trunk

win64-aarch64-clang-trunk-raw:
    description: "Clang-cl trunk toolchain build"
    attributes:
        cached_task: false
    treeherder:
        symbol: TWA64(clang-trunk-raw)
    worker:
        max-run-time: 3600
    run:
        script: build-clang.sh
        arguments:
            - 'build/build-clang/use-clang-cl-artifact.json'
            - 'build/build-clang/win64-aarch64.json'
            - 'build/build-clang/clang-trunk.json'
            - 'build/build-clang/stage-4-pgo.json'
        resources:
            - 'build/build-clang/use-clang-cl-artifact.json'
            - 'build/build-clang/win64-aarch64.json'
            - 'build/build-clang/clang-trunk.json'
            - 'build/build-clang/stage-4-pgo.json'
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        fetch:
            - clang-trunk
        toolchain:
            - linux64-clang-trunk-stage1
            - linux64-clang-trunk-profile
            - win64-aarch64-compiler-rt-trunk
            - vs-toolchain
            - win64-aarch64-libxml2

win64-aarch64-clang-trunk:
    description: "Clang-cl trunk toolchain build"
    attributes:
        cached_task: false
    treeherder:
        symbol: TWA64(clang-trunk)
    worker-type: b-linux-docker-amd
    worker:
        max-run-time: 600
    run:
        script: repack-clang.sh
        toolchain-alias:
            by-project:
                toolchains: win64-aarch64-clang
                default: null
        toolchain-artifact: public/build/clang.tar.zst
    fetches:
        toolchain:
            - linux64-cctools-port
            - win64-aarch64-clang-trunk-raw
            - android-aarch64-compiler-rt-trunk
            - android-aarch64-libunwind-trunk
            - android-arm-compiler-rt-trunk
            - android-arm-libunwind-trunk
            - android-x64-compiler-rt-trunk
            - android-x64-libunwind-trunk
            - linux64-aarch64-compiler-rt-trunk
            - linux64-x64-compiler-rt-trunk
            - linux64-x86-compiler-rt-trunk
            - macosx64-aarch64-compiler-rt-trunk
            - macosx64-x64-compiler-rt-trunk
            - wasm32-wasi-compiler-rt-trunk
            - win32-compiler-rt-trunk
            - win64-compiler-rt-trunk
            - win64-aarch64-compiler-rt-trunk
