# vim: filetype=yaml sw=2
filename: '[% project %]-[% c("version") %]-[% c("var/filename_targets") %]-[% c("var/build_id") %].tar.[% c("compress_tar") %]'
version: '1.78.0'
container:
  use_container: 1

var:
  filename_targets: "[% c('var/platform') %]"
  llvm_root: "/var/tmp/dist/clang"

targets:
  android:
    var:
      target: armv7-linux-androideabi,thumbv7neon-linux-androideabi,aarch64-linux-android,i686-linux-android,x86_64-linux-android
      target_flags: --set=target.armv7-linux-androideabi.cc=armv7a-linux-androideabi21-clang --set=target.armv7-linux-androideabi.ar=llvm-ar --set=target.thumbv7neon-linux-androideabi.cc=armv7a-linux-androideabi21-clang --set=target.thumbv7neon-linux-androideabi.ar=llvm-ar --set=target.aarch64-linux-android.cc=aarch64-linux-android21-clang --set=target.aarch64-linux-android.ar=llvm-ar --set=target.i686-linux-android.cc=i686-linux-android21-clang --set=target.i686-linux-android.ar=llvm-ar --set=target.x86_64-linux-android.cc=x86_64-linux-android21-clang --set=target.x86_64-linux-android.ar=llvm-ar

  linux:
    var:
      target: i686-unknown-linux-gnu
      target_flags: --set target.i686-unknown-linux-gnu.linker=clang --set target.i686-unknown-linux-gnu.ar=llvm-ar --set target.i686-unknown-linux-gnu.ranlib=llvm-ranlib

  linux-aarch64:
    var:
      target: aarch64-unknown-linux-gnu
      target_flags: --set target.aarch64-unknown-linux-gnu.linker=aarch64-linux-gnu-gcc --set target.aarch64-unknown-linux-gnu.ar=llvm-ar --set target.aarch64-unknown-linux-gnu.ranlib=llvm-ranlib

  macos:
    var:
      target: '[% c("var/build_target") %]'
      target_flags: --set=target.[% c("var/build_target") %].cc=[% c("var/build_target") %]-clang
      llvm_root: "/var/tmp/dist/macosx-toolchain/clang"
      filename_targets: "[% c('var/osname') %]"
      arch_deps:
        - pkg-config

  windows:
    var:
      target: x86_64-pc-windows-gnullvm,i686-pc-windows-gnullvm
      target_flags: --set target.x86_64-pc-windows-gnullvm.linker=x86_64-w64-mingw32-clang --set target.i686-pc-windows-gnullvm.linker=i686-w64-mingw32-clang
      llvm_root: "/var/tmp/dist/mingw-w64-clang"
      arch_deps:
        - pkg-config

input_files:
  - project: container-image
  - project: cmake
    name: cmake
  - project: '[% c("var/compiler") %]'
    name: '[% c("var/compiler") %]'
  - project: clang
    name: clang
    enable: '[% c("var/linux") || c("var/android") ]'
  - project: ninja
    name: ninja
  - URL: 'https://static.rust-lang.org/dist/rustc-[% c("version") %]-src.tar.gz'
    name: rust
    sig_ext: asc
    file_gpg_id: 1
    gpg_keyring: rust.gpg
  - URL: 'https://static.rust-lang.org/dist/rust-[% c("version") %]-x86_64-unknown-linux-gnu.tar.xz'
    name: rust_prebuilt
    sig_ext: asc
    file_gpg_id: 1
    gpg_keyring: rust.gpg
  - project: python
    name: python
    enable: '[% c("var/linux") %]'
  - filename: chkstk.patch
    enable: '[% c("var/windows") %]'
