From 0ffb43d7c848b1906c6db2666014d6755c46cde4 Mon Sep 17 00:00:00 2001 From: jupblb Date: Thu, 30 Oct 2025 20:59:26 -0700 Subject: [PATCH] Fix macOS ARM64 build issues with LLVM toolchain - Update LLVM toolchain from 15.0.6 to 16.0.0 for darwin-aarch64/arm64 to fix C++ stdlib math function resolution issues (isnan, isinf, isfinite, signbit) - Remove duplicate DERIVE_EQ_ALL macro in indexer/Indexer.h as DERIVE_CMP_ALL already includes it - Update triple to arm64-apple-darwin22.0 for LLVM 16.0.0 These changes resolve build failures on macOS ARM64 (darwin 26.0.1) caused by headers/SDK mismatch between LLVM 15.0.6's libc++ and Apple's SDK. Amp-Thread-ID: https://ampcode.com/threads/T-360f12c3-9af0-43de-9057-9c332eac9223 --- indexer/Indexer.h | 1 - setup_llvm.bzl | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/indexer/Indexer.h b/indexer/Indexer.h index 4722f001..c4c73ac1 100644 --- a/indexer/Indexer.h +++ b/indexer/Indexer.h @@ -80,7 +80,6 @@ struct FileLocalSourceRange { r.endLine); } DERIVE_CMP_ALL(FileLocalSourceRange) - DERIVE_EQ_ALL(FileLocalSourceRange) static std::pair fromNonEmpty(const clang::SourceManager &, clang::SourceRange inclusiveRange); diff --git a/setup_llvm.bzl b/setup_llvm.bzl index 42ab79a0..9bbbab46 100644 --- a/setup_llvm.bzl +++ b/setup_llvm.bzl @@ -6,8 +6,8 @@ def setup_llvm_toolchain(name): mapping = { "linux-aarch64": {"version": "15.0.6", "triple": "aarch64-linux-gnu", "sha256": "8ca4d68cf103da8331ca3f35fe23d940c1b78fb7f0d4763c1c059e352f5d1bec"}, "linux-x86_64": {"version": "15.0.6", "triple": "x86_64-linux-gnu-ubuntu-18.04", "sha256": "38bc7f5563642e73e69ac5626724e206d6d539fbef653541b34cae0ba9c3f036"}, - "darwin-aarch64": {"version": "15.0.6", "triple": "arm64-apple-darwin21.0", "sha256": "32bc7b8eee3d98f72dd4e5651e6da990274ee2d28c5c19a7d8237eb817ce8d91"}, - "darwin-arm64": {"version": "15.0.6", "triple": "arm64-apple-darwin21.0", "sha256": "32bc7b8eee3d98f72dd4e5651e6da990274ee2d28c5c19a7d8237eb817ce8d91"}, + "darwin-aarch64": {"version": "16.0.0", "triple": "arm64-apple-darwin22.0", "sha256": "2041587b90626a4a87f0de14a5842c14c6c3374f42c8ed12726ef017416409d9"}, + "darwin-arm64": {"version": "16.0.0", "triple": "arm64-apple-darwin22.0", "sha256": "2041587b90626a4a87f0de14a5842c14c6c3374f42c8ed12726ef017416409d9"}, "darwin-x86_64": {"version": "15.0.7", "triple": "x86_64-apple-darwin21.0", "sha256": "d16b6d536364c5bec6583d12dd7e6cf841b9f508c4430d9ee886726bd9983f1c"}, "windows": {"version": "15.0.6", "sha256": "22e2f2c38be4c44db7a1e9da5e67de2a453c5b4be9cf91e139592a63877ac0a2", "url": "https://github.com/llvm/llvm-project/releases/download/llvmorg-15.0.6/LLVM-15.0.6-win64.exe"}, }