# 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:
    description: "jj toolchain build"
    attributes:
        local-toolchain: true
    worker-type: b-linux-docker-amd
    worker:
        max-run-time: 1800
        env:
            FETCH: jj/cli
            PKG_CONFIG_LIBDIR: ""
    run:
        script: build-rust-based-toolchain.sh
        toolchain-artifact: public/build/jj.tar.zst
    fetches:
        fetch:
            - jj
        toolchain:
            - linux64-clang-toolchain
            - linux64-rust-cross
            - sysroot-x86_64-linux-gnu

linux64-jj:
    treeherder:
        symbol: TL(jj)
    run:
        arguments:
            - x86_64-unknown-linux-gnu
            - jj-lib/vendored-openssl

macosx64-jj:
    treeherder:
        symbol: TM(jj)
    run:
        arguments:
            - x86_64-apple-darwin
            - jj-lib/vendored-openssl
    fetches:
        toolchain:
            - macosx64-sdk-toolchain

macosx64-aarch64-jj:
    treeherder:
        symbol: TMA64(jj)
    run:
        arguments:
            - aarch64-apple-darwin
            - jj-lib/vendored-openssl
    fetches:
        toolchain:
            - macosx64-sdk-toolchain

win64-jj:
    treeherder:
        symbol: TW64(jj)
    run:
        arguments:
            - x86_64-pc-windows-msvc
            - jj-lib/vendored-openssl
    fetches:
        toolchain:
            - vs-toolchain

win64-aarch64-jj:
    treeherder:
        symbol: TWA64(jj)
    run:
        arguments:
            - aarch64-pc-windows-msvc
            - jj-lib/vendored-openssl
    fetches:
        toolchain:
            - vs-toolchain
