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

[tor-commits] [Git][tpo/applications/tor-browser-build][main] Bug 41393 - Create special clang packaged for Linux



Title: GitLab

brizental pushed to branch main at The Tor Project / Applications / tor-browser-build

Commits:

  • 8fbb192b
    by Beatriz Rizental at 2025-04-02T15:01:36+02:00
    Bug 41393 - Create special clang packaged for Linux
    
    Building Firefox requires compiler-rt wasm32 library to be
    packaged alongside clang.
    
    We were doing this step inside the firefox and geckoview
    projects, but that meant one can't simply download the clang
    toolchain and use it for dev builds.
    
    MacOS and Windows already have separate projects to package
    clang with other libraries, so a step to include the wasm32
    compiler-rt lib was added to each of them.
    

17 changed files:

Changes:

  • projects/clang-linux/README.md
    1
    +This projects packages extra libraries and tools alongside clang for Firefox developement
    
    2
    +on Linux and Android. It is the default compiler for 'firefox' and 'geckoview' projects
    
    3
    +on Linux and Android.

  • projects/clang-linux/build
    1
    +#!/bin/bash
    
    2
    +[% c("var/set_default_env") -%]
    
    3
    +distdir=/var/tmp/dist/[% project %]
    
    4
    +mkdir -p /var/tmp/dist
    
    5
    +
    
    6
    +tar -C /var/tmp/dist -xf [% c('input_files_by_name/clang') %]
    
    7
    +tar -C /var/tmp/dist -xf [% c('input_files_by_name/wasi-compiler-rt') %]
    
    8
    +
    
    9
    +[% IF c("var/android") -%]
    
    10
    +  tar -C /var/tmp/dist -xf [% c('input_files_by_name/llvm-runtimes') %]
    
    11
    +  cp -r /var/tmp/dist/llvm-runtimes/* /var/tmp/dist/clang
    
    12
    +[% END -%]
    
    13
    +
    
    14
    +mkdir $distdir
    
    15
    +mv /var/tmp/dist/clang/* $distdir/
    
    16
    +
    
    17
    +cd /var/tmp/dist
    
    18
    +[% c('tar', {
    
    19
    +    tar_src => [ project ],
    
    20
    +    tar_args => '-caf ' _ dest_dir _ '/' _ c('filename'),
    
    21
    +  }) %]

  • projects/clang-linux/config
    1
    +# vim: filetype=yaml sw=2
    
    2
    +version: '[% c("var/llvm_version") %]'
    
    3
    +filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.[% c("compress_tar") %]'
    
    4
    +container:
    
    5
    +  use_container: 1
    
    6
    +
    
    7
    +input_files:
    
    8
    +  - project: container-image
    
    9
    +  - name: clang
    
    10
    +    project: clang
    
    11
    +  - project: wasi-sysroot
    
    12
    +    name: wasi-compiler-rt
    
    13
    +    pkg_type: build_compiler_rt
    
    14
    +  - project: llvm-runtimes
    
    15
    +    name: llvm-runtimes
    
    16
    +    enable: '[% c("var/android") %]'

  • projects/clang/README.md
    1 1
     This is the Clang compiler.
    
    2 2
     
    
    3
    -For Linux and Android, we use it only to build Firefox and GeckoView.
    
    4
    -For Windows and macOS, we use it to build everything, but we do not use this
    
    3
    +For Linux and Android, we use it only to build Firefox and GeckoView, but we do
    
    4
    +not use this project directly. Instead, we use `clang-linux`,
    
    5
    +that adds platform-specific libraries and tools.
    
    6
    +For Windows and macOS, we use it to build everything, but we also do not use this
    
    5 7
     project directly. Instead, we use `mingw-w64-clang` and `macosx_toolchain`, that
    
    6 8
     also add platform-specific libraries and tools.
    
    7 9
     
    

  • projects/firefox/build
    ... ... @@ -37,7 +37,7 @@ export PATH="/var/tmp/dist/rust/bin:/var/tmp/dist/cbindgen:/var/tmp/dist/node/bi
    37 37
       [% END -%]
    
    38 38
       # Use clang for everything on Linux now if we don't build with ASan.
    
    39 39
       [% IF ! c("var/asan") -%]
    
    40
    -    export PATH="/var/tmp/dist/clang/bin:$PATH"
    
    40
    +    export PATH="/var/tmp/dist/clang-linux/bin:$PATH"
    
    41 41
       [% END -%]
    
    42 42
       [% IF c("var/linux-i686") -%]
    
    43 43
         # Exporting `PKG_CONFIG_PATH` in the mozconfig file is causing build
    
    ... ... @@ -51,20 +51,7 @@ export PATH="/var/tmp/dist/rust/bin:/var/tmp/dist/cbindgen:/var/tmp/dist/node/bi
    51 51
     
    
    52 52
     [% IF c("var/rlbox") -%]
    
    53 53
       tar -C /var/tmp/dist -xf [% c('input_files_by_name/wasi-sysroot') %]
    
    54
    -  # XXX: We need the libclang_rt.builtins-wasm32.a in our clang lib directory.
    
    55
    -  # Copy it over.
    
    56
    -  # https://searchfox.org/mozilla-central/source/build/build-clang/build-clang.py#890,
    
    57
    -  # include it directly in our clang
    
    58
    -  [% IF c("var/macos") -%]
    
    59
    -    rtdir=/var/tmp/dist/macosx-toolchain/clang/lib/clang/[% pc("llvm-project", "var/llvm_major") %]/lib/wasi
    
    60
    -  [% ELSIF c("var/windows") -%]
    
    61
    -    rtdir=/var/tmp/dist/mingw-w64-clang/lib/clang/[% pc("llvm-project", "var/llvm_major") %]/lib/wasi
    
    62
    -  [% ELSE -%]
    
    63
    -    rtdir=/var/tmp/dist/clang/lib/clang/[% pc("llvm-project", "var/llvm_major") %]/lib/wasi
    
    64
    -  [% END -%]
    
    65
    -  mkdir -p $rtdir
    
    66
    -  cp /var/tmp/dist/wasi-sysroot/lib/clang/*/lib/wasi/libclang_rt.builtins-wasm32.a $rtdir
    
    67
    -  export WASI_SYSROOT=/var/tmp/dist/wasi-sysroot/share/wasi-sysroot
    
    54
    +  export WASI_SYSROOT=/var/tmp/dist/wasi-sysroot
    
    68 55
     [% END -%]
    
    69 56
     
    
    70 57
     tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.[% c('compress_tar') %]
    

  • projects/firefox/config
    ... ... @@ -206,7 +206,7 @@ input_files:
    206 206
       - project: python
    
    207 207
         name: python
    
    208 208
         enable: '[% c("var/linux") %]'
    
    209
    -  - project: clang
    
    209
    +  - project: clang-linux
    
    210 210
         name: clang
    
    211 211
         enable: '[% c("var/linux") %]'
    
    212 212
       - project: fxc2
    

  • projects/geckoview/build
    ... ... @@ -5,21 +5,12 @@ tar -C /var/tmp/dist -xf [% c('input_files_by_name/rust') %]
    5 5
     tar -C /var/tmp/dist -xf [% c('input_files_by_name/cbindgen') %]
    
    6 6
     tar -C /var/tmp/dist -xf [% c('input_files_by_name/nasm') %]
    
    7 7
     tar -C /var/tmp/dist -xf [% c('input_files_by_name/clang') %]
    
    8
    -export LLVM_CONFIG="/var/tmp/dist/clang/bin/llvm-config"
    
    9
    -tar -C /var/tmp/dist -xf [% c('input_files_by_name/llvm-runtimes') %]
    
    10
    -cp -r /var/tmp/dist/llvm-runtimes/* /var/tmp/dist/clang/
    
    11
    -export PATH="/var/tmp/dist/rust/bin:/var/tmp/dist/cbindgen:/var/tmp/dist/nasm/bin:/var/tmp/dist/clang/bin:$PATH"
    
    8
    +export LLVM_CONFIG="/var/tmp/dist/clang-linux/bin/llvm-config"
    
    9
    +export PATH="/var/tmp/dist/rust/bin:/var/tmp/dist/cbindgen:/var/tmp/dist/nasm/bin:/var/tmp/dist/clang-linux/bin:$PATH"
    
    12 10
     
    
    13 11
     [% IF c("var/rlbox") -%]
    
    14 12
       tar -C /var/tmp/dist -xf [% c('input_files_by_name/wasi-sysroot') %]
    
    15
    -  # XXX: We need the libclang_rt.builtins-wasm32.a in our clang lib directory.
    
    16
    -  # Copy it over.
    
    17
    -  # https://searchfox.org/mozilla-central/source/build/build-clang/build-clang.py#890,
    
    18
    -  # include it directly in our clang
    
    19
    -  rtdir="/var/tmp/dist/clang/lib/clang/[% pc('llvm-project', 'var/llvm_major') %]/lib/wasi"
    
    20
    -  mkdir -p "$rtdir"
    
    21
    -  cp /var/tmp/dist/wasi-sysroot/lib/clang/*/lib/wasi/libclang_rt.builtins-wasm32.a "$rtdir/"
    
    22
    -  export WASI_SYSROOT=/var/tmp/dist/wasi-sysroot/share/wasi-sysroot
    
    13
    +  export WASI_SYSROOT=/var/tmp/dist/wasi-sysroot/
    
    23 14
     [% END -%]
    
    24 15
     
    
    25 16
     cd /var/tmp/build/[% project %]-[% c("version") %]
    

  • projects/geckoview/config
    ... ... @@ -142,10 +142,8 @@ input_files:
    142 142
         name: node
    
    143 143
       - project: nasm
    
    144 144
         name: nasm
    
    145
    -  - project: clang
    
    145
    +  - project: clang-linux
    
    146 146
         name: clang
    
    147
    -  - project: llvm-runtimes
    
    148
    -    name: llvm-runtimes
    
    149 147
       - project: wasi-sysroot
    
    150 148
         name: wasi-sysroot
    
    151 149
         enable: '[% c("var/rlbox") %]'
    

  • projects/macosx-toolchain/build
    ... ... @@ -7,6 +7,7 @@ mkdir -p "$distdir"
    7 7
     tar -C /var/tmp/dist -xf [% c('input_files_by_name/cmake') %]
    
    8 8
     tar -C /var/tmp/dist -xf [% c('input_files_by_name/ninja') %]
    
    9 9
     tar -C $distdir -xf [% c('input_files_by_name/clang') %]
    
    10
    +tar -C $distdir -xf $rootdir/[% c('input_files_by_name/wasi-compiler-rt') %]
    
    10 11
     tar -C $distdir -xf [% c('input_files_by_name/cctools') %]
    
    11 12
     tar -C $builddir -xf [% c('input_files_by_name/llvm-project') %]
    
    12 13
     
    

  • projects/macosx-toolchain/config
    ... ... @@ -32,6 +32,9 @@ input_files:
    32 32
         sha512sum: a4e05d2a051027620c86f72694da126a2ceed59b8740270426c4ca3adb38e16fe981b536a373a7f0cdcc84bbe9d9149608ccd03967dbd94262548ccadbfa0f5d
    
    33 33
       - name: llvm-project
    
    34 34
         project: llvm-project
    
    35
    +  - project: wasi-sysroot
    
    36
    +    name: wasi-compiler-rt
    
    37
    +    pkg_type: build_compiler_rt
    
    35 38
       - filename: macpkg.py
    
    36 39
       - filename: unpack-sdk.py
    
    37 40
       - filename: tools.diff

  • projects/mingw-w64-clang/build
    ... ... @@ -6,6 +6,7 @@ mkdir -p $distdir $builddir
    6 6
     
    
    7 7
     cd /var/tmp/dist
    
    8 8
     tar -xf $rootdir/[% c('input_files_by_name/clang') %]
    
    9
    +tar -xf $rootdir/[% c('input_files_by_name/wasi-compiler-rt') %]
    
    9 10
     mv clang/* mingw-w64-clang/
    
    10 11
     tar -xf $rootdir/[% c('input_files_by_name/cmake') %]
    
    11 12
     
    

  • projects/mingw-w64-clang/config
    ... ... @@ -20,6 +20,9 @@ input_files:
    20 20
         name: cmake
    
    21 21
       - project: llvm-project
    
    22 22
         name: llvm-project
    
    23
    +  - project: wasi-sysroot
    
    24
    +    name: wasi-compiler-rt
    
    25
    +    pkg_type: build_compiler_rt
    
    23 26
       # Wrapper from github.com/mstorsjo/llvm-mingw@b34e1cd82b9eff3dcedfac152f25e0ccb6da33aa.
    
    24 27
       # This is the last commit at which windres-wrapper.c was modified.
    
    25 28
       # Mozilla uses 9f8e5cebd6dbbb7546e8917e6c59284699a48d26 (see
    

  • projects/wasi-sysroot/README.md
    ... ... @@ -30,13 +30,14 @@ We stick to the same version used by Firefox, that can be found in the usual
    30 30
     
    
    31 31
     # Mozilla's build script
    
    32 32
     
    
    33
    -Our build script is an adaptation of Firefox's
    
    34
    -`taskcluster/scripts/misc/build-sysroot-wasi.sh`.
    
    35
    -After ESR updates, we should check if that script was updated.
    
    36
    -
    
    37
    -The main difference is that Mozilla builds `libclang_rt.builtins-wasm32.a` with
    
    38
    -Clang, whereas we build it here and inject it only in the `firefox`/`geckoview`
    
    39
    -projects.
    
    33
    +Similar to Firefox's build system, this project has two different build targets.
    
    34
    +The default `build` target builds the wasi-sysroot, while the `build_compiler_rt`
    
    35
    +target builds the wasm32 compiler-rt which gets injected into clang by the `clang-linux`,
    
    36
    +`mingw-w64-clang` and `macosx-toolchain` projects.
    
    37
    +
    
    38
    +These build scripts are adaptations of Firefox's `taskcluster/scripts/misc/build-sysroot-wasi.sh`
    
    39
    +and `taskcluster/scripts/misc/build-compiler-rt-wasi.sh`. **After ESR updates, we should
    
    40
    +check if that script was updated.**
    
    40 41
     
    
    41 42
     # Different build ids, same outputs
    
    42 43
     
    

  • projects/wasi-sysroot/build
    1 1
     #!/bin/bash
    
    2
    -[% c("var/set_default_env") -%]
    
    3
    -distdir=/var/tmp/dist/[% project %]
    
    4
    -builddir=/var/tmp/build/[% project %]-[% c("abbrev") %]
    
    5
    -mkdir -p $distdir
    
    6
    -tar -C /var/tmp/dist -xf [% c('input_files_by_name/cmake') %]
    
    7
    -tar -C /var/tmp/dist -xf [% c('input_files_by_name/ninja') %]
    
    8
    -export PATH="/var/tmp/dist/ninja:/var/tmp/dist/cmake/bin:$PATH"
    
    2
    +[% INCLUDE 'build_common' %]
    
    9 3
     
    
    10
    -[% IF c("var/linux") -%]
    
    11
    -  [% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %]
    
    12
    -  [% pc('python', 'var/setup', { python_tarfile => c('input_files_by_name/python') }) %]
    
    13
    -[% END -%]
    
    4
    +# We already packed compiler-rt alongside clang.
    
    5
    +# Just let the build system know it's there.
    
    6
    +touch build/compiler-rt.BUILT
    
    14 7
     
    
    15
    -mkdir -p /var/tmp/build
    
    16
    -tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.[% c('compress_tar') %]
    
    17
    -
    
    18
    -cd /var/tmp/build
    
    19
    -tar -xf $rootdir/[% project %]-[% c('version') %].tar.[% c('compress_tar') %]
    
    20
    -cd $builddir
    
    21
    -
    
    22
    -pushd src
    
    23
    -rmdir config llvm-project wasi-libc
    
    24
    -tar -xf $rootdir/[% c('input_files_by_name/wasi-config') %]
    
    25
    -mv wasi-config-* config
    
    26
    -tar -xf $rootdir/[% c('input_files_by_name/clang-source') %]
    
    27
    -mv clang-source llvm-project
    
    28
    -export LLVM_HOME=$(pwd)/llvm-project
    
    29
    -tar -xf $rootdir/[% c('input_files_by_name/wasi-libc') %]
    
    30
    -mv wasi-libc-* wasi-libc
    
    31
    -popd
    
    32
    -
    
    33
    -# What follows has been copied from Firefox's
    
    34
    -# taskcluster/scripts/misc/build-sysroot-wasi.sh and adapted to
    
    35
    -# tor-browser-build.
    
    36
    -
    
    37
    -patch -p1 < $rootdir/wasi-sdk.patch
    
    38
    -
    
    39
    -mkdir -p build/install/wasi
    
    40
    -# The wasi-sdk build system wants to build clang itself. We trick it into
    
    41
    -# thinking it did, and put our own clang where it would have built its own.
    
    42
    -tar -C build -xf $rootdir/[% c('input_files_by_name/clang') %]
    
    43
    -mv build/clang build/llvm
    
    44
    -touch build/llvm.BUILT
    
    45
    -
    
    46
    -# The wasi-sdk build system wants a clang and an ar binary in
    
    47
    -# build/install/$PREFIX/bin
    
    48
    -ln -s $(pwd)/build/llvm/bin build/install/wasi/bin
    
    49
    -ln -s llvm-ar build/install/wasi/bin/ar
    
    50
    -
    
    51
    -# tor-browser-build: we have no .git in our tarball but the script version.sh
    
    52
    -# used by the Makefile depends on that. We replace the script.
    
    53
    -cat > 'version.sh' << EOF
    
    54
    -#!/bin/sh
    
    55
    -echo '[% c("abbrev") %]'
    
    56
    -EOF
    
    57
    -
    
    58
    -# Build wasi-libc, and re-pack it, to make sure we get a deterministic output.
    
    59
    -make PREFIX=/wasi build/wasi-libc.BUILT
    
    60
    -
    
    61
    -# We need to compile compiler-rt before building libc++ and libc++abi, because
    
    62
    -# we need to inject it to Clang.
    
    63
    -make \
    
    64
    -  LLVM_PROJ_DIR=$LLVM_HOME \
    
    65
    -  PREFIX=/wasi \
    
    66
    -  build/compiler-rt.BUILT \
    
    67
    -  NINJA_FLAGS='-j[% c("num_procs") %]'
    
    68
    -
    
    69
    -# Does Mozilla maybe do this when compiling Clang?
    
    70
    -rtdir="build/llvm/lib/clang/$(ls build/llvm/lib/clang)/lib/wasi"
    
    71
    -mkdir -p "$rtdir"
    
    72
    -cp build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a "$rtdir/"
    
    73
    -
    
    74
    -# Now we can finally build libc++ and libc++abi.
    
    75 8
     make \
    
    76 9
       LLVM_PROJ_DIR=$LLVM_HOME \
    
    77 10
       PREFIX=/wasi \
    
    78 11
       build/libcxx.BUILT \
    
    79 12
       NINJA_FLAGS='-j[% c("num_procs") %]'
    
    80 13
     
    
    81
    -mv build/install/wasi/share $distdir/
    
    82
    -mv build/install/wasi/lib $distdir/
    
    14
    +mv build/install/wasi/share/wasi-sysroot/* $distdir/
    
    83 15
     
    
    84 16
     cd /var/tmp/dist
    
    85 17
     [% c('tar', {
    

  • projects/wasi-sysroot/build_common
    1
    +#!/bin/bash
    
    2
    +[% c("var/set_default_env") -%]
    
    3
    +is_compiler_rt=[% c("var/is_compiler_rt") %]
    
    4
    +[% IF c("var/is_compiler_rt") -%]
    
    5
    +  distdir=/var/tmp/dist/wasi-compiler-rt
    
    6
    +[% ELSE -%]
    
    7
    +  distdir=/var/tmp/dist/[% project %]
    
    8
    +[% END -%]
    
    9
    +builddir=/var/tmp/build/[% project %]-[% c("abbrev") %]
    
    10
    +mkdir -p $distdir
    
    11
    +tar -C /var/tmp/dist -xf [% c('input_files_by_name/cmake') %]
    
    12
    +tar -C /var/tmp/dist -xf [% c('input_files_by_name/ninja') %]
    
    13
    +export PATH="/var/tmp/dist/ninja:/var/tmp/dist/cmake/bin:$PATH"
    
    14
    +
    
    15
    +[% IF c("var/linux") -%]
    
    16
    +  [% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %]
    
    17
    +  [% pc('python', 'var/setup', { python_tarfile => c('input_files_by_name/python') }) %]
    
    18
    +[% END -%]
    
    19
    +
    
    20
    +mkdir -p /var/tmp/build
    
    21
    +tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.[% c('compress_tar') %]
    
    22
    +
    
    23
    +cd /var/tmp/build
    
    24
    +tar -xf $rootdir/[% project %]-[% c('version') %].tar.[% c('compress_tar') %]
    
    25
    +cd $builddir
    
    26
    +
    
    27
    +pushd src
    
    28
    +rmdir config llvm-project wasi-libc
    
    29
    +tar -xf $rootdir/[% c('input_files_by_name/wasi-config') %]
    
    30
    +mv wasi-config-* config
    
    31
    +tar -xf $rootdir/[% c('input_files_by_name/clang-source') %]
    
    32
    +mv clang-source llvm-project
    
    33
    +export LLVM_HOME=$(pwd)/llvm-project
    
    34
    +tar -xf $rootdir/[% c('input_files_by_name/wasi-libc') %]
    
    35
    +mv wasi-libc-* wasi-libc
    
    36
    +popd
    
    37
    +
    
    38
    +# What follows has been copied from Firefox's
    
    39
    +# taskcluster/scripts/misc/build-sysroot-wasi.sh and adapted to
    
    40
    +# tor-browser-build.
    
    41
    +
    
    42
    +patch -p1 < $rootdir/wasi-sdk.patch
    
    43
    +
    
    44
    +mkdir -p build/install/wasi
    
    45
    +
    
    46
    +tar -C build -xf $rootdir/[% c('input_files_by_name/clang') %]
    
    47
    +[% IF c("var/is_compiler_rt") -%]
    
    48
    +  mv build/clang build/llvm
    
    49
    +[% ELSE -%]
    
    50
    +  mv build/[% c("var/clang-project") %] build/llvm
    
    51
    +[% END -%]
    
    52
    +# The wasi-sdk build system wants to build clang itself. We trick it into
    
    53
    +# thinking it did, and put our own clang where it would have built its own.
    
    54
    +touch build/llvm.BUILT
    
    55
    +
    
    56
    +# The wasi-sdk build system wants a clang and an ar binary in
    
    57
    +# build/install/$PREFIX/bin
    
    58
    +[% IF !c("var/is_compiler_rt") && c("var/macos") -%]
    
    59
    +  ln -s $(pwd)/build/llvm/clang/bin build/install/wasi/bin
    
    60
    +[% ELSE -%]
    
    61
    +  ln -s $(pwd)/build/llvm/bin build/install/wasi/bin
    
    62
    +[% END -%]
    
    63
    +
    
    64
    +ln -s llvm-ar build/install/wasi/bin/ar
    
    65
    +
    
    66
    +# tor-browser-build: we have no .git in our tarball but the script version.sh
    
    67
    +# used by the Makefile depends on that. We replace the script.
    
    68
    +cat > 'version.sh' << EOF
    
    69
    +#!/bin/sh
    
    70
    +echo '[% c("abbrev") %]'
    
    71
    +EOF
    
    72
    +
    
    73
    +# Build wasi-libc, and re-pack it, to make sure we get a deterministic output.
    
    74
    +make PREFIX=/wasi build/wasi-libc.BUILT

  • projects/wasi-sysroot/build_compiler_rt
    1
    +#!/bin/bash
    
    2
    +[% INCLUDE 'build_common' %]
    
    3
    +
    
    4
    +make \
    
    5
    +  LLVM_PROJ_DIR=$LLVM_HOME \
    
    6
    +  PREFIX=/wasi \
    
    7
    +  build/compiler-rt.BUILT \
    
    8
    +  NINJA_FLAGS='-j[% c("num_procs") %]'
    
    9
    +
    
    10
    +# We are putting this file already in the folder it should be when moved into clang.
    
    11
    +# This way, consumers can just untar this project into a clang folder and be done.
    
    12
    +rtdir=/var/tmp/dist/clang/lib/clang/[% pc("llvm-project", "var/llvm_major") %]/lib/wasi
    
    13
    +mkdir -p $rtdir
    
    14
    +mv build/compiler-rt/lib/wasi/* $rtdir/
    
    15
    +
    
    16
    +cd /var/tmp/dist
    
    17
    +[% c('tar', {
    
    18
    +        tar_src => [ 'clang' ],
    
    19
    +        tar_args => '-caf ' _ dest_dir _ '/' _ c('filename'),
    
    20
    +    }) %]

  • projects/wasi-sysroot/config
    ... ... @@ -15,27 +15,67 @@ container:
    15 15
     var:
    
    16 16
       no_crosscompile: 1
    
    17 17
     
    
    18
    +targets:
    
    19
    +  linux:
    
    20
    +    var:
    
    21
    +      clang-project: clang-linux
    
    22
    +  android:
    
    23
    +    var:
    
    24
    +      clang-project: clang-linux
    
    25
    +  macos:
    
    26
    +    var:
    
    27
    +      clang-project: macosx-toolchain
    
    28
    +  windows:
    
    29
    +    var:
    
    30
    +      clang-project: mingw-w64-clang
    
    31
    +
    
    32
    +steps:
    
    33
    +  build_compiler_rt:
    
    34
    +    filename: 'wasi-compiler-rt-[% c("version") %]-[% c("var/build_id") %].tar.[% c("compress_tar") %]'
    
    35
    +    build_compiler_rt: '[% INCLUDE build_compiler_rt %]'
    
    36
    +    var:
    
    37
    +      is_compiler_rt: 1
    
    38
    +
    
    18 39
     input_files:
    
    19 40
       - project: container-image
    
    41
    +    pkg_type: build
    
    20 42
       # We do not use GCC, but we need its libsdc++ to run Clang
    
    21 43
       - name: '[% c("var/compiler") %]'
    
    22 44
         project: '[% c("var/compiler") %]'
    
    23 45
         enable: '[% c("var/linux") %]'
    
    46
    +    pkg_type: build
    
    24 47
       - name: clang
    
    25 48
         project: clang
    
    49
    +    enable: '[% c("var/is_compiler_rt") %]'
    
    50
    +    pkg_type: build
    
    51
    +  - name: clang
    
    52
    +    project: clang-linux
    
    53
    +    enable: '[% !c("var/is_compiler_rt") && (c("var/linux") || c("var/android")) %]'
    
    54
    +  - name: clang
    
    55
    +    project: macosx-toolchain
    
    56
    +    enable: '[% !c("var/is_compiler_rt") && c("var/macos") %]'
    
    57
    +  - name: clang
    
    58
    +    project: mingw-w64-clang
    
    59
    +    enable: '[% !c("var/is_compiler_rt") && c("var/windows") %]'
    
    26 60
       - project: llvm-project
    
    27 61
         name: clang-source
    
    62
    +    pkg_type: build
    
    28 63
       - name: cmake
    
    29 64
         project: cmake
    
    65
    +    pkg_type: build
    
    30 66
       - name: ninja
    
    31 67
         project: ninja
    
    68
    +    pkg_type: build
    
    32 69
       - name: python
    
    33 70
         project: python
    
    34 71
         enable: '[% c("var/linux") %]'
    
    72
    +    pkg_type: build
    
    35 73
       - name: wasi-config
    
    36 74
         project: wasi-config
    
    75
    +    pkg_type: build
    
    37 76
       - name: wasi-libc
    
    38 77
         project: wasi-libc
    
    78
    +    pkg_type: build
    
    39 79
       # taskcluster/scripts/misc/wasi-sdk.patch from Firefox's source code.
    
    40 80
       # Taken from gecko-dev@823106ac4295f822717f5a953047dc89074d632b
    
    41 81
       - filename: wasi-sdk.patch

  • _______________________________________________
    tor-commits mailing list -- tor-commits@xxxxxxxxxxxxxxxxxxxx
    To unsubscribe send an email to tor-commits-leave@xxxxxxxxxxxxxxxxxxxx