Skip to content

Commit 1459d39

Browse files
authored
Merge pull request #124 from quarkslab/update-ci
try switching back to Apple Clang CI
2 parents 7ecc172 + 69d399f commit 1459d39

2 files changed

Lines changed: 9 additions & 45 deletions

File tree

.github/workflows/build.yml

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -148,19 +148,14 @@ jobs:
148148
sudo apt-get update
149149
sudo apt-get install -y liblzma-dev
150150
151-
- name: Install macOS dependencies
151+
- name: Install liblzma (macOS)
152152
if: ${{ runner.os == 'macOS' && steps.ccache-cache.outputs.cache-hit != 'true' }}
153-
run: brew install llvm@18 xz
153+
run: brew install xz
154154

155155
- name: Install liblzma (Windows)
156156
if: ${{ matrix.os == 'windows-latest' && steps.ccache-cache.outputs.cache-hit != 'true' }}
157157
run: vcpkg install liblzma:x64-windows
158158

159-
- name: Set LLVM_ROOT (macOS)
160-
if: ${{ runner.os == 'macOS' && steps.ccache-cache.outputs.cache-hit != 'true' }}
161-
shell: bash
162-
run: echo "LLVM_ROOT_PARAM=-DLLVM_ROOT=$(brew --prefix llvm@18)" >> "$GITHUB_ENV"
163-
164159
- name: Configure cmake
165160
if: steps.ccache-cache.outputs.cache-hit != 'true'
166161
shell: bash
@@ -171,8 +166,7 @@ jobs:
171166
-DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \
172167
-DIDA_VERSION=9.3 \
173168
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
174-
-DFETCHCONTENT_BASE_DIR="$FETCHCONTENT_BASE_DIR" \
175-
${LLVM_ROOT_PARAM:+"$LLVM_ROOT_PARAM"}
169+
-DFETCHCONTENT_BASE_DIR="$FETCHCONTENT_BASE_DIR"
176170
177171
- name: Build
178172
if: steps.ccache-cache.outputs.cache-hit != 'true'
@@ -210,7 +204,7 @@ jobs:
210204
shell: bash
211205
run: |
212206
if [[ "$RUNNER_OS" == "macOS" ]]; then
213-
brew install ccache llvm@18
207+
brew install ccache
214208
else
215209
sudo apt-get update && sudo apt-get install -y ccache
216210
fi
@@ -244,20 +238,14 @@ jobs:
244238
ccache --set-config=compression=true
245239
ccache -z
246240
247-
- name: Set LLVM_ROOT (macOS)
248-
if: ${{ runner.os == 'macOS' }}
249-
shell: bash
250-
run: echo "LLVM_ROOT_PARAM=-DLLVM_ROOT=$(brew --prefix llvm@18)" >> "$GITHUB_ENV"
251-
252241
- name: Configure cmake
253242
shell: bash
254243
run: |
255244
cmake -B build-tests -S "$GITHUB_WORKSPACE" -G Ninja \
256245
-DCMAKE_BUILD_TYPE=Debug \
257246
-DNO_BUILD=On \
258247
-DBUILD_TEST=On \
259-
-DFETCHCONTENT_BASE_DIR="$FETCHCONTENT_BASE_DIR" \
260-
${LLVM_ROOT_PARAM:+"$LLVM_ROOT_PARAM"}
248+
-DFETCHCONTENT_BASE_DIR="$FETCHCONTENT_BASE_DIR"
261249
262250
- name: Build tests
263251
shell: bash
@@ -503,10 +491,10 @@ jobs:
503491
sudo apt-get update
504492
sudo apt-get install -y liblzma-dev
505493
506-
- name: Install macOS dependencies
494+
- name: Install liblzma (MacOS)
507495
if: ${{ matrix.os == 'macos-latest' }}
508496
run: |
509-
brew install llvm@18 xz
497+
brew install xz
510498
511499
- name: Install liblzma (Windows)
512500
if: ${{ matrix.os == 'windows-latest' }}
@@ -523,7 +511,6 @@ jobs:
523511
-DCMAKE_BUILD_TYPE="${BUILD_TYPE}" "$CMAKE_IDA_PARAM" \
524512
-DFETCHCONTENT_BASE_DIR="$FETCHCONTENT_BASE_DIR"
525513
526-
# We need to differentiate MacOS build from Linux because we want to use a specific compiler on MacOS
527514
- name: Prepare build environment (MacOS)
528515
if: ${{ matrix.os == 'macos-latest' }}
529516
env:
@@ -537,7 +524,6 @@ jobs:
537524
-G Ninja \
538525
-DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \
539526
"$CMAKE_IDA_PARAM" \
540-
-DLLVM_ROOT="$(brew --prefix llvm@18)" \
541527
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
542528
-DFETCHCONTENT_BASE_DIR="$FETCHCONTENT_BASE_DIR"
543529
@@ -624,7 +610,6 @@ jobs:
624610
echo "::error::No matching files found" && exit 1
625611
fi
626612
gh release upload "$TAG_NAME" "${files[@]}" --clobber
627-
628613
# Package the IDA >= 9.1 plugins for the Hex-Rays plugin manager / marketplace.
629614
# This does NOT recompile: it reuses the binaries already built by the `build`
630615
# job, repackaging them into one quokka-ida<version>.zip per IDA version

CMakeLists.txt

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -97,27 +97,8 @@ endif ()
9797

9898
if (UNIX)
9999
if(APPLE)
100-
set(LLVM_HOMEBREW_FORMULA "llvm@18")
101-
if(DEFINED LLVM_ROOT)
102-
message(STATUS "Using provided LLVM_ROOT: ${LLVM_ROOT}")
103-
else()
104-
message(WARNING "LLVM_ROOT not provided via -DLLVM_ROOT. Falling back to Homebrew's ${LLVM_HOMEBREW_FORMULA}.")
105-
execute_process(
106-
COMMAND brew --prefix ${LLVM_HOMEBREW_FORMULA}
107-
OUTPUT_VARIABLE LLVM_ROOT
108-
OUTPUT_STRIP_TRAILING_WHITESPACE
109-
)
110-
111-
message(STATUS "Using fallback LLVM_ROOT: ${LLVM_ROOT}")
112-
endif()
113-
114-
if(NOT EXISTS "${LLVM_ROOT}/bin/clang" OR NOT EXISTS "${LLVM_ROOT}/bin/clang++")
115-
message(FATAL_ERROR
116-
"Failed to locate ${LLVM_HOMEBREW_FORMULA} compilers under LLVM_ROOT='${LLVM_ROOT}'. "
117-
"Install it with 'brew install ${LLVM_HOMEBREW_FORMULA}' or provide LLVM_ROOT manually."
118-
)
119-
endif()
120-
100+
# Use the system Apple Clang toolchain (libc++ and the macOS SDK are its
101+
# defaults). We intentionally do not pin a Homebrew LLVM here.
121102
add_compile_options(
122103
"$<$<CONFIG:Debug>:-gfull>"
123104
-Wno-nullability-completeness
@@ -142,8 +123,6 @@ if (UNIX)
142123

143124
message(STATUS "Using macOS SDK: ${SDKROOT}")
144125

145-
set(CMAKE_C_COMPILER "${LLVM_ROOT}/bin/clang" CACHE FILEPATH "The C compiler")
146-
set(CMAKE_CXX_COMPILER "${LLVM_ROOT}/bin/clang++" CACHE FILEPATH "The C++ compiler")
147126
set(CMAKE_OSX_SYSROOT "${SDKROOT}")
148127
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -isysroot ${SDKROOT}")
149128
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isysroot ${SDKROOT} -stdlib=libc++")

0 commit comments

Comments
 (0)