Skip to content

Commit

Permalink
CI: Fix Azure pipelines Darwin build
Browse files Browse the repository at this point in the history
  • Loading branch information
thedataking committed May 2, 2024
1 parent e226aff commit aa99816
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
6 changes: 3 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,21 +94,21 @@ jobs:
# prepare environment for the following steps
source $HOME/.cargo/env
# print some useful info to help troubleshoot
brew info llvm
brew info llvm@17
which python3
/usr/bin/env python3 -c "import sys; print(sys.path)"
displayName: 'Provision macOS'
- script: |
export LLVM_CONFIG_PATH=$(brew --prefix llvm)/bin/llvm-config
export LLVM_CONFIG_PATH=$(brew --prefix llvm@17)/bin/llvm-config
export RUSTFLAGS="-D warnings"
export RUSTDOCFLAGS="-D warnings"
# Don't build with `--all-features` (see analogous step for Linux).
cargo build --release
displayName: 'cargo build against host clang/LLVM (fast build)'
- script: |
export LLVM_CONFIG_PATH=$(brew --prefix llvm)/bin/llvm-config
$(brew --prefix llvm@17)/bin/llvm-config
export RUSTFLAGS="-D warnings"
export RUSTDOCFLAGS="-D warnings"
cargo test --release --workspace
Expand Down
14 changes: 14 additions & 0 deletions c2rust-build-paths/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ pub fn find_llvm_config() -> Option<PathBuf> {
.or_else(|| {
// In PATH
[
"llvm-config-18",
"llvm-config-17",
"llvm-config-16",
"llvm-config-15",
"llvm-config-14",
"llvm-config-13",
"llvm-config-12",
Expand All @@ -102,6 +106,11 @@ pub fn find_llvm_config() -> Option<PathBuf> {
"llvm-config-7.0",
"llvm-config",
// Homebrew install locations on Intel macOS
"/usr/local/opt/llvm@18/bin/llvm-config",
"/usr/local/opt/llvm@17/bin/llvm-config",
"/usr/local/opt/llvm@16/bin/llvm-config",
"/usr/local/opt/llvm@15/bin/llvm-config",
"/usr/local/opt/llvm@14/bin/llvm-config",
"/usr/local/opt/llvm@13/bin/llvm-config",
"/usr/local/opt/llvm@12/bin/llvm-config",
"/usr/local/opt/llvm@11/bin/llvm-config",
Expand All @@ -110,6 +119,11 @@ pub fn find_llvm_config() -> Option<PathBuf> {
"/usr/local/opt/llvm@8/bin/llvm-config",
"/usr/local/opt/llvm/bin/llvm-config",
// Homebrew install locations on Apple Silicon macOS
"/opt/homebrew/opt/llvm@18/bin/llvm-config",
"/opt/homebrew/opt/llvm@17/bin/llvm-config",
"/opt/homebrew/opt/llvm@16/bin/llvm-config",
"/opt/homebrew/opt/llvm@15/bin/llvm-config",
"/opt/homebrew/opt/llvm@14/bin/llvm-config",
"/opt/homebrew/opt/llvm@13/bin/llvm-config",
"/opt/homebrew/opt/llvm@12/bin/llvm-config",
"/opt/homebrew/opt/llvm@11/bin/llvm-config",
Expand Down

0 comments on commit aa99816

Please sign in to comment.