config 5.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. # vim: filetype=yaml sw=2
  2. filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.gz'
  3. version: '1.60.0'
  4. container:
  5. use_container: 1
  6. targets:
  7. android:
  8. var:
  9. configure_opt: --enable-local-rust --enable-vendor --enable-extended --release-channel=stable --sysconfdir=etc --llvm-root=/var/tmp/dist/clang --set rust.jemalloc --target=x86_64-unknown-linux-gnu,armv7-linux-androideabi,thumbv7neon-linux-androideabi,aarch64-linux-android,i686-linux-android,x86_64-linux-android --set=target.armv7-linux-androideabi.cc=armv7a-linux-androideabi16-clang --set=target.armv7-linux-androideabi.ar=armv7a-linux-androideabi-ar --set=target.thumbv7neon-linux-androideabi.cc=armv7a-linux-androideabi16-clang --set=target.thumbv7neon-linux-androideabi.ar=armv7a-linux-androideabi-ar --set=target.aarch64-linux-android.cc=aarch64-linux-android21-clang --set=target.aarch64-linux-android.ar=aarch64-linux-android-ar --set=target.i686-linux-android.cc=i686-linux-android16-clang --set=target.i686-linux-android.ar=i686-linux-android-ar --set=target.x86_64-linux-android.cc=x86_64-linux-android21-clang --set=target.x86_64-linux-android.ar=x86_64-linux-android-ar
  10. linux:
  11. var:
  12. # We use
  13. # `--enable-local-rust` to avoid downloading the required compiler during
  14. # build time
  15. #
  16. # `--enable-vendor` to avoid downloading crates during build time and just
  17. # use the ones which are shipped with the source
  18. #
  19. # `--enable-extended` to build not only rustc but cargo as well
  20. #
  21. # `--release-channel=stable` to just include stable features in the
  22. # compiler
  23. #
  24. # `--sysconfdir=etc` to avoid install failures as |make install| wants to
  25. # write to /etc otherwise
  26. #
  27. # `--llvm-root=/var/tmp/dist/clang` to avoid building LLVM again while
  28. # building Rust
  29. #
  30. # --set rust.jemalloc to use jemalloc. This option is used also in the
  31. # prebuilt binaries, and without it the build never ends on Debian Jessie
  32. # (see tor-browser-build#40591)
  33. #
  34. # the `target` triple to explicitly specify the architecture and platform
  35. # for the compiler/std lib. Ideally, it should not be needed unless one is
  36. # cross-compiling, but compiling `alloc_jemalloc` fails without that in a
  37. # 32bit container. "--host=x86_64-unknown-linux-gnu" is used in its
  38. # configure script in this case.
  39. #
  40. # Finally, we tell Rust to use some tools from LLVM, like the prebuilt
  41. # binaries do.
  42. configure_opt: --enable-local-rust --enable-vendor --enable-extended --release-channel=stable --sysconfdir=etc --llvm-root=/var/tmp/dist/clang --set rust.jemalloc --target=x86_64-unknown-linux-gnu,i686-unknown-linux-gnu --set target.x86_64-unknown-linux-gnu.linker=clang --set target.x86_64-unknown-linux-gnu.ar=llvm-ar --set target.x86_64-unknown-linux-gnu.ranlib=llvm-ranlib --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
  43. macos:
  44. var:
  45. configure_opt: --enable-local-rust --enable-vendor --enable-extended --release-channel=stable --sysconfdir=etc --llvm-root=/var/tmp/dist/macosx-toolchain/clang --set rust.jemalloc --target=x86_64-unknown-linux-gnu,[% c("var/build_target") %] --set=target.[% c("var/build_target") %].cc=[% c("var/build_target") %]-clang --set target.x86_64-unknown-linux-gnu.linker=clang --set target.x86_64-unknown-linux-gnu.ar=llvm-ar --set target.x86_64-unknown-linux-gnu.ranlib=llvm-ranlib
  46. arch_deps:
  47. - pkg-config
  48. windows:
  49. var:
  50. # See tor-browser-build#29320
  51. compiler: mingw-w64
  52. configure_opt: --enable-local-rust --enable-vendor --enable-extended --release-channel=stable --sysconfdir=etc --llvm-root=/var/tmp/dist/clang --target=x86_64-unknown-linux-gnu,[% c("arch") %]-pc-windows-gnu --set target.x86_64-unknown-linux-gnu.linker=clang --set target.x86_64-unknown-linux-gnu.ar=llvm-ar --set target.x86_64-unknown-linux-gnu.ranlib=llvm-ranlib
  53. arch_deps:
  54. - pkg-config
  55. input_files:
  56. - project: container-image
  57. - name: binutils
  58. project: binutils
  59. - project: cmake
  60. name: cmake
  61. - project: '[% c("var/compiler") %]'
  62. name: '[% c("var/compiler") %]'
  63. - project: clang
  64. name: clang
  65. # On Windows we the basic Clang without additional Windows stuff because we
  66. # want to be sure GCC is used to compile Rust (Rust has a hard depedency on
  67. # libgcc, and the GNU/LLVM is a tier 3 platform supported only for x86_64).
  68. # macOS does not need Clang because it comes already with its compiler.
  69. enable: '[% c("var/linux") || c("var/android") || c("var/windows") %]'
  70. - URL: 'https://static.rust-lang.org/dist/rustc-[% c("version") %]-src.tar.gz'
  71. name: rust
  72. sig_ext: asc
  73. file_gpg_id: 1
  74. gpg_keyring: rust.gpg
  75. - URL: 'https://static.rust-lang.org/dist/rust-[% c("version") %]-x86_64-unknown-linux-gnu.tar.xz'
  76. name: rust_prebuilt
  77. sig_ext: asc
  78. file_gpg_id: 1
  79. gpg_keyring: rust.gpg
  80. - project: python
  81. name: python
  82. enable: '[% c("var/linux") %]'