Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/list-cmake-generators.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: List CMake Generators

on:
pull_request:

jobs:
list-generators:
if: false
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- ubuntu-24.04-arm
- windows-latest
- macos-latest
- macos-15-intel
runs-on: ${{ matrix.os }}
steps:
- name: List available CMake generators
shell: bash
run: |
OUTPUT=$(cmake -G 2>&1) || true
echo "$OUTPUT"
echo "## CMake Generators on ${{ matrix.os }}" >> "$GITHUB_STEP_SUMMARY"
echo '```' >> "$GITHUB_STEP_SUMMARY"
echo "$OUTPUT" >> "$GITHUB_STEP_SUMMARY"
echo '```' >> "$GITHUB_STEP_SUMMARY"

- name: List available MSVC toolsets
if: runner.os == 'Windows'
shell: pwsh
run: |
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
$installPath = & $vswhere -latest -property installationPath
$toolsetsPath = Join-Path $installPath "VC\Tools\MSVC"
Write-Host "Installed MSVC toolsets:"
Get-ChildItem $toolsetsPath -Directory | ForEach-Object { Write-Host " $($_.Name)" }

- name: List compiler versions
if: runner.os != 'Windows'
run: |
echo "=== GCC ==="
gcc --version 2>/dev/null || echo "gcc not found"
echo ""
echo "=== Clang ==="
clang --version 2>/dev/null || echo "clang not found"
62 changes: 62 additions & 0 deletions .github/workflows/test-clang-exception.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Test Clang exception linking

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: macos-15
cc: clang
cxx: clang++
- os: macos-15-intel
cc: clang
cxx: clang++
- os: macos-26
cc: clang
cxx: clang++
- os: macos-26-intel
cc: clang
cxx: clang++
- os: macos-15-intel
cc: /usr/bin/clang
cxx: /usr/bin/clang++
- os: macos-26-intel
cc: /usr/bin/clang
cxx: /usr/bin/clang++

runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} (${{ matrix.cc }}/${{ matrix.cxx }})
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}

steps:
- uses: actions/checkout@v4

- name: Show system info
run: |
uname -m
sw_vers
which $CC
$CC --version
echo "---"
which $CXX
$CXX --version
echo "---"
echo "PATH=\"$PATH\""

- name: Configure
run: cmake -B build

- name: Build
run: cmake --build build --parallel

- name: Run
run: ./build/exception_test
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
cmake_minimum_required(VERSION 3.16)
project(homebrew_clang_exception_test CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

add_executable(exception_test main.cpp)
22 changes: 22 additions & 0 deletions main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#include <future>
#include <iostream>
#include <stdexcept>

// This triggers __cxa_init_primary_exception / __from_native_exception_pointer
// which are present in libc++ 18 headers but missing from Apple's system libc++.
// Reproduces: https://github.com/llvm/llvm-project/issues/86077

int main()
{
std::promise<int> p;
auto f = p.get_future();

try {
p.set_exception(std::make_exception_ptr(std::runtime_error("test")));
f.get();
} catch (const std::runtime_error& e) {
std::cout << "Caught: " << e.what() << std::endl;
}

return 0;
}
Loading