[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/tor-browser-build][main] Bug 40818: Enable wasm target for rust



Title: GitLab

Pier Angelo Vendrame pushed to branch main at The Tor Project / Applications / tor-browser-build

Commits:

  • d86056dd
    by Cecylia Bocovich at 2023-04-20T13:11:22+00:00
    Bug 40818: Enable wasm target for rust
    

2 changed files:

Changes:

  • projects/rust/build
    ... ... @@ -6,6 +6,8 @@ tar -C /var/tmp/dist -xf [% c('input_files_by_name/cmake') %]
    6 6
     export PATH="/var/tmp/dist/cmake/bin:$PATH"
    
    7 7
     tar -C /var/tmp/dist -xf [% c('input_files_by_name/binutils') %]
    
    8 8
     export PATH=/var/tmp/dist/binutils/bin:$PATH
    
    9
    +tar -C /var/tmp/dist -xf [% c('input_files_by_name/ninja') %]
    
    10
    +export PATH=/var/tmp/dist/ninja:$PATH
    
    9 11
     tar -C /var/tmp/dist -xf [% c('input_files_by_name/rust_prebuilt') %]
    
    10 12
     cd /var/tmp/dist/rust-[% c('version') %]-x86_64-unknown-linux-gnu
    
    11 13
     ./install.sh --prefix=$distdir-rust-prebuilt
    
    ... ... @@ -52,6 +54,11 @@ mkdir /var/tmp/build
    52 54
     tar -C /var/tmp/build -xf  [% c('input_files_by_name/rust') %]
    
    53 55
     cd /var/tmp/build/rustc-[% c('version') %]-src
    
    54 56
     
    
    57
    +# This is a workaround to get access to the libunwind header files. Our LLVM_CONFIG
    
    58
    +# thinks that the llvm source root is at /var/tmp/dist/clang-source because that's
    
    59
    +# where it was when clang was compiled.
    
    60
    +ln -s "/var/tmp/build/rustc-[% c('version') %]-src/src/llvm-project" "/var/tmp/build/clang-source"
    
    61
    +
    
    55 62
     mkdir build
    
    56 63
     cd build
    
    57 64
     ../configure --prefix=$distdir --disable-docs --disable-compiler-docs [% c("var/configure_opt") %]
    

  • projects/rust/config
    ... ... @@ -7,7 +7,7 @@ container:
    7 7
     targets:
    
    8 8
       android:
    
    9 9
         var:
    
    10
    -      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
    +      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,wasm32-unknown-unknown --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 --set target.wasm32-unknown-unknown.linker=clang --set target.wasm32-unknown-unknown.ar=llvm-ar --set target.wasm32-unknown-unknown.ranlib=llvm-ranlib --set rust.lld=true
    
    11 11
     
    
    12 12
       linux:
    
    13 13
         var:
    
    ... ... @@ -41,11 +41,11 @@ targets:
    41 41
           #
    
    42 42
           # Finally, we tell Rust to use some tools from LLVM, like the prebuilt
    
    43 43
           # binaries do.
    
    44
    -      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
    
    44
    +      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,wasm32-unknown-unknown --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 --set target.wasm32-unknown-unknown.linker=clang --set target.wasm32-unknown-unknown.ar=llvm-ar --set target.wasm32-unknown-unknown.ranlib=llvm-ranlib --set rust.lld=true
    
    45 45
     
    
    46 46
       macos:
    
    47 47
         var:
    
    48
    -      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
    
    48
    +      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") %],wasm32-unknown-unknown --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 --set target.wasm32-unknown-unknown.linker=clang --set target.wasm32-unknown-unknown.ar=llvm-ar --set target.wasm32-unknown-unknown.ranlib=llvm-ranlib --set rust.lld=true
    
    49 49
           arch_deps:
    
    50 50
             - pkg-config
    
    51 51
     
    
    ... ... @@ -53,7 +53,7 @@ targets:
    53 53
         var:
    
    54 54
           # See tor-browser-build#29320
    
    55 55
           compiler: mingw-w64
    
    56
    -      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
    
    56
    +      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,wasm32-unknown-unknown --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.wasm32-unknown-unknown.linker=clang --set target.wasm32-unknown-unknown.ar=llvm-ar --set target.wasm32-unknown-unknown.ranlib=llvm-ranlib --set rust.lld=true
    
    57 57
           arch_deps:
    
    58 58
             - pkg-config
    
    59 59
     
    
    ... ... @@ -72,6 +72,8 @@ input_files:
    72 72
         # libgcc, and the GNU/LLVM is a tier 3 platform supported only for x86_64).
    
    73 73
         # macOS does not need Clang because it comes already with its compiler.
    
    74 74
         enable: '[% c("var/linux") || c("var/android") || c("var/windows") %]'
    
    75
    +  - project: ninja
    
    76
    +    name: ninja
    
    75 77
       - URL: 'https://static.rust-lang.org/dist/rustc-[% c("version") %]-src.tar.gz'
    
    76 78
         name: rust
    
    77 79
         sig_ext: asc
    

  • _______________________________________________
    tor-commits mailing list
    tor-commits@xxxxxxxxxxxxxxxxxxxx
    https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits