Skip to content

Commit

Permalink
Merge from main + post-merge fixes (20.11.2024)
Browse files Browse the repository at this point in the history
  • Loading branch information
ergawy authored Nov 21, 2024
2 parents 5009eb4 + c4bca6c commit 109ac78
Show file tree
Hide file tree
Showing 3,100 changed files with 119,134 additions and 81,336 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
41 changes: 20 additions & 21 deletions .ci/generate_test_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,8 @@ def test_report_size_limit(self):
# If include failures is False, total number of test will be reported but their names
# and output will not be.
def _generate_report(title, junit_objects, size_limit=1024 * 1024, list_failures=True):
style = None

if not junit_objects:
return ("", style)
return ("", "success")

failures = {}
tests_run = 0
Expand Down Expand Up @@ -403,22 +401,23 @@ def generate_report(title, junit_files):

report, style = generate_report(args.title, args.junit_files)

p = subprocess.Popen(
[
"buildkite-agent",
"annotate",
"--context",
args.context,
"--style",
style,
],
stdin=subprocess.PIPE,
stderr=subprocess.PIPE,
universal_newlines=True,
)
if report:
p = subprocess.Popen(
[
"buildkite-agent",
"annotate",
"--context",
args.context,
"--style",
style,
],
stdin=subprocess.PIPE,
stderr=subprocess.PIPE,
universal_newlines=True,
)

# The report can be larger than the buffer for command arguments so we send
# it over stdin instead.
_, err = p.communicate(input=report)
if p.returncode:
raise RuntimeError(f"Failed to send report to buildkite-agent:\n{err}")
# The report can be larger than the buffer for command arguments so we send
# it over stdin instead.
_, err = p.communicate(input=report)
if p.returncode:
raise RuntimeError(f"Failed to send report to buildkite-agent:\n{err}")
3 changes: 3 additions & 0 deletions .github/new-issues-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@

'bolt':
- '/\bbolt(?!\-)\b/i'

'infra:commit-access-request':
- '/Request Commit Access/'
31 changes: 15 additions & 16 deletions .github/workflows/libcxx-build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,11 @@ env:
LLVM_SYMBOLIZER_PATH: "/usr/bin/llvm-symbolizer-19"
CLANG_CRASH_DIAGNOSTICS_DIR: "crash_diagnostics"


jobs:
stage1:
if: github.repository_owner == 'llvm'
runs-on: libcxx-runners-set
container: ghcr.io/libcxx/actions-builder:testing-2024-09-21
runs-on: libcxx-self-hosted-linux
container: ghcr.io/llvm/libcxx-linux-builder:0fd6f684b9c84c32d6cbfd9742402e788b2879f1
continue-on-error: false
strategy:
fail-fast: false
Expand Down Expand Up @@ -86,8 +85,8 @@ jobs:
**/crash_diagnostics/*
stage2:
if: github.repository_owner == 'llvm'
runs-on: libcxx-runners-set
container: ghcr.io/libcxx/actions-builder:testing-2024-09-21
runs-on: libcxx-self-hosted-linux
container: ghcr.io/llvm/libcxx-linux-builder:0fd6f684b9c84c32d6cbfd9742402e788b2879f1
needs: [ stage1 ]
continue-on-error: false
strategy:
Expand Down Expand Up @@ -161,21 +160,21 @@ jobs:
'generic-static',
'bootstrapping-build'
]
machine: [ 'libcxx-runners-set' ]
machine: [ 'libcxx-self-hosted-linux' ]
include:
- config: 'generic-cxx26'
machine: libcxx-runners-set
machine: libcxx-self-hosted-linux
- config: 'generic-asan'
machine: libcxx-runners-set
machine: libcxx-self-hosted-linux
- config: 'generic-tsan'
machine: libcxx-runners-set
machine: libcxx-self-hosted-linux
- config: 'generic-ubsan'
machine: libcxx-runners-set
machine: libcxx-self-hosted-linux
# Use a larger machine for MSAN to avoid timeout and memory allocation issues.
- config: 'generic-msan'
machine: libcxx-runners-set
machine: libcxx-self-hosted-linux
runs-on: ${{ matrix.machine }}
container: ghcr.io/libcxx/actions-builder:testing-2024-09-21
container: ghcr.io/llvm/libcxx-linux-builder:0fd6f684b9c84c32d6cbfd9742402e788b2879f1
steps:
- uses: actions/checkout@v4
- name: ${{ matrix.config }}
Expand All @@ -202,13 +201,13 @@ jobs:
matrix:
include:
- config: generic-cxx03
os: macos-latest
os: macos-15
- config: generic-cxx23
os: macos-latest
os: macos-15
- config: generic-modules
os: macos-latest
os: macos-15
- config: apple-configuration
os: macos-latest
os: macos-15
- config: apple-system
os: macos-13
- config: apple-system-hardened
Expand Down
71 changes: 71 additions & 0 deletions .github/workflows/libcxx-build-containers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# This file defines an action that builds the various Docker images used to run
# libc++ CI whenever modifications to those Docker files are pushed to `main`.
#
# The images are pushed to the LLVM package registry at https://github.com/orgs/llvm/packages
# and tagged appropriately. The selection of which Docker image version is used by the libc++
# CI nodes at any given point is controlled from the workflow files themselves.

name: Build Docker images for libc++ CI

permissions:
contents: read
packages: write

on:
push:
branches:
- main
paths:
- 'libcxx/utils/ci/**'
- '.github/workflows/libcxx-build-containers.yml'
pull_request:
branches:
- main
paths:
- 'libcxx/utils/ci/**'
- '.github/workflows/libcxx-build-containers.yml'

jobs:
build-and-push:
runs-on: ubuntu-latest
if: github.repository_owner == 'llvm'
permissions:
packages: write

steps:
- uses: actions/checkout@v4

- name: Build the Linux builder image
working-directory: libcxx/utils/ci
run: docker compose build actions-builder
env:
TAG: ${{ github.sha }}

# - name: Build the Android builder image
# working-directory: libcxx/utils/ci
# run: docker compose build android-buildkite-builder
# env:
# TAG: ${{ github.sha }}

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push the Linux builder image
if: github.event_name == 'push'
working-directory: libcxx/utils/ci
run: |
docker compose push actions-builder
env:
TAG: ${{ github.sha }}

# - name: Push the Android builder image
# if: github.event_name == 'push'
# working-directory: libcxx/utils/ci
# run: |
# docker compose push android-buildkite-builder
# env:
# TAG: ${{ github.sha }}
9 changes: 9 additions & 0 deletions bolt/include/bolt/Core/BinarySection.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ class BinarySection {
// been renamed)
uint64_t OutputAddress{0}; // Section address for the rewritten binary.
uint64_t OutputSize{0}; // Section size in the rewritten binary.
// Can exceed OutputContents with padding.
uint64_t OutputFileOffset{0}; // File offset in the rewritten binary file.
StringRef OutputContents; // Rewritten section contents.
const uint64_t SectionNumber; // Order in which the section was created.
Expand Down Expand Up @@ -474,6 +475,11 @@ class BinarySection {
/// Use name \p SectionName for the section during the emission.
void emitAsData(MCStreamer &Streamer, const Twine &SectionName) const;

/// Write finalized contents of the section. If OutputSize exceeds the size of
/// the OutputContents, append zero padding to the stream and return the
/// number of byte written which should match the OutputSize.
uint64_t write(raw_ostream &OS) const;

using SymbolResolverFuncTy = llvm::function_ref<uint64_t(const MCSymbol *)>;

/// Flush all pending relocations to patch original contents of sections
Expand All @@ -497,6 +503,9 @@ class BinarySection {
IsFinalized = true;
}

/// When writing section contents, add \p PaddingSize zero bytes at the end.
void addPadding(uint64_t PaddingSize) { OutputSize += PaddingSize; }

/// Reorder the contents of this section according to /p Order. If
/// /p Inplace is true, the entire contents of the section is reordered,
/// otherwise the new contents contain only the reordered data.
Expand Down
Loading

0 comments on commit 109ac78

Please sign in to comment.