Skip to content

Commit f23c355

Browse files
Merge pull request #39 from jeongseok-meta/adaptivecpp-enable-osx64-current
Enable osx-64 AdaptiveCpp builds
2 parents 8bfd424 + cd434c5 commit f23c355

7 files changed

Lines changed: 143 additions & 73 deletions

File tree

.azure-pipelines/azure-pipelines-osx.yml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.ci_support/osx_64_.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
MACOSX_DEPLOYMENT_TARGET:
2+
- '11.0'
3+
MACOSX_SDK_VERSION:
4+
- '11.0'
5+
c_compiler:
6+
- clang
7+
c_compiler_version:
8+
- '19'
9+
c_stdlib:
10+
- macosx_deployment_target
11+
c_stdlib_version:
12+
- '11.0'
13+
channel_sources:
14+
- conda-forge
15+
channel_targets:
16+
- conda-forge main
17+
cuda_compiler:
18+
- cuda-nvcc
19+
cuda_compiler_version:
20+
- None
21+
cxx_compiler:
22+
- clangxx
23+
cxx_compiler_version:
24+
- '19'
25+
libboost_devel:
26+
- '1.90'
27+
llvm_openmp:
28+
- '19'
29+
llvm_version:
30+
- '19'
31+
macos_machine:
32+
- x86_64-apple-darwin13.4.0
33+
target_platform:
34+
- osx-64
35+
zip_keys:
36+
- - c_compiler_version
37+
- cxx_compiler_version

README.md

Lines changed: 74 additions & 67 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

recipe/build.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,11 @@ cmake \
7575
cmake --build build --parallel
7676

7777
cmake --install build --strip
78+
79+
if [[ "${target_platform}" == "osx-64" ]]; then
80+
# Avoid recording the ephemeral build-env compiler in the new native macOS package.
81+
sed -i.bak -E \
82+
"s#\"default-cpu-cxx\"[[:space:]]*:[[:space:]]*\"[^\"]*\"#\"default-cpu-cxx\" : \"${PREFIX}/bin/clang++\"#" \
83+
"${PREFIX}/etc/AdaptiveCpp/acpp-core.json"
84+
rm -f "${PREFIX}/etc/AdaptiveCpp/acpp-core.json.bak"
85+
fi

recipe/conda_build_config.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
c_stdlib_version: # [osx and x86_64]
2+
- '11.0' # [osx and x86_64]
3+
14
llvm_version:
2-
- 16
3-
- 17
4-
- 18
5+
- 16 # [not (osx and x86_64)]
6+
- 17 # [not (osx and x86_64)]
7+
- 18 # [not (osx and x86_64)]
58
- 19

recipe/meta.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ build:
4646
# https://conda-forge.org/docs/maintainer/knowledge_base/#nvcudadll-cannot-be-found-on-windows
4747
- "*/nvcuda.dll" # [win]
4848
- "*/libcuda.so.1" # [linux]
49-
skip: true # [osx and x86_64]
5049
skip: true # [win and cuda_compiler_version == "13.0"]
5150
skip: true # [linux and aarch64 and cuda_compiler_version != "None"]
5251
string: cpu_llvm{{ llvm_version }}_h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [cuda_compiler_version == "None"]
@@ -87,7 +86,8 @@ requirements:
8786
- cuda-version {{ cuda_compiler_version }}
8887
{% endif %}
8988
run:
90-
- clangdev # [osx]
89+
- clangdev {{ llvm_version }} # [osx and x86_64]
90+
- clangdev # [osx and arm64]
9191
# The acpp driver defaults to the clang++ installed by clangxx.
9292
- clangxx {{ llvm_version }} # [linux]
9393
- hip-runtime-amd # [linux and x86_64]
@@ -114,6 +114,8 @@ test:
114114
- test -f $PREFIX/lib/hipSYCL/bitcode/libkernel-sscp-host-full.bc # [linux]
115115
- test ! -e $PREFIX/lib/lib/hipSYCL/bitcode/libkernel-sscp-host-full.bc # [linux]
116116
- test -x $PREFIX/lib/hipSYCL/llvm-to-backend/llvm-to-spirv-tool # [linux]
117+
- test -x $PREFIX/bin/clang++ # [osx and x86_64]
118+
- "! grep -R \"_build_env.*/.*clang\" $PREFIX/etc/AdaptiveCpp/acpp-core.json" # [osx and x86_64]
117119
- "test -x $PREFIX/bin/clang++-{{ llvm_version }} || test -x $PREFIX/bin/clang++" # [linux]
118120
- "test -x $PREFIX/bin/opt-{{ llvm_version }} || test -x $PREFIX/bin/opt" # [linux]
119121
- "test -x $PREFIX/bin/llc-{{ llvm_version }} || test -x $PREFIX/bin/llc" # [linux]

recipe/run_test.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,19 @@
22

33
set -exo pipefail
44

5+
cmake_extra_args=()
6+
7+
if [[ "${target_platform}" == "osx-64" ]]; then
8+
cmake_extra_args+=("-DACPP_TARGETS=omp")
9+
cmake_extra_args+=("-DACPP_CPU_CXX=${CXX}")
10+
fi
11+
512
cmake tests \
613
${CMAKE_ARGS} \
714
-G Ninja \
815
-B tests/build \
916
-DBUILD_SHARED_LIBS=ON \
10-
-DCMAKE_BUILD_TYPE=Release
17+
-DCMAKE_BUILD_TYPE=Release \
18+
"${cmake_extra_args[@]}"
1119

1220
cmake --build tests/build --parallel

0 commit comments

Comments
 (0)