# 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/.

linux64-clang-3.9:
    description: "Clang 3.9 toolchain build"
    treeherder:
        kind: build
        platform: toolchains/opt
        symbol: TL(clang3.9)
        tier: 1
    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
    worker:
        docker-image: {in-tree: desktop-build}
        max-run-time: 36000
    run:
        using: toolchain-script
        script: build-clang-3.9-linux.sh
        resources:
            - 'build/build-clang/build-clang.py'
            - 'build/build-clang/clang-3.9-linux64.json'
            - 'taskcluster/scripts/misc/tooltool-download.sh'
        toolchain-alias: linux64-clang
        toolchain-artifact: public/build/clang.tar.xz
    toolchains:
        - linux64-gcc-4.9

linux64-clang-4:
    description: "Clang 4 toolchain build"
    treeherder:
        kind: build
        platform: toolchains/opt
        symbol: TL(clang4)
        tier: 1
    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
    worker:
        docker-image: {in-tree: desktop-build}
        max-run-time: 36000
    run:
        using: toolchain-script
        script: build-clang-4-linux.sh
        resources:
            - 'build/build-clang/build-clang.py'
            - 'build/build-clang/clang-4-linux64.json'
            - 'taskcluster/scripts/misc/tooltool-download.sh'
        toolchain-artifact: public/build/clang.tar.xz
    toolchains:
        - linux64-gcc-4.9

linux64-clang-tidy:
    description: "Clang-tidy build"
    index:
        product: static-analysis
        job-name: linux64-clang-tidy
    treeherder:
        kind: build
        platform: toolchains/opt
        symbol: TL(clang-tidy)
        tier: 1
    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
    worker:
        docker-image: {in-tree: desktop-build}
        max-run-time: 36000
    run:
        using: toolchain-script
        script: build-clang-tidy-linux.sh
        resources:
            - 'build/clang-plugin/**'
            - 'build/build-clang/build-clang.py'
            - 'build/build-clang/clang-tidy-linux64.json'
            - 'taskcluster/scripts/misc/tooltool-download.sh'
        toolchain-artifact: public/build/clang-tidy.tar.xz
    toolchains:
        - linux64-gcc-4.9

linux64-gcc-4.9:
    description: "GCC 4.9 toolchain build"
    treeherder:
        kind: build
        platform: toolchains/opt
        symbol: TL(gcc4.9)
        tier: 1
    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
    worker:
        docker-image: {in-tree: desktop-build}
        max-run-time: 36000
    run:
        using: toolchain-script
        script: build-gcc-4.9-linux.sh
        resources:
            - 'build/unix/build-gcc/build-gcc.sh'
        toolchain-artifact: public/build/gcc.tar.xz

linux64-gcc-6:
    description: "GCC 6 toolchain build"
    treeherder:
        kind: build
        platform: toolchains/opt
        symbol: TL(gcc6)
        tier: 1
    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
    worker:
        docker-image: {in-tree: desktop-build}
        max-run-time: 36000
    run:
        using: toolchain-script
        script: build-gcc-6-linux.sh
        resources:
            - 'build/unix/build-gcc/build-gcc.sh'
        toolchain-alias: linux64-gcc
        toolchain-artifact: public/build/gcc.tar.xz

linux64-binutils:
    description: "Binutils toolchain build"
    treeherder:
        kind: build
        platform: toolchains/opt
        symbol: TL(binutil)
        tier: 1
    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
    worker:
        docker-image: {in-tree: desktop-build}
        max-run-time: 36000
    run:
        using: toolchain-script
        script: build-binutils-linux.sh
        resources:
            - 'build/unix/build-binutils/build-binutils.sh'
        toolchain-artifact: public/build/binutils.tar.xz

linux64-cctools-port:
    description: "cctools-port toolchain build"
    treeherder:
        kind: build
        platform: toolchains/opt
        symbol: TL(cctools)
        tier: 1
    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
    worker:
        docker-image: {in-tree: desktop-build}
        max-run-time: 36000
    run:
        using: toolchain-script
        script: build-cctools-port.sh
        resources:
            - 'taskcluster/scripts/misc/tooltool-download.sh'
        toolchain-artifact: public/build/cctools.tar.xz
    toolchains:
        - linux64-clang-3.9

linux64-hfsplus:
    description: "hfsplus toolchain build"
    treeherder:
        kind: build
        platform: toolchains/opt
        symbol: TL(hfs+)
        tier: 1
    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
    worker:
        docker-image: {in-tree: desktop-build}
        max-run-time: 36000
    run:
        using: toolchain-script
        script: build-hfsplus-linux.sh
        resources:
            - 'build/unix/build-hfsplus/build-hfsplus.sh'
            - 'taskcluster/scripts/misc/tooltool-download.sh'
        toolchain-artifact: public/build/hfsplus-tools.tar.xz
    toolchains:
        - linux64-clang-3.9

linux64-libdmg:
    description: "libdmg-hfsplus toolchain build"
    treeherder:
        kind: build
        platform: toolchains/opt
        symbol: TL(libdmg-hfs+)
        tier: 1
    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
    worker:
        docker-image: {in-tree: desktop-build}
        max-run-time: 36000
    run:
        using: toolchain-script
        script: build-libdmg-hfsplus.sh
        toolchain-artifact: public/build/dmg.tar.xz

linux64-sccache:
    description: "sccache toolchain build"
    treeherder:
        kind: build
        platform: toolchains/opt
        symbol: TL(sccache)
        tier: 1
    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
    worker:
        docker-image: {in-tree: desktop-build}
        max-run-time: 36000
        env:
            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/linux64/releng.manifest"
    run:
        using: toolchain-script
        script: build-sccache.sh
        resources:
            - 'taskcluster/scripts/misc/tooltool-download.sh'
        toolchain-artifact: public/build/sccache2.tar.xz
    toolchains:
        - linux64-clang-3.9

linux64-gn:
    description: "gn toolchain build"
    treeherder:
        kind: build
        platform: toolchains/opt
        symbol: TL(gn)
        tier: 1
    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
    worker:
        docker-image: {in-tree: desktop-build}
        max-run-time: 36000
    run:
        using: toolchain-script
        script: build-gn-linux.sh
        tooltool-downloads: public
        resources:
            - 'taskcluster/scripts/misc/tooltool-download.sh'
            - 'taskcluster/scripts/misc/build-gn-common.sh'
        toolchain-artifact: public/build/gn.tar.xz
    toolchains:
        - linux64-gcc-4.9
