config 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. # vim: filetype=yaml sw=2
  2. filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.gz'
  3. version: 1.34.2
  4. var:
  5. prev_version: 1.33.0
  6. rust_arch: '[% c("arch") %]'
  7. rust_host: '[% c("rust_arch") %]-unknown-linux-gnu'
  8. container:
  9. use_container: 1
  10. targets:
  11. android:
  12. var:
  13. rust_arch: x86_64
  14. arch_deps:
  15. - libssl-dev
  16. - pkg-config
  17. - zlib1g-dev
  18. android-armv7:
  19. var:
  20. configure_opt: --enable-local-rust --enable-vendor --enable-extended --release-channel=stable --sysconfdir=etc --target=armv7-linux-androideabi --set=target.armv7-linux-androideabi.cc=$ANDROID_NDK_HOME/arm/bin/arm-linux-androideabi-gcc
  21. android-x86:
  22. var:
  23. configure_opt: --enable-local-rust --enable-vendor --enable-extended --release-channel=stable --sysconfdir=etc --target=i686-linux-android --set=target.i686-linux-android.cc=$ANDROID_NDK_HOME/x86/bin/i686-linux-android-gcc
  24. android-aarch64:
  25. var:
  26. configure_opt: --enable-local-rust --enable-vendor --enable-extended --release-channel=stable --sysconfdir=etc --target=aarch64-linux-android --set=target.aarch64-linux-android.cc=$ANDROID_NDK_HOME/arm64/bin/aarch64-linux-android-gcc
  27. linux:
  28. var:
  29. rust_arch: x86_64
  30. deps:
  31. - libc6-dev-i386
  32. - lib32stdc++6
  33. - build-essential
  34. - python
  35. - automake
  36. - libssl-dev
  37. - pkg-config
  38. - hardening-wrapper
  39. # We use
  40. # `--enable-local-rust` to avoid downloading the required compiler during
  41. # build time
  42. #
  43. # `--enable-vendor` to avoid downloading crates during build time and just
  44. # use the ones which are shipped with the source
  45. #
  46. # `--enable-extended` to build not only rustc but cargo as well
  47. #
  48. # `--enable-llvm-static-stdccp` to take a libstdc++ on Wheezy into account
  49. # which is too old and if used gives undefined reference errors
  50. #
  51. # `--release-channel=stable` to just include stable features in the
  52. # compiler
  53. #
  54. # `--sysconfdir=etc` to avoid install failures as |make install| wants to
  55. # write to /etc otherwise
  56. #
  57. # the `target` triple to explicitly specify the architecture and platform
  58. # for the compiler/std lib. Ideally, it should not be needed unless one is
  59. # cross-compiling, but compiling `alloc_jemalloc` fails without that in a
  60. # 32bit container. "--host=x86_64-unknown-linux-gnu" is used in its
  61. # configure script in this case.
  62. # `--set=` to explicitly specify the C compiler. We need to compile the
  63. # bundled LLVM and it wants to use `cc`. However, we don't have that in
  64. # our compiled GCC resulting in weird errors due to C and C++ compiler
  65. # version mismatch. We avoid that with this configure option. We need to
  66. # build our own GCC in the first place as 4.7.2 is too old to get all the
  67. # Rust pieces compiled.
  68. configure_opt: --enable-local-rust --enable-vendor --enable-extended --enable-llvm-static-stdcpp --release-channel=stable --sysconfdir=etc --target=x86_64-unknown-linux-gnu,i686-unknown-linux-gnu[% IF c("var/linux-cross") -%],[% c("var/rust_target") %][% END -%] --set=target.x86_64-unknown-linux-gnu.cc=gcc --set=target.i686-unknown-linux-gnu.cc=gcc
  69. linux-x86_64:
  70. var:
  71. rust_target: '[% c("arch") %]-unknown-linux-gnu'
  72. linux-i686:
  73. var:
  74. rust_target: '[% c("arch") %]-unknown-linux-gnu'
  75. linux-arm:
  76. var:
  77. rust_target: armv7-unknown-linux-gnueabihf
  78. osx-x86_64:
  79. var:
  80. arch_deps:
  81. - libssl-dev
  82. - pkg-config
  83. - zlib1g-dev
  84. configure_opt: --enable-local-rust --enable-vendor --enable-extended --release-channel=stable --sysconfdir=etc --target=x86_64-apple-darwin --set=target.x86_64-apple-darwin.cc=x86_64-apple-darwin-clang
  85. windows:
  86. var:
  87. arch_deps:
  88. - libssl-dev
  89. - pkg-config
  90. - zlib1g-dev
  91. configure_opt: --enable-local-rust --enable-vendor --enable-extended --release-channel=stable --sysconfdir=etc --target=[% c("arch") %]-pc-windows-gnu
  92. input_files:
  93. - project: container-image
  94. - project: cmake
  95. name: cmake
  96. - project: '[% c("var/compiler") %]'
  97. name: '[% c("var/compiler") %]'
  98. - name: gcc-host
  99. project: gcc
  100. enable: '[% c("var/linux-cross") %]'
  101. target:
  102. - '[% c("var/channel") %]'
  103. - 'torbrowser-linux-x86_64'
  104. - URL: 'https://static.rust-lang.org/dist/rustc-[% c("version") %]-src.tar.gz'
  105. name: rust
  106. sig_ext: asc
  107. file_gpg_id: 1
  108. gpg_keyring: rust.gpg
  109. - URL: 'https://static.rust-lang.org/dist/rust-[% c("var/prev_version") %]-[% c("var/rust_arch") %]-unknown-linux-gnu.tar.xz'
  110. name: prev_rust
  111. sig_ext: asc
  112. file_gpg_id: 1
  113. gpg_keyring: rust.gpg
  114. - filename: unwind.patch
  115. enable: '[% c("var/windows-i686") %]'
  116. - filename: replace_pagesize_in_mmap.patch
  117. enable: '[% c("var/android") %]'
  118. - filename: 0001-Make-sure-dl_iterate_phdr-is-undefined-on-Android.patch
  119. enable: '[% c("var/android-armv7") %]'