From 3f384645d241768aae3a3a1a8504b3e8b9c88c57 Mon Sep 17 00:00:00 2001 From: Yee Cheng Chin Date: Wed, 23 Oct 2024 15:25:32 -0700 Subject: [PATCH] Add workaround for Apple clang 16 (Xcode 16) Disable the constraint elimination step as it's buggy in clang 16. --- .github/workflows/ci.yml | 3 +++ ci/config.mk.apple-clang-16.sed | 1 + 2 files changed, 4 insertions(+) create mode 100644 ci/config.mk.apple-clang-16.sed diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 861b1d971b9d7..7b7158c567af7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -370,6 +370,9 @@ jobs: if clang --version | grep -qs 'Apple clang version \(1[3-9]\|[2-9]\)\.'; then sed -i.bak -f ci/config.mk.clang-12.sed ${SRCDIR}/auto/config.mk fi + if clang --version | grep -qs 'Apple clang version 16\.'; then + sed -i.bak -f ci/config.mk.apple-clang-16.sed ${SRCDIR}/auto/config.mk + fi - name: Build env: diff --git a/ci/config.mk.apple-clang-16.sed b/ci/config.mk.apple-clang-16.sed new file mode 100644 index 0000000000000..5d4d7d7c84c73 --- /dev/null +++ b/ci/config.mk.apple-clang-16.sed @@ -0,0 +1 @@ +/^CFLAGS[[:blank:]]*=/s/$/ -mllvm -enable-constraint-elimination=0/