Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ set -ex

if [[ $target_platform == osx-* ]]; then
export CPU_COUNT=1
else
export CC=$(which clang)
export CXX=$(which clang++)
elif [[ $target_platform == linux-* ]]; then
export CC=${BUILD_PREFIX}/bin/clang-${CLANG_EXE_VERSION}
export CXX=${BUILD_PREFIX}/bin/clang++-${CLANG_EXE_VERSION}
if [[ ! -f ${CXX} ]]; then
# Remove after https://github.com/conda-forge/clangdev-feedstock/pull/387 is in
ln -sf ${CC} ${CXX}
fi
Comment on lines +9 to +12
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we wait for conda-forge/clangdev-feedstock#387 with this?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can merge this for now. It'll be a no-op once that PR is in

export TCROOT=$CONDA_BUILD_SYSROOT
fi
export cctools_cv_tapi_support=yes
Expand Down
17 changes: 7 additions & 10 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{% if llvm_version is not defined %}
{% set llvm_version = "21.1" %}
{% endif %}
{% set clang_exe_version = "19" %}

{% if cross_platform is not defined %}
{% set cross_platform = "osx-64" %}
Expand All @@ -23,14 +24,16 @@ source:
- patches/0004-avoid-stripping-out-C-stdlib-too-zealously.patch # [osx]

build:
number: 2
number: 3
skip: True # [win]
ignore_run_exports:
- zlib
script_env:
- CLANG_EXE_VERSION={{ clang_exe_version }}

requirements:
build:
- clangxx {{ llvm_version }}.* # [linux]
- clang-{{ clang_exe_version }} # [linux]
- {{ stdlib('c') }}
- {{ compiler('cxx') }}
- autoconf
Expand Down Expand Up @@ -79,8 +82,6 @@ outputs:
run_constrained:
- ld64 {{ ld64_version }}.*
- cctools {{ cctools_version }}.*
# clang might pull in the wrong cctools otherwise
- clang {{ llvm_version }}.*
test:
commands:
- test -f $PREFIX/bin/{{ cross_macos_machine }}-ar
Expand Down Expand Up @@ -120,7 +121,6 @@ outputs:
- sed
host:
- llvm {{ llvm_version }}.*
- clang {{ llvm_version }}.*
- tapi
- libcxx # [osx]
- libdispatch # [linux]
Expand All @@ -130,17 +130,16 @@ outputs:
- libcxx # [osx]
- sigtool
run_constrained:
- {{ pin_compatible("clang") }}
- ld {{ ld64_version }}.*
- cctools {{ cctools_version }}.*
- cctools_{{ cross_platform }} {{ cctools_version }}.*
test:
requires:
- clang {{ llvm_version }}.*
- clang-{{ clang_exe_version }}
commands:
- test -f $PREFIX/bin/{{ cross_macos_machine }}-ld
- echo "int main() {}" > lto.c # [osx]
- clang -c lto.c -o lto.o -flto # [osx]
- clang-{{ clang_exe_version }} -c lto.c -o lto.o -flto # [osx]
- $PREFIX/bin/{{ cross_macos_machine }}-ld lto.o -o lto -lSystem -arch x86_64 # [osx]
downstreams:
- gfortran_osx-64 # [osx and cross_platform=="osx-64"]
Expand All @@ -159,7 +158,6 @@ outputs:
requirements:
host:
- llvm {{ llvm_version }}.*
- clang {{ llvm_version }}.*
- {{ pin_subpackage("ld64_" + cross_platform, exact=True) }}
run:
- {{ pin_subpackage("ld64_" + cross_platform, exact=True) }}
Expand All @@ -184,7 +182,6 @@ outputs:
requirements:
host:
- llvm {{ llvm_version }}.*
- clang {{ llvm_version }}.*
- {{ pin_subpackage("ld64", exact=True) }}
- {{ pin_subpackage("cctools_" + cross_platform, exact=True) }}
run:
Expand Down