-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
automerged PR by conda-forge/automerge-action
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
get_triplet() { | ||
local CPU_ARCH | ||
if [[ "$1" == "linux-64" ]]; then | ||
CPU_ARCH="x86_64" | ||
elif [[ "$1" == "linux-ppc64le" ]]; then | ||
CPU_ARCH="powerpc64le" | ||
elif [[ "$1" == "linux-aarch64" ]]; then | ||
CPU_ARCH="aarch64" | ||
elif [[ "$1" == "linux-s390x" ]]; then | ||
CPU_ARCH="s390x" | ||
else | ||
echo "Unknown architecture" | ||
exit 1 | ||
fi | ||
echo $CPU_ARCH-conda-linux-gnu | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,20 @@ | ||
#!/bin/bash | ||
|
||
ln -s $PREFIX/bin/clang $PREFIX/bin/clang++ | ||
ln -s $PREFIX/bin/clang $PREFIX/bin/$HOST-clang++ | ||
|
||
if [[ "$variant" == "hcc" ]]; then | ||
ln -s $PREFIX/bin/clang++ $PREFIX/bin/hcc | ||
fi | ||
|
||
if [[ "$target_platform" == "linux-"* ]]; then | ||
source ${RECIPE_DIR}/get_cpu_triplet.sh | ||
CHOST=$(get_triplet $target_platform) | ||
ln -s "${PREFIX}/bin/clang++" "${PREFIX}/bin/${CHOST}-clang++" | ||
# In the cross compiling case, we set CONDA_BUILD_SYSROOT to host platform | ||
# which makes compiling for build platform not work correctly. | ||
# The following overrides CONDA_BUILD_SYSROOT, so that a clang for a given | ||
# CHOST will always use the appropriate sysroot. In particular, this means | ||
# that a clang in the build environment will work correctly for its native | ||
# architecture also in cross compilation scenarios. | ||
echo "--sysroot ${PREFIX}/${CHOST}/sysroot" >> ${PREFIX}/bin/${CHOST}-clang++.cfg | ||
fi |