Skip to content

Commit 8476ad7

Browse files
Merge branch 'llvm:main' into acc-common
2 parents d5a36fb + e0a33cb commit 8476ad7

File tree

1,081 files changed

+5973
-2823
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,081 files changed

+5973
-2823
lines changed

.github/workflows/build-ci-container-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6262
steps:
6363
- name: Download container
64-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
64+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
6565
with:
6666
name: container
6767
- name: Push Container

.github/workflows/build-ci-container.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ jobs:
8888
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8989
steps:
9090
- name: Download container
91-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
91+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
9292

9393
- name: Push Container
9494
run: |

.github/workflows/build-metrics-container.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6767
steps:
6868
- name: Download Container
69-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
69+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
7070
with:
7171
name: container
7272
- name: Push Container

.github/workflows/libclang-abi-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,12 @@ jobs:
144144
- abi-dump
145145
steps:
146146
- name: Download baseline
147-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # 4.1.8
147+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
148148
with:
149149
name: build-baseline
150150
path: build-baseline
151151
- name: Download latest
152-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # 4.1.8
152+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
153153
with:
154154
name: build-latest
155155
path: build-latest

.github/workflows/libcxx-run-benchmarks.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,14 @@ jobs:
3333
3434
runs-on: llvm-premerge-libcxx-next-runners # TODO: This should run on a dedicated set of machines
3535
steps:
36-
- uses: actions/setup-python@v6
36+
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
3737
with:
3838
python-version: '3.10'
3939

4040
- name: Extract information from the PR
4141
id: vars
42+
env:
43+
COMMENT_BODY: ${{ github.event.comment.body }}
4244
run: |
4345
python3 -m venv .venv
4446
source .venv/bin/activate
@@ -51,7 +53,7 @@ jobs:
5153
print(f"pr_base={pr.base.sha}")
5254
print(f"pr_head={pr.head.sha}")
5355
EOF
54-
BENCHMARKS=$(echo "${{ github.event.comment.body }}" | sed -nE 's/\/libcxx-bot benchmark (.+)/\1/p')
56+
BENCHMARKS=$(echo "$COMMENT_BODY" | sed -nE 's/\/libcxx-bot benchmark (.+)/\1/p')
5557
echo "benchmarks=${BENCHMARKS}" >> ${GITHUB_OUTPUT}
5658
5759
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

.github/workflows/llvm-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,17 +148,17 @@ jobs:
148148
- abi-dump
149149
steps:
150150
- name: Download baseline
151-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # 4.1.8
151+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
152152
with:
153153
name: build-baseline
154154
path: build-baseline
155155
- name: Download latest
156-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # 4.1.8
156+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
157157
with:
158158
name: build-latest
159159
path: build-latest
160160
- name: Download symbol list
161-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # 4.1.8
161+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
162162
with:
163163
name: symbol-list
164164
path: symbol-list

.github/workflows/release-binaries-setup-stage/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ runs:
4444
- name: Download Previous Stage Artifact
4545
if: ${{ inputs.previous-artifact }}
4646
id: download
47-
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
47+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
4848
with:
4949
pattern: ${{ runner.os }}-${{ runner.arch }}-${{ inputs.previous-artifact }}-*
5050
merge-multiple: true

.github/workflows/release-binaries.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ jobs:
294294
sparse-checkout-cone-mode: false
295295

296296
- name: 'Download artifact'
297-
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
297+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
298298
with:
299299
pattern: '*-release-binary'
300300
merge-multiple: true

bolt/lib/Core/BinaryContext.cpp

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#include "llvm/MC/MCSymbol.h"
3434
#include "llvm/Support/CommandLine.h"
3535
#include "llvm/Support/Error.h"
36+
#include "llvm/Support/FileSystem.h"
3637
#include "llvm/Support/Regex.h"
3738
#include <algorithm>
3839
#include <functional>
@@ -1632,19 +1633,29 @@ void BinaryContext::preprocessDWODebugInfo() {
16321633
DwarfUnit->getUnitDIE().find(
16331634
{dwarf::DW_AT_dwo_name, dwarf::DW_AT_GNU_dwo_name}),
16341635
"");
1635-
SmallString<16> AbsolutePath;
1636+
SmallString<16> AbsolutePath(DWOName);
1637+
std::string DWOCompDir = DwarfUnit->getCompilationDir();
16361638
if (!opts::CompDirOverride.empty()) {
1637-
sys::path::append(AbsolutePath, opts::CompDirOverride);
1638-
sys::path::append(AbsolutePath, DWOName);
1639+
DWOCompDir = opts::CompDirOverride;
1640+
} else if (!sys::fs::exists(DWOCompDir) && sys::fs::exists(DWOName)) {
1641+
DWOCompDir = ".";
1642+
this->outs()
1643+
<< "BOLT-WARNING: Debug Fission: Debug Compilation Directory of "
1644+
<< DWOName
1645+
<< " does not exist. Relative path will be used to process .dwo "
1646+
"files.\n";
16391647
}
1648+
// Prevent failures when DWOName is already an absolute path.
1649+
sys::fs::make_absolute(DWOCompDir, AbsolutePath);
16401650
DWARFUnit *DWOCU =
16411651
DwarfUnit->getNonSkeletonUnitDIE(false, AbsolutePath).getDwarfUnit();
16421652
if (!DWOCU->isDWOUnit()) {
16431653
this->outs()
16441654
<< "BOLT-WARNING: Debug Fission: DWO debug information for "
16451655
<< DWOName
16461656
<< " was not retrieved and won't be updated. Please check "
1647-
"relative path.\n";
1657+
"relative path or use '--comp-dir-override' to specify the base "
1658+
"location.\n";
16481659
continue;
16491660
}
16501661
DWOCUs[*DWOId] = DWOCU;

bolt/lib/Rewrite/DWARFRewriter.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1846,15 +1846,16 @@ void DWARFRewriter::writeDWOFiles(
18461846
}
18471847

18481848
std::string CompDir = CU.getCompilationDir();
1849+
SmallString<16> AbsolutePath(DWOName);
18491850

18501851
if (!opts::DwarfOutputPath.empty())
18511852
CompDir = opts::DwarfOutputPath.c_str();
18521853
else if (!opts::CompDirOverride.empty())
18531854
CompDir = opts::CompDirOverride;
1854-
1855-
SmallString<16> AbsolutePath;
1856-
sys::path::append(AbsolutePath, CompDir);
1857-
sys::path::append(AbsolutePath, DWOName);
1855+
else if (!sys::fs::exists(CompDir))
1856+
CompDir = ".";
1857+
// Prevent failures when DWOName is already an absolute path.
1858+
sys::fs::make_absolute(CompDir, AbsolutePath);
18581859

18591860
std::error_code EC;
18601861
std::unique_ptr<ToolOutputFile> TempOut =

0 commit comments

Comments
 (0)