config 5.1 KB

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