Skip to content

Commit 90ca19a

Browse files
committed
CI: Fix Azure pipelines Darwin build
1 parent e226aff commit 90ca19a

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

azure-pipelines.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,21 +94,21 @@ jobs:
9494
# prepare environment for the following steps
9595
source $HOME/.cargo/env
9696
# print some useful info to help troubleshoot
97-
brew info llvm
97+
brew info llvm@17
9898
which python3
9999
/usr/bin/env python3 -c "import sys; print(sys.path)"
100100
displayName: 'Provision macOS'
101101
102102
- script: |
103-
export LLVM_CONFIG_PATH=$(brew --prefix llvm)/bin/llvm-config
103+
export LLVM_CONFIG_PATH=$(brew --prefix llvm@17)/bin/llvm-config
104104
export RUSTFLAGS="-D warnings"
105105
export RUSTDOCFLAGS="-D warnings"
106106
# Don't build with `--all-features` (see analogous step for Linux).
107107
cargo build --release
108108
displayName: 'cargo build against host clang/LLVM (fast build)'
109109
110110
- script: |
111-
export LLVM_CONFIG_PATH=$(brew --prefix llvm)/bin/llvm-config
111+
$(brew --prefix llvm@17)/bin/llvm-config
112112
export RUSTFLAGS="-D warnings"
113113
export RUSTDOCFLAGS="-D warnings"
114114
cargo test --release --workspace

c2rust-build-paths/src/lib.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ pub fn find_llvm_config() -> Option<PathBuf> {
9191
.or_else(|| {
9292
// In PATH
9393
[
94+
"llvm-config-18",
95+
"llvm-config-17",
96+
"llvm-config-16",
97+
"llvm-config-15",
9498
"llvm-config-14",
9599
"llvm-config-13",
96100
"llvm-config-12",
@@ -102,6 +106,11 @@ pub fn find_llvm_config() -> Option<PathBuf> {
102106
"llvm-config-7.0",
103107
"llvm-config",
104108
// Homebrew install locations on Intel macOS
109+
"/usr/local/opt/llvm@18/bin/llvm-config",
110+
"/usr/local/opt/llvm@17/bin/llvm-config",
111+
"/usr/local/opt/llvm@16/bin/llvm-config",
112+
"/usr/local/opt/llvm@15/bin/llvm-config",
113+
"/usr/local/opt/llvm@14/bin/llvm-config",
105114
"/usr/local/opt/llvm@13/bin/llvm-config",
106115
"/usr/local/opt/llvm@12/bin/llvm-config",
107116
"/usr/local/opt/llvm@11/bin/llvm-config",
@@ -110,6 +119,11 @@ pub fn find_llvm_config() -> Option<PathBuf> {
110119
"/usr/local/opt/llvm@8/bin/llvm-config",
111120
"/usr/local/opt/llvm/bin/llvm-config",
112121
// Homebrew install locations on Apple Silicon macOS
122+
"/opt/homebrew/opt/llvm@18/bin/llvm-config",
123+
"/opt/homebrew/opt/llvm@17/bin/llvm-config",
124+
"/opt/homebrew/opt/llvm@16/bin/llvm-config",
125+
"/opt/homebrew/opt/llvm@15/bin/llvm-config",
126+
"/opt/homebrew/opt/llvm@14/bin/llvm-config",
113127
"/opt/homebrew/opt/llvm@13/bin/llvm-config",
114128
"/opt/homebrew/opt/llvm@12/bin/llvm-config",
115129
"/opt/homebrew/opt/llvm@11/bin/llvm-config",

0 commit comments

Comments
 (0)