Pier Angelo Vendrame pushed to branch main at The Tor Project / Applications / tor-browser-build
Commits:
-
a812dd07
by Pier Angelo Vendrame at 2023-07-26T18:04:01+02:00
-
98860cf9
by Pier Angelo Vendrame at 2023-07-26T18:10:51+02:00
6 changed files:
- projects/clang/build
- projects/clang/config
- projects/llvm-project/build
- projects/llvm-project/config
- + projects/llvm-project/partially-revert-llvm-less_second.patch
- projects/clang/use-fixed-chunk-size-for-uuid.patch → projects/llvm-project/use-fixed-chunk-size-for-uuid.patch
Changes:
... | ... | @@ -16,12 +16,6 @@ mkdir -p /var/tmp/build |
16 | 16 | cd /var/tmp/build
|
17 | 17 | tar -xf $rootdir/[% c('input_files_by_name/clang-source') %]
|
18 | 18 | cd clang-source
|
19 | -[% IF c("var/macos") -%]
|
|
20 | - # Remove once we update to a version that includes commit
|
|
21 | - # 359f170f5f712ee714193b46bad45a45656b2c59 (> 16.0.6)
|
|
22 | - # https://github.com/llvm/llvm-project/issues/63961
|
|
23 | - patch -p1 < $rootdir/use-fixed-chunk-size-for-uuid.patch
|
|
24 | -[% END -%]
|
|
25 | 19 | export LLVM_HOME=$(pwd)
|
26 | 20 | mkdir build
|
27 | 21 | cd build
|
... | ... | @@ -24,5 +24,3 @@ input_files: |
24 | 24 | - project: python
|
25 | 25 | name: python
|
26 | 26 | enable: '[% c("var/linux") %]' |
27 | - - filename: use-fixed-chunk-size-for-uuid.patch
|
|
28 | - enable: '[% c("var/macos") %]' |
... | ... | @@ -2,6 +2,18 @@ |
2 | 2 | [% c("var/set_default_env") -%]
|
3 | 3 | tar -xf [% project %]-[% c("version") %].tar.[% c('compress_tar') %]
|
4 | 4 | mv [% project %]-[% c("version") %] clang-source
|
5 | + |
|
6 | +pushd clang-source
|
|
7 | +# Remove once we update to a version that includes commit
|
|
8 | +# 359f170f5f712ee714193b46bad45a45656b2c59 (> 16.0.6)
|
|
9 | +# https://github.com/llvm/llvm-project/issues/63961
|
|
10 | +patch -p1 < $rootdir/use-fixed-chunk-size-for-uuid.patch
|
|
11 | +# Remove once we update to a version that includes commit
|
|
12 | +# 32ab0978dc3f7f7036df2038ee96a4ab89196255
|
|
13 | +# https://github.com/llvm/llvm-project/issues/62546
|
|
14 | +patch -p1 < $rootdir/partially-revert-llvm-less_second.patch
|
|
15 | +popd
|
|
16 | + |
|
5 | 17 | [% c('tar', {
|
6 | 18 | tar_src => [ 'clang-source' ],
|
7 | 19 | tar_args => '-caf ' _ dest_dir _ '/' _ c('filename'),
|
... | ... | @@ -6,3 +6,7 @@ filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.[% c("co |
6 | 6 | |
7 | 7 | var:
|
8 | 8 | llvm_major: 16
|
9 | + |
|
10 | +input_files:
|
|
11 | + - filename: use-fixed-chunk-size-for-uuid.patch
|
|
12 | + - filename: partially-revert-llvm-less_second.patch |
1 | +From 32ab0978dc3f7f7036df2038ee96a4ab89196255 Mon Sep 17 00:00:00 2001
|
|
2 | +From: Kazu Hirata <kazu@google.com>
|
|
3 | +Date: Tue, 16 May 2023 14:49:32 -0700
|
|
4 | +Subject: [PATCH] Partially revert "Use llvm::less_second (NFC)"
|
|
5 | + |
|
6 | +This reverts part of commit e0039b8d6a5bd05e70203962f448569f2d2ef1c2.
|
|
7 | + |
|
8 | +This should fix the issue reported in:
|
|
9 | + |
|
10 | +https://github.com/llvm/llvm-project/issues/62546
|
|
11 | +---
|
|
12 | + llvm/lib/IR/Metadata.cpp | 4 +++-
|
|
13 | + 1 file changed, 3 insertions(+), 1 deletion(-)
|
|
14 | + |
|
15 | +diff --git a/llvm/lib/IR/Metadata.cpp b/llvm/lib/IR/Metadata.cpp
|
|
16 | +index 13fb2b650f89e9..face1ba58cfbbd 100644
|
|
17 | +--- a/llvm/lib/IR/Metadata.cpp
|
|
18 | ++++ b/llvm/lib/IR/Metadata.cpp
|
|
19 | +@@ -282,7 +282,9 @@ void ReplaceableMetadataImpl::replaceAllUsesWith(Metadata *MD) {
|
|
20 | + // Copy out uses since UseMap will get touched below.
|
|
21 | + using UseTy = std::pair<void *, std::pair<OwnerTy, uint64_t>>;
|
|
22 | + SmallVector<UseTy, 8> Uses(UseMap.begin(), UseMap.end());
|
|
23 | +- llvm::sort(Uses, llvm::less_second());
|
|
24 | ++ llvm::sort(Uses, [](const UseTy &L, const UseTy &R) {
|
|
25 | ++ return L.second.second < R.second.second;
|
|
26 | ++ });
|
|
27 | + for (const auto &Pair : Uses) {
|
|
28 | + // Check that this Ref hasn't disappeared after RAUW (when updating a
|
|
29 | + // previous Ref). |