Skip to content

Commit 92f3899

Browse files
committed
MacOS: define CC, CXX etc. in Conan profile
1 parent 803de99 commit 92f3899

File tree

3 files changed

+32
-11
lines changed

3 files changed

+32
-11
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,11 @@ jobs:
168168
with:
169169
script: |
170170
if ('${{ runner.arch }}' == 'X64') {
171-
target = '10.15';
171+
target = '13.0';
172172
arch='x86_64';
173173
}
174174
else {
175-
target = '12.0';
175+
target = '14.2';
176176
arch='armv8';
177177
}
178178
core.exportVariable('MACOSX_DEPLOYMENT_TARGET', target);
@@ -196,7 +196,16 @@ jobs:
196196
shell: bash
197197
run: |
198198
brew install ispc
199-
bash ${{ env.WORKSPACE }}/install-conan.sh
199+
brew install llvm
200+
brew install libomp
201+
202+
T=$(brew --prefix llvm)
203+
ln -s $T/bin/llvm-install-name-tool $T/bin/install_name_tool
204+
205+
PATH=$T/bin:$PATH
206+
export PATH
207+
208+
source ${{ env.WORKSPACE }}/install-conan.sh
200209
201210
- name: Build (Linux)
202211
if: runner.os == 'Linux'
@@ -397,10 +406,10 @@ jobs:
397406
path: conan-cache
398407
key: deps-${{ matrix.os }}-${{ github.run_id }}
399408

400-
## For debugging
401-
#- name: Setup tmate session (debug)
402-
#if: ${{ failure() }}
403-
#uses: mxschmitt/action-tmate@v3
409+
# For debugging
410+
- name: Setup tmate session (debug)
411+
if: ${{ failure() }}
412+
uses: mxschmitt/action-tmate@v3
404413

405414
# Upload artifacts
406415
- uses: actions/upload-artifact@v4

conan-profiles/conan-profile-macOS-ARM64

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ minizip-ng/*:with_libcomp=False
1919
[buildenv]
2020
CXX=clang++
2121
CC=clang
22+
AR=llvm-ar
23+
RANLIB=llvm-ranlib
24+
LD=ld.lld
2225

2326
[conf]
2427
&:tools.build:cxxflags=["-O3"]

conan-profiles/conan-profile-macOS-X64

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ include(conan-profile-common)
22

33
[settings]
44
os=Macos
5-
os.version=10.15
5+
# 13.0 is required by libomp
6+
os.version=13.0
67
arch=x86_64
78
compiler=apple-clang
8-
compiler.version=14.0
9+
compiler.version=15
910
compiler.cppstd={{ os.getenv("CXX_VERSION") }}
1011
compiler.libcxx=libc++
1112

@@ -21,9 +22,17 @@ openvdb/*:simd=AVX
2122
opensubdiv/*:with_metal=False
2223

2324
[buildenv]
24-
CXX=clang++
25-
CC=clang
25+
# https://www.gnu.org/software/make/manual/make.html#index-AR
26+
CXX=/usr/local/opt/llvm/bin/clang++
27+
CC=/usr/local/opt/llvm/bin/clang
28+
AR=/usr/local/opt/llvm/bin/llvm-ar
29+
RANLIB=/usr/local/opt/llvm/bin/llvm-ranlib
30+
LD=/usr/local/opt/llvm/bin/ld.lld
31+
OBJCOPY=/usr/local/opt/llvm/bin/llvm-objcopy
32+
OTOOL=/usr/local/opt/llvm/bin/llvm-otool
33+
NM=/usr/local/opt/llvm/bin/llvm-nm
2634

2735
[conf]
2836
&:tools.build:cxxflags+=["-ftree-vectorize", "-march=x86-64-v3", "-O3", "-mno-avx2"]
37+
&:tools.build:verbosity=verbose
2938
# NB: Github MacOS X64 runner does not support avx2 nor avx512

0 commit comments

Comments
 (0)