Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • cohosh/tor-browser-build
  • seb/tor-browser-build
  • Cortex65/tor-browser-build
  • gus/tor-browser-build
  • shelikhoo/tor-browser-build-2
  • meskio/tor-browser-build
  • msimonelli/tor-browser-build
  • dcf/tor-browser-build
  • ma1/tor-browser-build
  • dragjkngj/tor-browser-build
  • aguestuser/tor-browser-build
  • phw/tor-browser-build
  • yanmaani/tor-browser-build
  • acat/tor-browser-build
  • gk/tor-browser-build
  • boklm/tor-browser-build
  • tpo/applications/tor-browser-build
  • brade/tor-browser-build
  • sysrqb/tor-browser-build
  • JeremyRand/tor-browser-build
  • pierov/tor-browser-build
  • jla2040/tor-browser-build
  • dan/tor-browser-build
  • Sushrut1101/tor-browser-build
  • guest475646844/tor-browser-build
  • morgan/tor-browser-build
  • FlexFoot/tor-browser-build
  • Mynacol/tor-browser-build
  • NoisyCoil/tor-browser-build
  • murmelurmel/tor-browser-build
  • rustybird/tor-browser-build
  • jwilde/tor-browser-build
  • onyinyang/tor-browser-build
  • securitybrahh/tor-browser-build
  • Noino/tor-browser-build
  • ahf/tor-browser-build
  • cypherpunks1/tor-browser-build
  • henry/tor-browser-build
  • brizental/tor-browser-build
39 results
Show changes
Commits on Source (7)
  • Pier Angelo Vendrame's avatar
    Bug 40854: Upgrade to OpenSSL 3 · 85031e91
    Pier Angelo Vendrame authored
    85031e91
  • Pier Angelo Vendrame's avatar
    Bug 40487: Bump Python version to 3.11.3 · b096b32e
    Pier Angelo Vendrame authored
    Debian Stretch's Python version is still too old for some of the
    projects we need to build under it.
    So, since we needed to review the Python options we use anyway, we
    decided also to update it to a much more recent version.
    b096b32e
  • Pier Angelo Vendrame's avatar
    Bug 40410: Get rid of python2 · 30db5fad
    Pier Angelo Vendrame authored
    30db5fad
  • Pier Angelo Vendrame's avatar
    Bug 40802: Update the wasi-sdk and remove the patch to make it reproducible. · 34d9e212
    Pier Angelo Vendrame authored
    We already uplifted the patch, and the new version includes it.
    34d9e212
  • Pier Angelo Vendrame's avatar
    Bug 40855: Update toolchains for Firefox 115 (common part) · 4df7d971
    Pier Angelo Vendrame authored
    Toolchain updates needed for all platforms.
    
    Bug 31588 (partially): Create cargo vendor archives locally for
    cbindgen.
    
    The Rust crates we use provide a Cargo.lock. That should be enough to
    make sure they always use a certain version of a dependency.
    Therefore, with 115, we could try stop hosting vendor archives on
    people.tpo and build them locally.
    In this commit we do that for cbindgen.
    In next commit we could try to do so for also other projects.
    4df7d971
  • Pier Angelo Vendrame's avatar
    Bug 40855: Update toolchains for Firefox 115 (Windows part) · 028d15c6
    Pier Angelo Vendrame authored
    Windows-only toolchain updates.
    
    Also, bug 40832: Unify mingw-w64-clang 32+64 bits
    
    The clang binaries used in the mingw-w64-clang artifacts were exactly
    the same, because Clang allows you to set the target at runtime with
    CLI options, contrarily to GCC, that allows you to set them at build
    time.
    
    Also, i686 and x86_64 parts that differ have different paths, so they
    can live in the same mingw-w64 installation.
    This allows us to save both time, and space on the out directory, since
    we can safely use only one archive for both platforms.
    
    Also, partially bug 40652: drop dependency on libssp.
    
    Libssp is not necessary anymore for _FORTIFY_SOURCE.
    So, we match llvm-mingw, and replace it with empty archives.
    In the future, we should stop creating these archives, too, when the
    compiler users stop including it during linking.
    028d15c6
  • Pier Angelo Vendrame's avatar
    Bug 40855: Update toolchains for Firefox 115 (macOS part) · 838f290f
    Pier Angelo Vendrame authored
    macOS-only toolchain updates.
    
    With this update, we stop downloading the macOS SDK from people.tpo.
    Instead, we download it from apple.com and we use the same scripts as
    Mozilla to extract it.
    We took them from Firefox source tree, and slightly adapted to our
    build system/containers/needs.
    
    Also, we try to be more similar to Mozilla in compiling LLVM runtimes.
    838f290f
Showing
with 178 additions and 186 deletions
......@@ -583,11 +583,8 @@ get_gradle_dependencies_list-android-components: submodule-update
cargo_vendor-application-services: submodule-update
$(rbm) build application-services --step cargo_vendor --target nightly --target torbrowser-android-armv7
cargo_vendor-cbindgen-android: submodule-update
$(rbm) build cbindgen --step cargo_vendor --target nightly --target torbrowser-android-armv7
cargo_vendor-cbindgen: submodule-update
$(rbm) build cbindgen --step cargo_vendor --target nightly --target torbrowser-linux-x86_64
$(rbm) build cbindgen --step cargo_vendor --target alpha --target torbrowser-linux-x86_64
cargo_vendor-uniffi-rs: submodule-update
$(rbm) build uniffi-rs --step cargo_vendor --target nightly --target torbrowser-linux-x86_64
......
No preview for this file type
......@@ -329,7 +329,7 @@ BROWSER_NSI
# See https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/issues/40439#note_2838724
mkdir $rootdir/extensions
mv "$TBDIR/$EXTSPATH/"* $rootdir/extensions
MOZ_AUTOMATION=1 $firefox_src/mach python $firefox_src/toolkit/mozapps/installer/unify.py "$TBDIR" "$TBDIR_AARCH64"
MOZ_AUTOMATION=1 $firefox_src/mach python3 $firefox_src/toolkit/mozapps/installer/unify.py "$TBDIR" "$TBDIR_AARCH64"
mkdir -p "$TBDIR/$EXTSPATH"
mv $rootdir/extensions/* "$TBDIR/$EXTSPATH/"
rm -Rf "$TBDIR_AARCH64"
......@@ -351,7 +351,7 @@ cp -a ${TB_STAGE_DIR} $distdir/$PKG_DIR
[% IF c("var/updater_enabled") -%]
pushd "$TBDIR[% IF c("var/macos") %]/Contents/Resources/[% END %]"
rm -f precomplete
python $MARTOOLS/createprecomplete.py
python3 $MARTOOLS/createprecomplete.py
popd
[% END -%]
cd $distdir
......
......@@ -7,7 +7,7 @@ container:
var:
ddmg: '[% INCLUDE ddmg.sh %]'
deps:
- python
- python3
- libparallel-forkmanager-perl
- libfile-slurp-perl
- zip
......
#!/usr/bin/env python
#!/usr/bin/env python3
import json
import sys
......
......@@ -14,7 +14,7 @@ tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz
# Now prepare the offline build
# Move the directory for hardcoding the path in .cargo/config
mv /var/tmp/build/[% project %]-[% c('version') %] $builddir
tar -C $builddir -xf $rootdir/[% c('input_files_by_name/cbindgen_vendor') %]
tar -C $builddir -xf $rootdir/[% c('input_files_by_name/cargo_vendor') %]
cd $builddir
mkdir .cargo
cat > .cargo/config << 'EOF'
......
# vim: filetype=yaml sw=2
version: '[% c("var/cbindgen_version") %]'
version: 0.24.3
git_url: https://github.com/eqrion/cbindgen
git_hash: '[% c("var/cbindgen_git_hash") %]'
filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.gz'
git_hash: f43ccfc047a1a160267f32355c5e5e7154a2665a
container:
use_container: 1
var:
cbindgen_version: 0.23.0
cbindgen_git_hash: 798cfab52bced65a749443faa16990ec3a8e0cfe
cbindgen_vendor_hash: 90fc3483753d296c6fc1a406f5cae412f7f74cd6719e9c800a2ffc6cd18b6e69
cbindgen_vendor_people_tpo_user: pierov
input_files:
- project: container-image
- name: rust
project: rust
# `cargo vendor vendor` in the `cbindgen` directory has vendored the sources.
# Use `make cargo_vendor-cbindgen` or `make cargo_vendor-cbindgen-android`
# (for the Android version) to re-generate the vendor tarball
- name: cbindgen_vendor
URL: https://people.torproject.org/~[% c('var/cbindgen_vendor_people_tpo_user') %]/mirrors/sources/cbindgen-vendor-[% c('version') %].tar.xz
sha256sum: '[% c("var/cbindgen_vendor_hash") %]'
steps:
cargo_vendor:
filename: '[% project %]-vendor-[% c("version") %].tar.xz'
build:
filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.gz'
input_files:
- project: container-image
pkg_type: build
- project: rust
name: rust
pkg_type: build
- name: rust
project: rust
- name: cargo_vendor
project: cbindgen
pkg_type: cargo_vendor
norec:
sha256sum: 96057adf58cd75b968d2209a86de3ff8bf52a5024bac2f677673b388cb26475e
......@@ -16,6 +16,12 @@ mkdir -p /var/tmp/build
cd /var/tmp/build
tar -xf $rootdir/[% c('input_files_by_name/clang-source') %]
cd clang-source
[% IF c("var/macos") -%]
# Remove once we update to a version that includes commit
# 359f170f5f712ee714193b46bad45a45656b2c59 (> 16.0.6)
# https://github.com/llvm/llvm-project/issues/63961
patch -p1 < $rootdir/use-fixed-chunk-size-for-uuid.patch
[% END -%]
export LLVM_HOME=$(pwd)
mkdir build
cd build
......
......@@ -24,3 +24,5 @@ input_files:
- project: python
name: python
enable: '[% c("var/linux") %]'
- filename: use-fixed-chunk-size-for-uuid.patch
enable: '[% c("var/macos") %]'
From 359f170f5f712ee714193b46bad45a45656b2c59 Mon Sep 17 00:00:00 2001
From: Fangrui Song <i@maskray.me>
Date: Wed, 19 Jul 2023 17:24:36 -0700
Subject: [PATCH] [lld-macho] Use fixed chunk size for UUID
Chunk size decided by the thread count makes the UUID less deterministic
(e.g. across machines with different core counts.)
Follow ELF and just use a fixed chunksize.
Fixes: https://github.com/llvm/llvm-project/issues/63961
Reviewed By: #lld-macho, keith
Differential Revision: https://reviews.llvm.org/D155761
---
lld/MachO/Writer.cpp | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/lld/MachO/Writer.cpp b/lld/MachO/Writer.cpp
index 871e4967d313ce..1b0e64abe843ad 100644
--- a/lld/MachO/Writer.cpp
+++ b/lld/MachO/Writer.cpp
@@ -1182,10 +1182,7 @@ void Writer::writeUuid() {
TimeTraceScope timeScope("Computing UUID");
ArrayRef<uint8_t> data{buffer->getBufferStart(), buffer->getBufferEnd()};
- unsigned chunkCount = parallel::strategy.compute_thread_count() * 10;
- // Round-up integer division
- size_t chunkSize = (data.size() + chunkCount - 1) / chunkCount;
- std::vector<ArrayRef<uint8_t>> chunks = split(data, chunkSize);
+ std::vector<ArrayRef<uint8_t>> chunks = split(data, 1024 * 1024);
// Leave one slot for filename
std::vector<uint64_t> hashes(chunks.size() + 1);
SmallVector<std::shared_future<void>> threadFutures;
# vim: filetype=yaml sw=2
version: 3.15.3
version: 3.26.3
git_url: https://gitlab.kitware.com/cmake/cmake.git
git_hash: 'v[% c("version") %]'
tag_gpg_id: 1
......
......@@ -45,11 +45,11 @@ export PATH="/var/tmp/dist/rust/bin:/var/tmp/dist/cbindgen:/var/tmp/dist/nasm/bi
# https://searchfox.org/mozilla-central/source/build/build-clang/build-clang.py#890,
# include it directly in our clang
[% IF c("var/macos") -%]
rtdir=/var/tmp/dist/macosx-toolchain/clang/lib/clang/[% pc("clang", "version") %]/lib/wasi
rtdir=/var/tmp/dist/macosx-toolchain/clang/lib/clang/[% pc("llvm-project", "var/llvm_major") %]/lib/wasi
[% ELSIF c("var/windows") -%]
rtdir=/var/tmp/dist/mingw-w64-clang/lib/clang/[% pc("clang", "version") %]/lib/wasi
rtdir=/var/tmp/dist/mingw-w64-clang/lib/clang/[% pc("llvm-project", "var/llvm_major") %]/lib/wasi
[% ELSE -%]
rtdir=/var/tmp/dist/clang/lib/clang/[% pc("clang", "version") %]/lib/wasi
rtdir=/var/tmp/dist/clang/lib/clang/[% pc("llvm-project", "var/llvm_major") %]/lib/wasi
[% END -%]
mkdir -p $rtdir
cp /var/tmp/dist/wasi-sysroot/lib/clang/*/lib/wasi/libclang_rt.builtins-wasm32.a $rtdir
......@@ -98,10 +98,6 @@ MOZCONFIG_EOF
sed -i 's|^URL=https://aus1\.torproject\.org/.*|URL=https://nightlies.tbb.torproject.org/nightly-updates/updates/[% c("var/nightly_updates_publish_dir") %]/%CHANNEL%/%BUILD_TARGET%/%VERSION%/ALL|' build/application.ini.in
[% END -%]
rm -f configure
rm -f js/src/configure
export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system
# Create .mozbuild to avoid interactive prompt in configure
......@@ -206,7 +202,7 @@ export LANG=C.UTF-8
[% IF c("var/linux") %]
[% IF c("var/linux-x86_64") && !c("var/asan") %]
cp obj-*/testing/geckodriver/x86_64-unknown-linux-gnu/release/geckodriver $distdir
cp obj-*/x86_64-unknown-linux-gnu/release/geckodriver $distdir
[% END %]
cp -a obj-*/dist/[% c('var/exe_name') %]/* $distdir/Browser/
# Remove firefox-bin (we don't use it, see ticket #10126)
......@@ -247,9 +243,7 @@ RBM_TB_EOF
[% IF c("var/linux") || c("var/macos") %]
cp -p obj-*/dist/bin/signmar $MARTOOLS/
cp -p obj-*/dist/bin/certutil $MARTOOLS/
cp -p obj-*/dist/bin/modutil $MARTOOLS/
cp -p obj-*/dist/bin/pk12util $MARTOOLS/
cp -p obj-*/dist/bin/shlibsign $MARTOOLS/
[% IF c("var/linux") %]
NSS_LIBS="libfreeblpriv3.so libmozsqlite3.so libnss3.so libnssckbi.so libnssutil3.so libsmime3.so libsoftokn3.so libssl3.so"
NSPR_LIBS="libnspr4.so libplc4.so libplds4.so"
......@@ -265,9 +259,7 @@ RBM_TB_EOF
[% IF c("var/windows") %]
cp -p obj-*/dist/bin/signmar.exe $MARTOOLS/
cp -p obj-*/dist/bin/certutil.exe $MARTOOLS/
cp -p obj-*/dist/bin/modutil.exe $MARTOOLS/
cp -p obj-*/dist/bin/pk12util.exe $MARTOOLS/
cp -p obj-*/dist/bin/shlibsign.exe $MARTOOLS/
NSS_LIBS="freebl3.dll mozglue.dll nss3.dll nssckbi.dll softokn3.dll"
for LIB in $NSS_LIBS; do
cp -p obj-*/dist/bin/$LIB $MARTOOLS/
......
......@@ -11,11 +11,11 @@ container:
use_container: 1
var:
firefox_platform_version: 102.12.0
firefox_platform_version: 115.0.2
firefox_version: '[% c("var/firefox_platform_version") %]esr'
browser_series: '12.5'
browser_series: '13.0'
browser_branch: '[% c("var/browser_series") %]-1'
browser_build: 2
browser_build: 1
branding_directory_prefix: 'tb'
copyright_year: '[% exec("git show -s --format=%ci").remove("-.*") %]'
nightly_updates_publish_dir: '[% c("var/nightly_updates_publish_dir_prefix") %]nightly-[% c("var/osname") %]'
......@@ -25,7 +25,7 @@ var:
- build-essential
- unzip
- zip
- autoconf2.13
- autoconf
- yasm
- pkg-config
has_l10n: '[% !c("var/testbuild") && c("var/locales").size %]'
......@@ -63,8 +63,7 @@ steps:
version: '[% c("abbrev") %]'
list_toolchain_updates:
git_url: https://github.com/mozilla/gecko-dev.git
git_hash: esr102
git_hash: tor-browser-115.0a1-13.0-1
tag_gpg_id: 0
input_files: []
container:
......
......@@ -9,9 +9,13 @@
SET toolchain_alias='linux64-rust-macos';
END; %]
read -d '' p << 'EOF' || true
sub as_array {
ref $_[0] eq 'ARRAY' ? $_[0] : [ $_[0] ];
}
my $d = YAML::XS::LoadFile('taskcluster/ci/toolchain/rust.yml');
foreach my $t (keys %$d) {
if ($d->{$t}{run}{'toolchain-alias'} eq '[% toolchain_alias %]') {
my $talias = as_array($d->{$t}{run}{'toolchain-alias'});
if (grep { $_ eq '[% toolchain_alias %]' } @$talias) {
my $channel;
foreach my $arg (@{$d->{$t}{run}{arguments}}) {
if ($arg eq '--channel') {
......@@ -62,27 +66,36 @@ check_update_needed nasm "$needed" "$current"
SET toolchain_alias='macosx64-clang';
END; %]
read -d '' p << 'EOF' || true
sub as_array {
ref $_[0] eq 'ARRAY' ? $_[0] : [ $_[0] ];
}
my $d = YAML::XS::LoadFile('taskcluster/ci/toolchain/clang.yml');
my $clang_toolchain;
my $clang_fetch;
TOOLCHAIN: foreach my $t (keys %$d) {
foreach my $alias (@{$d->{$t}{run}{'toolchain-alias'}}) {
if ($alias eq 'linux64-clang') {
my $aliases = as_array($d->{$t}{run}{'toolchain-alias'}{'by-project'}{default});
foreach my $alias (@$aliases) {
if ($alias eq '[% toolchain_alias %]') {
foreach my $fetch (@{$d->{$t}{fetches}{toolchain}}) {
$clang_toolchain = $fetch if $fetch =~ m/^.*-clang-.*/;
}
foreach my $fetch (@{$d->{$t}{fetches}{fetch}}) {
$clang_fetch = $fetch if $fetch =~ m/^clang-.*/;
}
last TOOLCHAIN;
}
}
}
if (!$clang_toolchain) {
if (!$clang_toolchain && !$clang_fetch) {
print STDERR "Error: could not find clang toolchain\\n";
exit 1;
}
my $clang_fetch;
foreach my $fetch (@{$d->{$clang_toolchain}{fetches}{fetch}}) {
$clang_fetch = $fetch if $fetch =~ m/^clang-.*/;
if (!$clang_fetch) {
foreach my $fetch (@{$d->{$clang_toolchain}{fetches}{fetch}}) {
$clang_fetch = $fetch if $fetch =~ m/^clang-.*/;
}
}
if (!$clang_fetch) {
......@@ -138,20 +151,32 @@ if (m/^\\s*"Bootstrap currently only runs on Python ([^"]+)\\."/) {
}
EOF
needed=$(cat python/mozboot/bin/bootstrap.py | perl -ne "$p")
current="3.5+" # 3.6.0
current="3.6+" # 3.6.0
check_update_needed python "$needed" "$current"
[% IF c("var/macos") %]
# macosx-sdk
read -d '' p << 'EOF' || true
my $d = YAML::XS::LoadFile('taskcluster/ci/build/macosx.yml');
foreach my $toolchain (@{$d->{'macosx64-add-on-devel/opt'}{fetches}{toolchain}}) {
if ($toolchain =~ m/^macosx64-sdk-(.+)$/) {
print $1;
exit;
sub l {
ref $_[0] eq 'ARRAY' ? $_[0] : [ $_[0] ];
}
my $d = YAML::XS::LoadFile('taskcluster/ci/toolchain/macos-sdk.yml');
my $sdk_version;
foreach my $t (keys %$d) {
foreach my $alias (@{l($d->{$t}{run}{'toolchain-alias'})}) {
if ($alias eq 'macosx64-sdk') {
if ($t =~ m/^macosx64-sdk-(.*)/) {
print "$1";
exit 0;
}
}
}
}
exit 1;
EOF
needed=$(perl -MYAML::XS -e "$p")
current='[% pc("macosx-toolchain", "version") %]'
......
# vim: filetype=yaml sw=2
version: '[% c("abbrev") %]'
git_url: https://github.com/mozilla/fxc2.git
git_hash: 358978f779e250d19afec50a4d705a11a7efc24c
git_hash: 807d26f4e4e9e9d0d0d6c1e05493b28eafb20e91
filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.gz'
container:
use_container: 1
......
# vim: filetype=yaml sw=2
version: 14.0.4
git_hash: 29f1039a7285a5c3a9c353d054140bf2556d4c4d
version: "[% c('var/llvm_major') %].0.4"
git_hash: ae42196bc493ffe877a7e3dff8be32035dea4d07
git_url: https://github.com/llvm/llvm-project
filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.gz'
targets:
android:
version: 14.0.4
git_hash: 29f1039a7285a5c3a9c353d054140bf2556d4c4d
var:
llvm_major: 16
......@@ -7,23 +7,29 @@ mkdir -p "$distdir"
tar -C /var/tmp/dist -xf [% c('input_files_by_name/cmake') %]
tar -C /var/tmp/dist -xf [% c('input_files_by_name/ninja') %]
tar -C $distdir -xf [% c('input_files_by_name/clang') %]
tar -C $distdir -xf [% c('input_files_by_name/SDK') %]
tar -C $distdir -xf [% c('input_files_by_name/cctools') %]
tar -C $builddir -xf [% c('input_files_by_name/llvm-project') %]
patch -p1 < $rootdir/tools.diff
sysrootdir=$distdir/MacOSX[% c("version") %].sdk/
mkdir -p $sysrootdir
cd $sysrootdir
python3 "$rootdir/unpack-sdk.py" "$rootdir/[% c('input_files_by_name/SDK') %]" "Library/Developer/CommandLineTools/SDKs/MacOSX[% c('version') %].sdk"
arch=[% c("var/macos_arch") %]
clangdir=$distdir/clang/bin
cctoolsdir=$distdir/cctools/bin
sysrootdir=$distdir/MacOSX[% c("version") %].sdk/
target=[% c("var/build_target") %]
# We still need to put the cctoolsdir on the path. That's because of `lipo`. See
# the respective comment in the cctools build script.
export PATH="/var/tmp/dist/ninja:/var/tmp/dist/cmake/bin:$cctoolsdir:$PATH"
export MACOSX_DEPLOYMENT_TARGET=[% c("var/macosx_deployment_target") %]
# See tor-browser.git/taskcluster/scripts/misc/build-llvm-common.sh
export MACOSX_DEPLOYMENT_TARGET=[% c("var/macosx_deployment_target") %]
target=[% c("var/build_target") %]
[% IF c("var/macos-aarch64") -%]
# wrapper taken from:
# tor-browser.git/taskcluster/scripts/misc/build-llvm-common.sh
clangwrappersdir=$distdir/clang/wrappers
mkdir $clangwrappersdir
compiler_wrapper() {
......@@ -33,52 +39,61 @@ export MACOSX_DEPLOYMENT_TARGET=[% c("var/macosx_deployment_target") %]
compiler_wrapper clang
compiler_wrapper clang++
clang=$clangwrappersdir/clang
arch=arm64
[% ELSE -%]
clang=$clangdir/clang
arch=x86_64
[% END -%]
cd $builddir/clang-source
patch -p1 < $rootdir/compiler-rt-cross-compile.patch
patch -p1 < $rootdir/compiler-rt-no-codesign.patch
cd ..
COMMON_CMAKE_FLAGS="
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX=$distdir/clang/lib/clang/[% pc("llvm-project", "var/llvm_major") %]/
-DCMAKE_C_COMPILER=$clang
-DCMAKE_CXX_COMPILER=$clang++
-DCMAKE_AR=$clangdir/llvm-ar
-DCMAKE_RANLIB=$clangdir/llvm-ranlib
-DCMAKE_LINKER=$clangdir/ld64.lld
-DCMAKE_LIPO=$clangdir/llvm-lipo
-DCMAKE_C_COMPILER_TARGET=$target
-DCMAKE_CXX_COMPILER_TARGET=$target
-DCMAKE_ASM_COMPILER_TARGET=$target
-DCMAKE_SYSTEM_NAME=Darwin
-DCMAKE_SYSTEM_VERSION=$MACOSX_DEPLOYMENT_TARGET
-DCMAKE_OSX_SYSROOT=$sysrootdir
-DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld
-DCMAKE_SHARED_LINKER_FLAGS=-fuse-ld=lld
-DDARWIN_osx_ARCHS=$arch
-DDARWIN_osx_SYSROOT=$sysrootdir
-DDARWIN_macosx_OVERRIDE_SDK_VERSION=11.0
-DDARWIN_osx_BUILTIN_ARCHS=$arch
-DLLVM_DEFAULT_TARGET_TRIPLE=$target
-DLLVM_ENABLE_ASSERTIONS=OFF
-DLLVM_CONFIG_PATH=$clangdir/llvm-config
"
mkdir $builddir/faketools
# compiler-rt build script expects to find `codesign` in $PATH.
# Give it a fake one.
echo "#!/bin/sh" > $builddir/faketools/codesign
chmod +x $builddir/faketools/codesign
# cmake makes decisions based on the output of the mac-only sw_vers, which is
# obviously missing when cross-compiling, so create a fake one. The exact
# version doesn't really matter: as of writing, cmake checks at most for 10.5.
echo "#!/bin/sh" > $builddir/faketools/sw_vers
echo echo 10.12 >> $builddir/faketools/sw_vers
chmod +x $builddir/faketools/sw_vers
export PATH=$PATH:"$builddir/faketools"
# End of Moz's tricks
mkdir build_compiler_rt
cd build_compiler_rt
# And we build compiler-rt by following taskcluster/scripts/misc/build-compiler-rt.sh.
cmake -GNinja \
-DCMAKE_C_COMPILER=$clang \
-DCMAKE_CXX_COMPILER=$clang++ \
-DCMAKE_C_COMPILER_TARGET=$target \
-DCMAKE_CXX_COMPILER_TARGET=$target \
-DCMAKE_ASM_COMPILER_TARGET=$target \
-DCMAKE_AR=$clangdir/llvm-ar \
-DCMAKE_RANLIB=$clangdir/llvm-ranlib \
-DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=lld" \
-DCMAKE_SHARED_LINKER_FLAGS="-fuse-ld=lld" \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_DEFAULT_TARGET_TRIPLE=$target \
-DLLVM_ENABLE_ASSERTIONS=OFF \
-DCMAKE_INSTALL_PREFIX=$distdir/clang/lib/clang/[% pc("clang", "version") %]/ \
-DLLVM_CONFIG_PATH=$clangdir/llvm-config \
-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON \
-DCOMPILER_RT_ENABLE_IOS=OFF \
-DCOMPILER_RT_BUILD_LIBFUZZER=OFF \
-DCOMPILER_RT_BUILD_ORC=OFF \
-DCOMPILER_RT_ENABLE_TVOS=OFF \
-DCOMPILER_RT_ENABLE_WATCHOS=OFF \
-DCOMPILER_RT_BUILD_XRAY=OFF \
-DCMAKE_LINKER=$clangdir/ld64.lld \
-DCMAKE_LIPO=$clangdir/llvm-lipo \
-DCMAKE_SYSTEM_NAME=Darwin \
-DCMAKE_SYSTEM_VERSION=$MACOSX_DEPLOYMENT_TARGET \
-DDARWIN_macosx_OVERRIDE_SDK_VERSION=$MACOSX_DEPLOYMENT_TARGET \
-DCMAKE_OSX_ARCHITECTURES=$arch \
-DDARWIN_osx_ARCHS=$arch \
-DDARWIN_osx_SYSROOT=$sysrootdir \
-DDARWIN_osx_BUILTIN_ARCHS=$arch \
-DCMAKE_OSX_SYSROOT=$sysrootdir \
$builddir/clang-source/compiler-rt
cmake $builddir/clang-source/compiler-rt -GNinja \
$COMMON_CMAKE_FLAGS
ninja -j[% c("num_procs") %] -v install
......@@ -86,35 +101,7 @@ cd $builddir/clang-source
cmake -GNinja -S runtimes -B build \
-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" \
-DCMAKE_C_COMPILER=$clang \
-DCMAKE_CXX_COMPILER=$clang++ \
-DCMAKE_C_COMPILER_TARGET=$target \
-DCMAKE_CXX_COMPILER_TARGET=$target \
-DCMAKE_ASM_COMPILER_TARGET=$target \
-DCMAKE_AR=$clangdir/llvm-ar \
-DCMAKE_RANLIB=$clangdir/llvm-ranlib \
-DCMAKE_C_FLAGS="-target $target -B $cctoolsdir -isysroot $sysrootdir -I$sysrootdir/usr/include -iframework $sysrootdir/System/Library/Frameworks" \
-DCMAKE_CXX_FLAGS="-stdlib=libc++ -target $target -B $cctoolsdir -isysroot $sysrootdir -I$sysrootdir/usr/include -iframework $sysrootdir/System/Library/Frameworks" \
-DCMAKE_ASM_FLAGS="-target $target -B $cctoolsdir -isysroot $sysrootdir -I$sysrootdir/usr/include -iframework $sysrootdir/System/Library/Frameworks" \
-DCMAKE_EXE_LINKER_FLAGS="-Wl,-syslibroot,$sysrootdir -Wl,-dead_strip -Wl,-pie" \
-DCMAKE_SHARED_LINKER_FLAGS="-Wl,-syslibroot,$sysrootdir -Wl,-dead_strip -Wl,-pie" \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_DEFAULT_TARGET_TRIPLE=$target \
-DLLVM_ENABLE_ASSERTIONS=OFF \
-DCMAKE_INSTALL_PREFIX=$distdir/clang \
-DCMAKE_LINKER=$cctoolsdir/$target-ld \
-DCMAKE_LIPO=$clangdir/llvm-lipo \
-DCMAKE_SYSTEM_NAME=Darwin \
-DCMAKE_SYSTEM_VERSION=$MACOSX_DEPLOYMENT_TARGET \
-DDARWIN_macosx_OVERRIDE_SDK_VERSION=$MACOSX_DEPLOYMENT_TARGET \
-DCMAKE_OSX_ARCHITECTURES=$arch \
-DDARWIN_osx_ARCHS=$arch \
-DDARWIN_osx_BUILTIN_ARCHS=$arch \
-DCMAKE_OSX_SYSROOT=$sysrootdir \
-DCMAKE_FIND_ROOT_PATH=$sysrootdir \
-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \
-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY
$COMMON_CMAKE_FLAGS
cd build
ninja -j[% c("num_procs") %] -v install
......
Add `-target x86_64-apple-darwin' to the compiler-rt overridden CFLAGS
diff --git a/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
index 28d398672..aac68bf36 100644
--- a/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
+++ b/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
@@ -265,7 +265,7 @@ endfunction()
macro(darwin_add_builtin_libraries)
set(DARWIN_EXCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Darwin-excludes)
- set(CFLAGS "-fPIC -O3 -fvisibility=hidden -DVISIBILITY_HIDDEN -Wall -fomit-frame-pointer")
+ set(CFLAGS "-fPIC -O3 -fvisibility=hidden -DVISIBILITY_HIDDEN -Wall -fomit-frame-pointer -target ${LLVM_DEFAULT_TARGET_TRIPLE} -isysroot ${CMAKE_OSX_SYSROOT} -I${CMAKE_OSX_SYSROOT}/usr/include")
set(CMAKE_C_FLAGS "")
set(CMAKE_CXX_FLAGS "")
set(CMAKE_ASM_FLAGS "")
Disable codesign for macosx cross-compile toolchain. Codesign only works on OSX.
Index: cmake/Modules/AddCompilerRT.cmake
===================================================================
--- a/compiler-rt/cmake/Modules/AddCompilerRT.cmake
+++ b/compiler-rt/cmake/Modules/AddCompilerRT.cmake
@@ -372,14 +372,6 @@ function(add_compiler_rt_runtime name type)
set_target_properties(${libname} PROPERTIES IMPORT_PREFIX "")
set_target_properties(${libname} PROPERTIES IMPORT_SUFFIX ".lib")
endif()
- if(APPLE)
- # Ad-hoc sign the dylibs
- add_custom_command(TARGET ${libname}
- POST_BUILD
- COMMAND codesign --sign - $<TARGET_FILE:${libname}>
- WORKING_DIRECTORY ${COMPILER_RT_OUTPUT_LIBRARY_DIR}
- )
- endif()
endif()
set(parent_target_arg)
# vim: filetype=yaml sw=2
filename: '[% project %]-[% c("version") %]-1-[% c("var/build_id") %].tar.gz'
version: 11.0
filename: '[% project %]-[% c("version") %]-[% c("arch") %]-[% c("var/build_id") %].tar.gz'
version: 13.3
container:
use_container: 1
var:
......@@ -29,9 +29,12 @@ input_files:
# Instructions on how to create the SDK tarball can be found at:
# build/macosx/cross-mozconfig.common
- name: SDK
URL: 'https://people.torproject.org/~boklm/mirrors/sources/MacOSX[% c("version") %].sdk.tar.xz'
sha256sum: 8cbe3a79e67b0690f931703ce5c282ac0c7265b451a36ec21cdfa9773f93173c
# Original URL: https://swcdn.apple.com/content/downloads/15/62/032-84673-A_7A1TG1RF8Z/xpc8q44ggn2pkn82iwr0fi1zeb9cxi8ath/CLTools_macOSNMOS_SDK.pkg
URL: https://build-sources.tbb.torproject.org/CLTools_macOSNMOS_SDK-13.3.pkg
sha256sum: c33545d543a38911aee2a65d4bf7ff4932c12de1e6a042ae38e6415f65a10710
- name: llvm-project
project: llvm-project
- filename: compiler-rt-cross-compile.patch
- filename: compiler-rt-no-codesign.patch
- filename: macpkg.py
- filename: unpack-sdk.py
- filename: mozbuild_util.py
- filename: tools.diff