diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml
index 47138eb8..6894cd14 100755
--- a/.azure-pipelines/azure-pipelines-linux.yml
+++ b/.azure-pipelines/azure-pipelines-linux.yml
@@ -5,22 +5,21 @@
jobs:
- job: linux
pool:
- vmImage: ubuntu-16.04
+ vmImage: ubuntu-latest
strategy:
matrix:
- linux_64_target_platformlinux-64variantdefault:
- CONFIG: linux_64_target_platformlinux-64variantdefault
+ linux_64_variantdefault:
+ CONFIG: linux_64_variantdefault
UPLOAD_PACKAGES: 'True'
- DOCKER_IMAGE: condaforge/linux-anvil-comp7
- linux_aarch64_target_platformlinux-aarch64variantdefault:
- CONFIG: linux_aarch64_target_platformlinux-aarch64variantdefault
+ DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64
+ linux_aarch64_variantdefault:
+ CONFIG: linux_aarch64_variantdefault
UPLOAD_PACKAGES: 'True'
- DOCKER_IMAGE: condaforge/linux-anvil-comp7
- linux_ppc64le_target_platformlinux-ppc64levariantdefault:
- CONFIG: linux_ppc64le_target_platformlinux-ppc64levariantdefault
+ DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64
+ linux_ppc64le_variantdefault:
+ CONFIG: linux_ppc64le_variantdefault
UPLOAD_PACKAGES: 'True'
- DOCKER_IMAGE: condaforge/linux-anvil-comp7
- maxParallel: 8
+ DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64
timeoutInMinutes: 360
steps:
@@ -41,6 +40,11 @@ jobs:
export CI=azure
export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME
export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME})
+ if [[ "${BUILD_REASON:-}" == "PullRequest" ]]; then
+ export IS_PR_BUILD="True"
+ else
+ export IS_PR_BUILD="False"
+ fi
.scripts/run_docker_build.sh
displayName: Run docker build
env:
diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml
index 0222e706..84d4f421 100755
--- a/.azure-pipelines/azure-pipelines-osx.yml
+++ b/.azure-pipelines/azure-pipelines-osx.yml
@@ -8,10 +8,12 @@ jobs:
vmImage: macOS-10.15
strategy:
matrix:
- osx_64_target_platformosx-64:
- CONFIG: osx_64_target_platformosx-64
+ osx_64_:
+ CONFIG: osx_64_
+ UPLOAD_PACKAGES: 'True'
+ osx_arm64_:
+ CONFIG: osx_arm64_
UPLOAD_PACKAGES: 'True'
- maxParallel: 8
timeoutInMinutes: 360
steps:
@@ -21,6 +23,11 @@ jobs:
export OSX_FORCE_SDK_DOWNLOAD="1"
export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME
export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME})
+ if [[ "${BUILD_REASON:-}" == "PullRequest" ]]; then
+ export IS_PR_BUILD="True"
+ else
+ export IS_PR_BUILD="False"
+ fi
./.scripts/run_osx_build.sh
displayName: Run OSX build
env:
diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml
index db39526c..e8029d96 100755
--- a/.azure-pipelines/azure-pipelines-win.yml
+++ b/.azure-pipelines/azure-pipelines-win.yml
@@ -5,13 +5,12 @@
jobs:
- job: win
pool:
- vmImage: vs2017-win2016
+ vmImage: windows-2019
strategy:
matrix:
- win_64_target_platformwin-64:
- CONFIG: win_64_target_platformwin-64
+ win_64_:
+ CONFIG: win_64_
UPLOAD_PACKAGES: 'True'
- maxParallel: 4
timeoutInMinutes: 360
variables:
CONDA_BLD_PATH: D:\\bld\\
@@ -53,7 +52,7 @@ jobs:
- task: CondaEnvironment@1
inputs:
- packageSpecs: 'python=3.6 conda-build conda conda-forge::conda-forge-ci-setup=3 pip' # Optional
+ packageSpecs: 'python=3.9 conda-build conda "conda-forge-ci-setup=3" pip boa' # Optional
installOptions: "-c conda-forge"
updateConda: true
displayName: Install conda-build and activate environment
@@ -87,7 +86,7 @@ jobs:
- script: |
call activate base
- conda.exe build "recipe" -m .ci_support\%CONFIG%.yaml
+ conda.exe mambabuild "recipe" -m .ci_support\%CONFIG%.yaml --suppress-variables
displayName: Build recipe
env:
PYTHONUNBUFFERED: 1
@@ -108,4 +107,4 @@ jobs:
BINSTAR_TOKEN: $(BINSTAR_TOKEN)
FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN)
STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN)
- condition: and(succeeded(), not(eq(variables['UPLOAD_PACKAGES'], 'False')))
\ No newline at end of file
+ condition: and(succeeded(), not(eq(variables['UPLOAD_PACKAGES'], 'False')), not(eq(variables['Build.Reason'], 'PullRequest')))
\ No newline at end of file
diff --git a/.ci_support/linux_64_target_platformlinux-64variantdefault.yaml b/.ci_support/linux_64_target_platformlinux-64variantdefault.yaml
deleted file mode 100644
index 7a5d40d3..00000000
--- a/.ci_support/linux_64_target_platformlinux-64variantdefault.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-channel_sources:
-- conda-forge/label/llvm_rc,conda-forge,defaults
-channel_targets:
-- conda-forge llvm_rc
-cxx_compiler:
-- gxx
-cxx_compiler_version:
-- '7'
-docker_image:
-- condaforge/linux-anvil-comp7
-target_platform:
-- linux-64
-variant:
-- default
-vc:
-- '14'
diff --git a/.ci_support/linux_64_variantdefault.yaml b/.ci_support/linux_64_variantdefault.yaml
new file mode 100644
index 00000000..9eab6a62
--- /dev/null
+++ b/.ci_support/linux_64_variantdefault.yaml
@@ -0,0 +1,30 @@
+cdt_name:
+- cos6
+channel_sources:
+- conda-forge/label/llvm_rc,conda-forge
+channel_targets:
+- conda-forge llvm_rc
+cxx_compiler:
+- gxx
+cxx_compiler_version:
+- '9'
+docker_image:
+- quay.io/condaforge/linux-anvil-cos7-x86_64
+pin_run_as_build:
+ python:
+ min_pin: x.x
+ max_pin: x.x
+ zlib:
+ max_pin: x.x
+python:
+- 3.7.* *_cpython
+- 3.8.* *_cpython
+- 3.9.* *_cpython
+target_platform:
+- linux-64
+variant:
+- default
+vc:
+- '14'
+zlib:
+- '1.2'
diff --git a/.ci_support/linux_aarch64_target_platformlinux-aarch64variantdefault.yaml b/.ci_support/linux_aarch64_variantdefault.yaml
similarity index 62%
rename from .ci_support/linux_aarch64_target_platformlinux-aarch64variantdefault.yaml
rename to .ci_support/linux_aarch64_variantdefault.yaml
index 1477d29e..6cca8d12 100644
--- a/.ci_support/linux_aarch64_target_platformlinux-aarch64variantdefault.yaml
+++ b/.ci_support/linux_aarch64_variantdefault.yaml
@@ -5,18 +5,23 @@ cdt_arch:
cdt_name:
- cos7
channel_sources:
-- conda-forge/label/llvm_rc,conda-forge,defaults
+- conda-forge/label/llvm_rc,conda-forge
channel_targets:
- conda-forge llvm_rc
cxx_compiler:
- gxx
cxx_compiler_version:
-- '7'
+- '9'
docker_image:
-- condaforge/linux-anvil-comp7
+- quay.io/condaforge/linux-anvil-cos7-x86_64
+pin_run_as_build:
+ zlib:
+ max_pin: x.x
target_platform:
- linux-aarch64
variant:
- default
vc:
- '14'
+zlib:
+- '1.2'
diff --git a/.ci_support/linux_ppc64le_target_platformlinux-ppc64levariantdefault.yaml b/.ci_support/linux_ppc64le_variantdefault.yaml
similarity index 53%
rename from .ci_support/linux_ppc64le_target_platformlinux-ppc64levariantdefault.yaml
rename to .ci_support/linux_ppc64le_variantdefault.yaml
index ca0e5dd2..133010cc 100644
--- a/.ci_support/linux_ppc64le_target_platformlinux-ppc64levariantdefault.yaml
+++ b/.ci_support/linux_ppc64le_variantdefault.yaml
@@ -1,5 +1,7 @@
+cdt_name:
+- cos7
channel_sources:
-- conda-forge/label/llvm_rc,conda-forge,defaults
+- conda-forge/label/llvm_rc,conda-forge
channel_targets:
- conda-forge llvm_rc
cxx_compiler:
@@ -7,10 +9,15 @@ cxx_compiler:
cxx_compiler_version:
- '8'
docker_image:
-- condaforge/linux-anvil-comp7
+- quay.io/condaforge/linux-anvil-cos7-x86_64
+pin_run_as_build:
+ zlib:
+ max_pin: x.x
target_platform:
- linux-ppc64le
variant:
- default
vc:
- '14'
+zlib:
+- '1.2'
diff --git a/.ci_support/osx_64_target_platformosx-64.yaml b/.ci_support/osx_64_.yaml
similarity index 76%
rename from .ci_support/osx_64_target_platformosx-64.yaml
rename to .ci_support/osx_64_.yaml
index 6d8293d3..6d7a80f2 100644
--- a/.ci_support/osx_64_target_platformosx-64.yaml
+++ b/.ci_support/osx_64_.yaml
@@ -1,7 +1,7 @@
MACOSX_DEPLOYMENT_TARGET:
- '10.9'
channel_sources:
-- conda-forge/label/llvm_rc,conda-forge,defaults
+- conda-forge/label/llvm_rc,conda-forge
channel_targets:
- conda-forge llvm_rc
cxx_compiler:
@@ -10,8 +10,6 @@ cxx_compiler_version:
- '*'
macos_machine:
- x86_64-apple-darwin13.4.0
-macos_min_version:
-- '10.9'
target_platform:
- osx-64
variant:
diff --git a/.ci_support/osx_arm64_.yaml b/.ci_support/osx_arm64_.yaml
new file mode 100644
index 00000000..8f33f959
--- /dev/null
+++ b/.ci_support/osx_arm64_.yaml
@@ -0,0 +1,18 @@
+MACOSX_DEPLOYMENT_TARGET:
+- '11.0'
+channel_sources:
+- conda-forge/label/llvm_rc,conda-forge
+channel_targets:
+- conda-forge llvm_rc
+cxx_compiler:
+- clang_bootstrap
+cxx_compiler_version:
+- '11'
+macos_machine:
+- arm64-apple-darwin20.0.0
+target_platform:
+- osx-arm64
+variant:
+- default
+vc:
+- '14'
diff --git a/.ci_support/win_64_target_platformwin-64.yaml b/.ci_support/win_64_.yaml
similarity index 58%
rename from .ci_support/win_64_target_platformwin-64.yaml
rename to .ci_support/win_64_.yaml
index 45e9db70..886cd2e8 100644
--- a/.ci_support/win_64_target_platformwin-64.yaml
+++ b/.ci_support/win_64_.yaml
@@ -1,12 +1,17 @@
channel_sources:
-- conda-forge/label/llvm_rc,conda-forge,defaults
+- conda-forge/label/llvm_rc,conda-forge
channel_targets:
- conda-forge llvm_rc
cxx_compiler:
- vs2017
+pin_run_as_build:
+ zlib:
+ max_pin: x.x
target_platform:
- win-64
variant:
- default
vc:
- '14'
+zlib:
+- '1.2'
diff --git a/.gitattributes b/.gitattributes
index 9060b272..ce52713a 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -18,6 +18,7 @@ bld.bat text eol=crlf
.gitignore linguist-generated=true
.travis.yml linguist-generated=true
.scripts/* linguist-generated=true
+.woodpecker.yml linguist-generated=true
LICENSE.txt linguist-generated=true
README.md linguist-generated=true
azure-pipelines.yml linguist-generated=true
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index b572a862..fb73f00f 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -1 +1 @@
-* @SylvainCorlay @chrisburr @inducer @isuruf @jakirkham @timsnyder
\ No newline at end of file
+* @SylvainCorlay @chrisburr @h-vetinari @inducer @isuruf @jakirkham @timsnyder @xhochy
\ No newline at end of file
diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh
index ccfbbb6d..b3d5b819 100755
--- a/.scripts/build_steps.sh
+++ b/.scripts/build_steps.sh
@@ -5,9 +5,18 @@
# changes to this script, consider a proposal to conda-smithy so that other feedstocks can also
# benefit from the improvement.
+# -*- mode: jinja-shell -*-
+
set -xeuo pipefail
-export PYTHONUNBUFFERED=1
export FEEDSTOCK_ROOT="${FEEDSTOCK_ROOT:-/home/conda/feedstock_root}"
+source ${FEEDSTOCK_ROOT}/.scripts/logging_utils.sh
+
+
+( endgroup "Start Docker" ) 2> /dev/null
+
+( startgroup "Configuring conda" ) 2> /dev/null
+
+export PYTHONUNBUFFERED=1
export RECIPE_ROOT="${RECIPE_ROOT:-/home/conda/recipe_root}"
export CI_SUPPORT="${FEEDSTOCK_ROOT}/.ci_support"
export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml"
@@ -19,7 +28,9 @@ conda-build:
CONDARC
-conda install --yes --quiet conda-forge-ci-setup=3 conda-build pip -c conda-forge
+
+mamba install --update-specs --yes --quiet "conda-forge-ci-setup=3" conda-build pip boa -c conda-forge
+mamba update --update-specs --yes --quiet "conda-forge-ci-setup=3" conda-build pip boa -c conda-forge
# set up the condarc
setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}"
@@ -29,17 +40,42 @@ source run_conda_forge_build_setup
# make the build number clobber
make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}"
-if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]]; then
- EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test"
+if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]] && [[ "${HOST_PLATFORM}" != linux-* ]] && [[ "${BUILD_WITH_CONDA_DEBUG:-0}" != 1 ]]; then
+ EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test"
fi
-conda build "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \
- --suppress-variables ${EXTRA_CB_OPTIONS:-} \
- --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml"
-validate_recipe_outputs "${FEEDSTOCK_NAME}"
-if [[ "${UPLOAD_PACKAGES}" != "False" ]]; then
- upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}"
+( endgroup "Configuring conda" ) 2> /dev/null
+
+if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then
+ if [[ "x${BUILD_OUTPUT_ID:-}" != "x" ]]; then
+ EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --output-id ${BUILD_OUTPUT_ID}"
+ fi
+ conda debug "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \
+ ${EXTRA_CB_OPTIONS:-} \
+ --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml"
+
+ # Drop into an interactive shell
+ /bin/bash
+else
+ conda mambabuild "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \
+ --suppress-variables ${EXTRA_CB_OPTIONS:-} \
+ --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml"
+ ( startgroup "Validating outputs" ) 2> /dev/null
+
+ validate_recipe_outputs "${FEEDSTOCK_NAME}"
+
+ ( endgroup "Validating outputs" ) 2> /dev/null
+
+ ( startgroup "Uploading packages" ) 2> /dev/null
+
+ if [[ "${UPLOAD_PACKAGES}" != "False" ]] && [[ "${IS_PR_BUILD}" == "False" ]]; then
+ upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}"
+ fi
+
+ ( endgroup "Uploading packages" ) 2> /dev/null
fi
+( startgroup "Final checks" ) 2> /dev/null
+
touch "${FEEDSTOCK_ROOT}/build_artifacts/conda-forge-build-done-${CONFIG}"
\ No newline at end of file
diff --git a/.scripts/logging_utils.sh b/.scripts/logging_utils.sh
new file mode 100644
index 00000000..57bc95c2
--- /dev/null
+++ b/.scripts/logging_utils.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+# Provide a unified interface for the different logging
+# utilities CI providers offer. If unavailable, provide
+# a compatible fallback (e.g. bare `echo xxxxxx`).
+
+function startgroup {
+ # Start a foldable group of log lines
+ # Pass a single argument, quoted
+ case ${CI:-} in
+ azure )
+ echo "##[group]$1";;
+ travis )
+ echo "$1"
+ echo -en 'travis_fold:start:'"${1// /}"'\\r';;
+ github_actions )
+ echo "::group::$1";;
+ * )
+ echo "$1";;
+ esac
+} 2> /dev/null
+
+function endgroup {
+ # End a foldable group of log lines
+ # Pass a single argument, quoted
+
+ case ${CI:-} in
+ azure )
+ echo "##[endgroup]";;
+ travis )
+ echo -en 'travis_fold:end:'"${1// /}"'\\r';;
+ github_actions )
+ echo "::endgroup::";;
+ esac
+} 2> /dev/null
diff --git a/.scripts/run_docker_build.sh b/.scripts/run_docker_build.sh
index e4d5baba..0c6515fc 100755
--- a/.scripts/run_docker_build.sh
+++ b/.scripts/run_docker_build.sh
@@ -5,6 +5,10 @@
# changes to this script, consider a proposal to conda-smithy so that other feedstocks can also
# benefit from the improvement.
+source .scripts/logging_utils.sh
+
+( startgroup "Configure Docker" ) 2> /dev/null
+
set -xeo pipefail
THISDIR="$( cd "$( dirname "$0" )" >/dev/null && pwd )"
@@ -45,10 +49,14 @@ fi
if [ -z "${DOCKER_IMAGE}" ]; then
SHYAML_INSTALLED="$(shyaml -h || echo NO)"
if [ "${SHYAML_INSTALLED}" == "NO" ]; then
- echo "WARNING: DOCKER_IMAGE variable not set and shyaml not installed. Falling back to condaforge/linux-anvil-comp7"
- DOCKER_IMAGE="condaforge/linux-anvil-comp7"
+ echo "WARNING: DOCKER_IMAGE variable not set and shyaml not installed. Trying to parse with coreutils"
+ DOCKER_IMAGE=$(cat .ci_support/${CONFIG}.yaml | grep '^docker_image:$' -A 1 | tail -n 1 | cut -b 3-)
+ if [ "${DOCKER_IMAGE}" = "" ]; then
+ echo "No docker_image entry found in ${CONFIG}. Falling back to quay.io/condaforge/linux-anvil-comp7"
+ DOCKER_IMAGE="quay.io/condaforge/linux-anvil-comp7"
+ fi
else
- DOCKER_IMAGE="$(cat "${FEEDSTOCK_ROOT}/.ci_support/${CONFIG}.yaml" | shyaml get-value docker_image.0 condaforge/linux-anvil-comp7 )"
+ DOCKER_IMAGE="$(cat "${FEEDSTOCK_ROOT}/.ci_support/${CONFIG}.yaml" | shyaml get-value docker_image.0 quay.io/condaforge/linux-anvil-comp7 )"
fi
fi
@@ -62,24 +70,36 @@ if [ -z "${CI}" ]; then
DOCKER_RUN_ARGS="-it ${DOCKER_RUN_ARGS}"
fi
+( endgroup "Configure Docker" ) 2> /dev/null
+
+( startgroup "Start Docker" ) 2> /dev/null
+
export UPLOAD_PACKAGES="${UPLOAD_PACKAGES:-True}"
+export IS_PR_BUILD="${IS_PR_BUILD:-False}"
+docker pull "${DOCKER_IMAGE}"
docker run ${DOCKER_RUN_ARGS} \
- -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z \
- -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z \
+ -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z,delegated \
+ -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z,delegated \
-e CONFIG \
-e HOST_USER_ID \
-e UPLOAD_PACKAGES \
+ -e IS_PR_BUILD \
-e GIT_BRANCH \
-e UPLOAD_ON_BRANCH \
-e CI \
-e FEEDSTOCK_NAME \
-e CPU_COUNT \
+ -e BUILD_WITH_CONDA_DEBUG \
+ -e BUILD_OUTPUT_ID \
-e BINSTAR_TOKEN \
-e FEEDSTOCK_TOKEN \
-e STAGING_BINSTAR_TOKEN \
- $DOCKER_IMAGE \
+ "${DOCKER_IMAGE}" \
bash \
- /home/conda/feedstock_root/${PROVIDER_DIR}/build_steps.sh
+ "/home/conda/feedstock_root/${PROVIDER_DIR}/build_steps.sh"
# verify that the end of the script was reached
-test -f "$DONE_CANARY"
\ No newline at end of file
+test -f "$DONE_CANARY"
+
+# This closes the last group opened in `build_steps.sh`
+( endgroup "Final checks" ) 2> /dev/null
\ No newline at end of file
diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh
index d7e3c065..f5ec27af 100755
--- a/.scripts/run_osx_build.sh
+++ b/.scripts/run_osx_build.sh
@@ -1,56 +1,75 @@
#!/usr/bin/env bash
-set -x
+# -*- mode: jinja-shell -*-
+
+source .scripts/logging_utils.sh
+
+set -xe
+
+MINIFORGE_HOME=${MINIFORGE_HOME:-${HOME}/miniforge3}
+
+( startgroup "Installing a fresh version of Miniforge" ) 2> /dev/null
-echo -e "\n\nInstalling a fresh version of Miniforge."
-if [[ ${CI} == "travis" ]]; then
- echo -en 'travis_fold:start:install_miniforge\\r'
-fi
MINIFORGE_URL="https://github.com/conda-forge/miniforge/releases/latest/download"
-MINIFORGE_FILE="Miniforge3-MacOSX-x86_64.sh"
+MINIFORGE_FILE="Mambaforge-MacOSX-$(uname -m).sh"
curl -L -O "${MINIFORGE_URL}/${MINIFORGE_FILE}"
-bash $MINIFORGE_FILE -b
-if [[ ${CI} == "travis" ]]; then
- echo -en 'travis_fold:end:install_miniforge\\r'
-fi
+rm -rf ${MINIFORGE_HOME}
+bash $MINIFORGE_FILE -b -p ${MINIFORGE_HOME}
-echo -e "\n\nConfiguring conda."
-if [[ ${CI} == "travis" ]]; then
- echo -en 'travis_fold:start:configure_conda\\r'
-fi
+( endgroup "Installing a fresh version of Miniforge" ) 2> /dev/null
+
+( startgroup "Configuring conda" ) 2> /dev/null
-source ${HOME}/miniforge3/etc/profile.d/conda.sh
+source ${MINIFORGE_HOME}/etc/profile.d/conda.sh
conda activate base
echo -e "\n\nInstalling conda-forge-ci-setup=3 and conda-build."
-conda install -n base --quiet --yes conda-forge-ci-setup=3 conda-build pip
-
+mamba install -n base --update-specs --quiet --yes "conda-forge-ci-setup=3" conda-build pip boa
+mamba update -n base --update-specs --quiet --yes "conda-forge-ci-setup=3" conda-build pip boa
+mamba update -n base --update-specs --quiet --yes -c conda-forge/label/lief_dev -c conda-forge py-lief
echo -e "\n\nSetting up the condarc and mangling the compiler."
setup_conda_rc ./ ./recipe ./.ci_support/${CONFIG}.yaml
-mangle_compiler ./ ./recipe .ci_support/${CONFIG}.yaml
-echo -e "\n\nMangling homebrew in the CI to avoid conflicts."
-/usr/bin/sudo mangle_homebrew
-/usr/bin/sudo -k
+if [[ "${CI:-}" != "" ]]; then
+ mangle_compiler ./ ./recipe .ci_support/${CONFIG}.yaml
+fi
+
+if [[ "${CI:-}" != "" ]]; then
+ echo -e "\n\nMangling homebrew in the CI to avoid conflicts."
+ /usr/bin/sudo mangle_homebrew
+ /usr/bin/sudo -k
+else
+ echo -e "\n\nNot mangling homebrew as we are not running in CI"
+fi
echo -e "\n\nRunning the build setup script."
source run_conda_forge_build_setup
-if [[ ${CI} == "travis" ]]; then
- echo -en 'travis_fold:end:configure_conda\\r'
-fi
-set -e
+( endgroup "Configuring conda" ) 2> /dev/null
+
-echo -e "\n\nMaking the build clobber file and running the build."
+echo -e "\n\nMaking the build clobber file"
make_build_number ./ ./recipe ./.ci_support/${CONFIG}.yaml
-conda build ./recipe -m ./.ci_support/${CONFIG}.yaml --suppress-variables --clobber-file ./.ci_support/clobber_${CONFIG}.yaml
+
+if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]]; then
+ EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test"
+fi
+
+conda mambabuild ./recipe -m ./.ci_support/${CONFIG}.yaml --suppress-variables --clobber-file ./.ci_support/clobber_${CONFIG}.yaml ${EXTRA_CB_OPTIONS:-}
+( startgroup "Validating outputs" ) 2> /dev/null
+
validate_recipe_outputs "${FEEDSTOCK_NAME}"
-if [[ "${UPLOAD_PACKAGES}" != "False" ]]; then
- echo -e "\n\nUploading the packages."
+( endgroup "Validating outputs" ) 2> /dev/null
+
+( startgroup "Uploading packages" ) 2> /dev/null
+
+if [[ "${UPLOAD_PACKAGES}" != "False" ]] && [[ "${IS_PR_BUILD}" == "False" ]]; then
upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" ./ ./recipe ./.ci_support/${CONFIG}.yaml
-fi
\ No newline at end of file
+fi
+
+( endgroup "Uploading packages" ) 2> /dev/null
\ No newline at end of file
diff --git a/LICENSE.txt b/LICENSE.txt
index 5f302793..ed3f451e 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -1,5 +1,5 @@
BSD 3-clause license
-Copyright (c) 2015-2020, conda-forge contributors
+Copyright (c) 2015-2021, conda-forge contributors
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
diff --git a/README.md b/README.md
index 81493eb9..48d5f842 100644
--- a/README.md
+++ b/README.md
@@ -5,12 +5,10 @@ Home: http://llvm.org/
Package license: Apache-2.0 WITH LLVM-exception
-Feedstock license: BSD-3-Clause
+Feedstock license: [BSD-3-Clause](https://github.com/conda-forge/clangdev-feedstock/blob/master/LICENSE.txt)
Summary: Development headers and libraries for Clang
-
-
Current build status
====================
@@ -29,38 +27,45 @@ Current build status
| Variant | Status |
- | linux_64_target_platformlinux-64variantdefault |
+ linux_64_variantdefault |
+
+
+
+
+ |
+
+ | linux_aarch64_variantdefault |
-
+
|
- | linux_aarch64_target_platformlinux-aarch64variantdefault |
+ linux_ppc64le_variantdefault |
-
+
|
- | linux_ppc64le_target_platformlinux-ppc64levariantdefault |
+ osx_64 |
-
+
|
- | osx_64_target_platformosx-64 |
+ osx_arm64 |
-
+
|
- | win_64_target_platformwin-64 |
+ win_64 |
-
+
|
@@ -77,12 +82,15 @@ Current release info
| Name | Downloads | Version | Platforms |
| --- | --- | --- | --- |
| [](https://anaconda.org/conda-forge/clang) | [](https://anaconda.org/conda-forge/clang) | [](https://anaconda.org/conda-forge/clang) | [](https://anaconda.org/conda-forge/clang) |
+| [](https://anaconda.org/conda-forge/clang-13) | [](https://anaconda.org/conda-forge/clang-13) | [](https://anaconda.org/conda-forge/clang-13) | [](https://anaconda.org/conda-forge/clang-13) |
+| [](https://anaconda.org/conda-forge/clang-format) | [](https://anaconda.org/conda-forge/clang-format) | [](https://anaconda.org/conda-forge/clang-format) | [](https://anaconda.org/conda-forge/clang-format) |
+| [](https://anaconda.org/conda-forge/clang-format-13) | [](https://anaconda.org/conda-forge/clang-format-13) | [](https://anaconda.org/conda-forge/clang-format-13) | [](https://anaconda.org/conda-forge/clang-format-13) |
| [](https://anaconda.org/conda-forge/clang-tools) | [](https://anaconda.org/conda-forge/clang-tools) | [](https://anaconda.org/conda-forge/clang-tools) | [](https://anaconda.org/conda-forge/clang-tools) |
| [](https://anaconda.org/conda-forge/clangdev) | [](https://anaconda.org/conda-forge/clangdev) | [](https://anaconda.org/conda-forge/clangdev) | [](https://anaconda.org/conda-forge/clangdev) |
| [](https://anaconda.org/conda-forge/clangxx) | [](https://anaconda.org/conda-forge/clangxx) | [](https://anaconda.org/conda-forge/clangxx) | [](https://anaconda.org/conda-forge/clangxx) |
| [](https://anaconda.org/conda-forge/libclang) | [](https://anaconda.org/conda-forge/libclang) | [](https://anaconda.org/conda-forge/libclang) | [](https://anaconda.org/conda-forge/libclang) |
| [](https://anaconda.org/conda-forge/libclang-cpp) | [](https://anaconda.org/conda-forge/libclang-cpp) | [](https://anaconda.org/conda-forge/libclang-cpp) | [](https://anaconda.org/conda-forge/libclang-cpp) |
-| [](https://anaconda.org/conda-forge/libclang-cpp11) | [](https://anaconda.org/conda-forge/libclang-cpp11) | [](https://anaconda.org/conda-forge/libclang-cpp11) | [](https://anaconda.org/conda-forge/libclang-cpp11) |
+| [](https://anaconda.org/conda-forge/libclang-cpp13) | [](https://anaconda.org/conda-forge/libclang-cpp13) | [](https://anaconda.org/conda-forge/libclang-cpp13) | [](https://anaconda.org/conda-forge/libclang-cpp13) |
| [](https://anaconda.org/conda-forge/python-clang) | [](https://anaconda.org/conda-forge/python-clang) | [](https://anaconda.org/conda-forge/python-clang) | [](https://anaconda.org/conda-forge/python-clang) |
Installing clang_packages
@@ -92,12 +100,13 @@ Installing `clang_packages` from the `conda-forge` channel can be achieved by ad
```
conda config --add channels conda-forge
+conda config --set channel_priority strict
```
-Once the `conda-forge` channel has been enabled, `clang, clang-tools, clangdev, clangxx, libclang, libclang-cpp, libclang-cpp11, python-clang` can be installed with:
+Once the `conda-forge` channel has been enabled, `clang, clang-13, clang-format, clang-format-13, clang-tools, clangdev, clangxx, libclang, libclang-cpp, libclang-cpp13, python-clang` can be installed with:
```
-conda install clang clang-tools clangdev clangxx libclang libclang-cpp libclang-cpp11 python-clang
+conda install clang clang-13 clang-format clang-format-13 clang-tools clangdev clangxx libclang libclang-cpp libclang-cpp13 python-clang
```
It is possible to list all of the versions of `clang` available on your platform with:
@@ -110,7 +119,8 @@ conda search clang --channel conda-forge
About conda-forge
=================
-[](http://numfocus.org)
+[](https://numfocus.org)
conda-forge is a community-led conda channel of installable packages.
In order to provide high-quality builds, the process has been automated into the
@@ -162,9 +172,9 @@ build distinct package versions.
In order to produce a uniquely identifiable distribution:
* If the version of a package **is not** being increased, please add or increase
- the [``build/number``](https://conda.io/docs/user-guide/tasks/build-packages/define-metadata.html#build-number-and-string).
+ the [``build/number``](https://docs.conda.io/projects/conda-build/en/latest/resources/define-metadata.html#build-number-and-string).
* If the version of a package **is** being increased, please remember to return
- the [``build/number``](https://conda.io/docs/user-guide/tasks/build-packages/define-metadata.html#build-number-and-string)
+ the [``build/number``](https://docs.conda.io/projects/conda-build/en/latest/resources/define-metadata.html#build-number-and-string)
back to 0.
Feedstock Maintainers
@@ -172,8 +182,10 @@ Feedstock Maintainers
* [@SylvainCorlay](https://github.com/SylvainCorlay/)
* [@chrisburr](https://github.com/chrisburr/)
+* [@h-vetinari](https://github.com/h-vetinari/)
* [@inducer](https://github.com/inducer/)
* [@isuruf](https://github.com/isuruf/)
* [@jakirkham](https://github.com/jakirkham/)
* [@timsnyder](https://github.com/timsnyder/)
+* [@xhochy](https://github.com/xhochy/)
diff --git a/build-locally.py b/build-locally.py
index 8f7ecca4..8b743489 100755
--- a/build-locally.py
+++ b/build-locally.py
@@ -7,11 +7,25 @@
import glob
import subprocess
from argparse import ArgumentParser
+import platform
def setup_environment(ns):
os.environ["CONFIG"] = ns.config
os.environ["UPLOAD_PACKAGES"] = "False"
+ os.environ["IS_PR_BUILD"] = "True"
+ if ns.debug:
+ os.environ["BUILD_WITH_CONDA_DEBUG"] = "1"
+ if ns.output_id:
+ os.environ["BUILD_OUTPUT_ID"] = ns.output_id
+ if "MINIFORGE_HOME" not in os.environ:
+ os.environ["MINIFORGE_HOME"] = os.path.join(
+ os.path.dirname(__file__), "miniforge3"
+ )
+ if "OSX_SDK_DIR" not in os.environ:
+ os.environ["OSX_SDK_DIR"] = os.path.join(
+ os.path.dirname(__file__), "SDKs"
+ )
def run_docker_build(ns):
@@ -19,6 +33,11 @@ def run_docker_build(ns):
subprocess.check_call([script])
+def run_osx_build(ns):
+ script = ".scripts/run_osx_build.sh"
+ subprocess.check_call([script])
+
+
def verify_config(ns):
valid_configs = {
os.path.basename(f)[:-5] for f in glob.glob(".ci_support/*.yaml")
@@ -42,21 +61,40 @@ def verify_config(ns):
else:
raise ValueError("config " + ns.config + " is not valid")
# Remove the following, as implemented
- if not ns.config.startswith("linux"):
+ if ns.config.startswith("win"):
raise ValueError(
- f"only Linux configs currently supported, got {ns.config}"
+ f"only Linux/macOS configs currently supported, got {ns.config}"
)
+ elif ns.config.startswith("osx") and platform.system() == "Darwin":
+ if "OSX_SDK_DIR" not in os.environ:
+ raise RuntimeError(
+ "Need OSX_SDK_DIR env variable set. Run 'export OSX_SDK_DIR=/opt'"
+ "to download the SDK automatically to '/opt/MacOSX.sdk'"
+ )
def main(args=None):
p = ArgumentParser("build-locally")
p.add_argument("config", default=None, nargs="?")
+ p.add_argument(
+ "--debug",
+ action="store_true",
+ help="Setup debug environment using `conda debug`",
+ )
+ p.add_argument(
+ "--output-id", help="If running debug, specify the output to setup."
+ )
ns = p.parse_args(args=args)
verify_config(ns)
setup_environment(ns)
- run_docker_build(ns)
+ if ns.config.startswith("linux") or (
+ ns.config.startswith("osx") and platform.system() == "Linux"
+ ):
+ run_docker_build(ns)
+ elif ns.config.startswith("osx"):
+ run_osx_build(ns)
if __name__ == "__main__":
diff --git a/conda-forge.yml b/conda-forge.yml
index 67980fb9..d78342b1 100644
--- a/conda-forge.yml
+++ b/conda-forge.yml
@@ -4,4 +4,5 @@ conda_forge_output_validation: true
build_platform:
linux_ppc64le: linux_64
linux_aarch64: linux_64
+ osx_arm64: osx_64
test_on_native_only: true
diff --git a/recipe/bld.bat b/recipe/bld.bat
index 37a79765..a9563551 100644
--- a/recipe/bld.bat
+++ b/recipe/bld.bat
@@ -18,6 +18,7 @@ cmake -G "Ninja" ^
-DLLVM_INCLUDE_DOCS=OFF ^
-DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON ^
-DLLVM_ENABLE_LIBXML2=OFF ^
+ -DPython3_EXECUTABLE=%BUILD_PREFIX%\python ^
%SRC_DIR%
if errorlevel 1 exit 1
diff --git a/recipe/build.sh b/recipe/build.sh
index 7c97d46b..fea58388 100644
--- a/recipe/build.sh
+++ b/recipe/build.sh
@@ -10,9 +10,15 @@ if [[ "$variant" == "hcc" ]]; then
CMAKE_ARGS="$CMAKE_ARGS -DKALMAR_SDK_COMMIT=24e69cd8 -DKALMAR_FRONTEND_COMMIT=24e69cd8 -DKALMAR_BACKEND_COMMIT=24e69cd8"
fi
-if [[ "$CC_FOR_BUILD" != "" && "$CC_FOR_BUILD" != "$CC" ]]; then
+if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then
CMAKE_ARGS="${CMAKE_ARGS} -DLLVM_TABLEGEN_EXE=$BUILD_PREFIX/bin/llvm-tblgen -DNATIVE_LLVM_DIR=$BUILD_PREFIX/lib/cmake/llvm"
- CMAKE_ARGS="${CMAKE_ARGS} -DCROSS_TOOLCHAIN_FLAGS_NATIVE=-DCMAKE_C_COMPILER=$CC_FOR_BUILD;-DCMAKE_CXX_COMPILER=$CXX_FOR_BUILD;-DCMAKE_C_FLAGS=-O2;-DCMAKE_CXX_FLAGS=-O2;-DCMAKE_EXE_LINKER_FLAGS=;-DCMAKE_MODULE_LINKER_FLAGS=;-DCMAKE_SHARED_LINKER_FLAGS=;-DCMAKE_STATIC_LINKER_FLAGS=;"
+ CMAKE_ARGS="${CMAKE_ARGS} -DCROSS_TOOLCHAIN_FLAGS_NATIVE=-DCMAKE_C_COMPILER=$CC_FOR_BUILD;-DCMAKE_CXX_COMPILER=$CXX_FOR_BUILD;-DCMAKE_C_FLAGS=-O2;-DCMAKE_CXX_FLAGS=-O2;-DCMAKE_EXE_LINKER_FLAGS=;-DCMAKE_MODULE_LINKER_FLAGS=;-DCMAKE_SHARED_LINKER_FLAGS=;-DCMAKE_STATIC_LINKER_FLAGS=;-DZLIB_ROOT=$BUILD_PREFIX"
+else
+ rm -rf $BUILD_PREFIX/bin/llvm-tblgen
+fi
+
+if [[ "$target_platform" == osx* ]]; then
+ export CXXFLAGS="$CXXFLAGS -DTARGET_OS_OSX=1"
fi
mkdir build
@@ -29,6 +35,7 @@ cmake \
-DLLVM_INCLUDE_DOCS=OFF \
-DLLVM_ENABLE_LIBXML2=OFF \
-DCMAKE_AR=$AR \
+ -DPython3_EXECUTABLE=${BUILD_PREFIX}/bin/python \
$CMAKE_ARGS \
..
diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml
index 9861e93f..e5e085ef 100644
--- a/recipe/conda_build_config.yaml
+++ b/recipe/conda_build_config.yaml
@@ -1,24 +1,20 @@
cxx_compiler:
- clang_bootstrap # [osx]
- gxx # [linux]
- - vs2017 # [win]
c_compiler:
- clang_bootstrap # [osx]
- gcc # [linux]
- - vs2017 # [win]
-
-vc:
- - 14
-
-python:
- - 3.7
c_compiler_version: # [osx]
- - "*" # [osx]
+ - "*" # [osx and x86_64]
+ - 11 # [osx and arm64]
-cxx_compiler_version: # [osx]
- - "*" # [osx]
+cxx_compiler_version: # [osx or (linux and ppc64le)]
+ - "*" # [osx and x86_64]
+ - 11 # [osx and arm64]
+ # linking error with gcc 9
+ - 8 # [linux and ppc64le]
variant:
- default
@@ -28,5 +24,4 @@ channel_targets:
- conda-forge llvm_rc
channel_sources:
- - conda-forge/label/llvm_rc,conda-forge,defaults
-
+ - conda-forge/label/llvm_rc,conda-forge
diff --git a/recipe/install_clang.bat b/recipe/install_clang.bat
index aef932ff..d6199270 100644
--- a/recipe/install_clang.bat
+++ b/recipe/install_clang.bat
@@ -9,7 +9,8 @@ move bin bin2
mkdir bin
-move bin2\clang.exe bin\
-move bin2\clang-cl.exe bin\
-move bin2\clang-cpp.exe bin\
+setlocal enabledelayedexpansion
+for /f "tokens=1 delims=." %%a in ("%PKG_VERSION%") do (
+ move bin2\clang.exe bin\clang-%%a.exe
+)
rmdir /s /q bin2
diff --git a/recipe/install_clang.sh b/recipe/install_clang.sh
index 75e5a5b6..321590d8 100644
--- a/recipe/install_clang.sh
+++ b/recipe/install_clang.sh
@@ -12,10 +12,8 @@ rm -rf bin2
mv lib lib2
mkdir -p lib
-cp lib2/libclang-cpp.* lib/
+mv lib2/libclang-cpp.* lib/
+rm lib/libclang-cpp${SHLIB_EXT}
cp -Rf lib2/clang lib/
rm -rf lib2
-ln -s "${PREFIX}/bin/clang-${maj_version}" "${PREFIX}/bin/clang-cl"
-ln -s "${PREFIX}/bin/clang-${maj_version}" "${PREFIX}/bin/clang-cpp"
-ln -s "${PREFIX}/bin/clang-${maj_version}" "${PREFIX}/bin/clang"
diff --git a/recipe/install_clang_format.bat b/recipe/install_clang_format.bat
new file mode 100644
index 00000000..918bffd1
--- /dev/null
+++ b/recipe/install_clang_format.bat
@@ -0,0 +1,9 @@
+cd %SRC_DIR%\build
+ninja install
+cd %LIBRARY_PREFIX%
+rmdir /s /q lib libexec share include
+
+move bin bin2
+mkdir bin
+move bin2\clang-format.exe bin\clang-format.exe
+rmdir /s /q bin2
diff --git a/recipe/install_clang_format.sh b/recipe/install_clang_format.sh
new file mode 100644
index 00000000..f1a489a1
--- /dev/null
+++ b/recipe/install_clang_format.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+set -x -e
+cd ${SRC_DIR}/build
+make install
+cd $PREFIX
+rm -rf lib/cmake include lib/lib*.a libexec share
+MAJOR_VERSION=$(echo ${PKG_VERSION} | cut -f1 -d".")
+mv bin bin2
+mkdir -p bin
+cp bin2/clang-format bin/clang-format-${MAJOR_VERSION}
+rm -rf bin2
+if [[ "$PKG_NAME" == "clang-format" ]]; then
+ ln -sf $PREFIX/bin/clang-format-${MAJOR_VERSION} $PREFIX/bin/clang-format
+fi
diff --git a/recipe/install_clang_symlinks.bat b/recipe/install_clang_symlinks.bat
new file mode 100644
index 00000000..eaf86c2f
--- /dev/null
+++ b/recipe/install_clang_symlinks.bat
@@ -0,0 +1,7 @@
+cd %LIBRARY_BIN%
+setlocal enabledelayedexpansion
+for /f "tokens=1 delims=." %%a in ("%PKG_VERSION%") do (
+ copy clang-%%a.exe clang.exe
+ copy clang-%%a.exe clang-cl.exe
+ copy clang-%%a.exe clang-cpp.exe
+)
diff --git a/recipe/install_clang_symlinks.sh b/recipe/install_clang_symlinks.sh
new file mode 100644
index 00000000..cd083585
--- /dev/null
+++ b/recipe/install_clang_symlinks.sh
@@ -0,0 +1,4 @@
+maj_version="${PKG_VERSION%%.*}"
+ln -s "${PREFIX}/bin/clang-${maj_version}" "${PREFIX}/bin/clang-cl"
+ln -s "${PREFIX}/bin/clang-${maj_version}" "${PREFIX}/bin/clang-cpp"
+ln -s "${PREFIX}/bin/clang-${maj_version}" "${PREFIX}/bin/clang"
diff --git a/recipe/install_clang_tools.sh b/recipe/install_clang_tools.sh
index 3cc4af09..c1c4ed5e 100644
--- a/recipe/install_clang_tools.sh
+++ b/recipe/install_clang_tools.sh
@@ -4,3 +4,15 @@ cd ${SRC_DIR}/build
make install
cd $PREFIX
rm -rf lib/cmake include lib/lib*.a
+MAJOR_VERSION=$(echo ${PKG_VERSION} | cut -f1 -d".")
+for f in ${PREFIX}/bin/clang-*; do
+ if [[ "$(basename $f)" == clang-format-* ]]; then
+ continue
+ fi
+ rm -f ${PREFIX}/bin/$(basename $f)-${MAJOR_VERSION}
+ mv $f ${PREFIX}/bin/$(basename $f)-${MAJOR_VERSION};
+ ln -s ${PREFIX}/bin/$(basename $f)-${MAJOR_VERSION} $f;
+done
+rm ${PREFIX}/bin/clang-${MAJOR_VERSION}-${MAJOR_VERSION}
+rm ${PREFIX}/bin/clang-cpp-${MAJOR_VERSION}
+rm ${PREFIX}/bin/clang-cl-${MAJOR_VERSION}
diff --git a/recipe/install_clangxx.bat b/recipe/install_clangxx.bat
index eebb1655..71ced5cf 100644
--- a/recipe/install_clangxx.bat
+++ b/recipe/install_clangxx.bat
@@ -1,2 +1,5 @@
cd %LIBRARY_BIN%
-ren clang.exe clang++.exe
+setlocal enabledelayedexpansion
+for /f "tokens=1 delims=." %%a in ("%PKG_VERSION%") do (
+ copy clang-%%a.exe "clang++.exe"
+)
diff --git a/recipe/install_clangxx.sh b/recipe/install_clangxx.sh
index e4b10217..6ffa2949 100644
--- a/recipe/install_clangxx.sh
+++ b/recipe/install_clangxx.sh
@@ -1,6 +1,7 @@
#!/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
diff --git a/recipe/install_libclang.sh b/recipe/install_libclang.sh
index 3411f796..4689d593 100644
--- a/recipe/install_libclang.sh
+++ b/recipe/install_libclang.sh
@@ -7,6 +7,6 @@ cd $PREFIX
rm -rf libexec share bin include
mv lib lib2
mkdir lib
-cp lib2/${PKG_NAME}.* lib/
+mv lib2/${PKG_NAME}.* lib/
rm -rf lib2
diff --git a/recipe/install_libclang_cpp.sh b/recipe/install_libclang_cpp.sh
index a6d0f3c7..73e48a7f 100644
--- a/recipe/install_libclang_cpp.sh
+++ b/recipe/install_libclang_cpp.sh
@@ -1,16 +1,16 @@
#!/bin/bash
set -x -e
cd ${SRC_DIR}/build
-make install
+make install VERBOSE=1
cd $PREFIX
rm -rf libexec share bin include
mv lib lib2
mkdir lib
if [[ "$PKG_NAME" == "libclang-cpp" ]]; then
- cp lib2/${PKG_NAME}${SHLIB_EXT} lib/
+ mv lib2/${PKG_NAME}${SHLIB_EXT} lib/
else
- cp lib2/libclang-cpp.*.* lib/
+ mv lib2/libclang-cpp.*.* lib/
fi
rm -rf lib2
diff --git a/recipe/meta.yaml b/recipe/meta.yaml
index 3582e2e4..193df8e7 100644
--- a/recipe/meta.yaml
+++ b/recipe/meta.yaml
@@ -1,26 +1,35 @@
-{% set version = "11.0.0.rc1" %}
+{% set version = "13.0.1.rc1" %}
{% set major_version = version.split(".")[0] %}
{% set build_number = 0 %}
+{% set minor_aware_ext = major_version %}
+{% set minor_int = version.split(".")[1] | int %}
+{% if minor_int > 0 %}
+{% set minor_aware_ext = major_version + "." + version.split(".")[1] %}
+{% endif %}
+
package:
name: clang_packages
version: {{ version }}
source:
- url: https://github.com/llvm/llvm-project/releases/download/llvmorg-{{ version.replace(".rc", "-rc") }}/clang-{{ version.replace(".rc", "rc") }}.src.tar.xz
- sha256: 0eacdc50fdeef33472c864998723779059cfd81154e539f6fbe34cd681edcf49
+ sha256: c8359a51f702e22dc43eebbd5bb8b32f524ae95ce196ed62c524a0a3e6d4fd4d
patches:
- patches/0001-Find-conda-gcc-installation.patch
- patches/0002-Fix-sysroot-detection-for-linux.patch
- - patches/0002-clang-add-conda-specific-env-var-CONDA_BUILD_SYSROOT.patch
- - patches/0003-clang-Fix-normalizeProgramName-s-handling-of-dots-ou.patch
- - patches/0001-Set-VERSION-in-osx-as-well.patch
- - patches/cross-compile.diff
+ - patches/0003-clang-add-conda-specific-env-var-CONDA_BUILD_SYSROOT.patch
+ - patches/0004-Fix-normalizeProgramName-s-handling-of-dots-outside-.patch
+ - patches/0005-Set-VERSION-in-osx-as-well.patch
+ - patches/0006-Fix-crosscompiling-LLVM-tools.patch
+ # Disable -Werror,-Wundef-prefix=TARGET_OS as they are not yet defined in the 10.9 SDK used for osx-64
+ # Only enable it for TARGET_OS_OSX.
+ - patches/0007-Only-error-on-undefined-TARGET_OS_OSX.patch # [osx and x86_64]
#- patches/amd-roc-2.7.0.diff # [variant != "hcc"]
#- patches/amd-roc-hcc-2.7.0.diff # [variant == "hcc"]
folder: .
- url: https://github.com/llvm/llvm-project/releases/download/llvmorg-{{ version.replace(".rc", "-rc") }}/clang-tools-extra-{{ version.replace(".rc", "rc") }}.src.tar.xz
- sha256: 001fc3dc7ae1459a661901609cdb40872f155458fe70cf7984b2c74155ab44c9
+ sha256: f04f8713734f2e1cd80a0060336296cf1aa841552a1ca7f958dbfcb897dd8eb4
folder: tools/extra
build:
@@ -42,6 +51,7 @@ requirements:
host:
- libcxx {{ cxx_compiler_version }} # [osx]
- llvmdev =={{ version }}
+ - zlib # [linux]
test:
requires:
@@ -85,6 +95,7 @@ outputs:
- {{ pin_subpackage("libclang-cpp", exact=True) }}
- libcxx {{ cxx_compiler_version }} # [osx]
- llvmdev =={{ version }}
+ - zlib # [linux]
run:
- {{ pin_subpackage("clang", exact=True) }}
- {{ pin_subpackage("clangxx", exact=True) }}
@@ -100,14 +111,14 @@ outputs:
- if not exist %LIBRARY_INC%\\clang/Config/config.h exit 1 # [win]
- if not exist %LIBRARY_LIB%\\clangAST.lib exit 1 # [win]
- - name: libclang-cpp{{ major_version }}
+ - name: libclang-cpp{{ minor_aware_ext }}
script: install_libclang_cpp.sh # [unix]
build:
track_features:
- hcc # [variant=="hcc"]
string: {{ variant }}_h{{ PKG_HASH }}_{{ build_number }}
run_exports:
- - {{ pin_subpackage("libclang-cpp" + major_version, max_pin="x.x") }} # [unix]
+ - {{ pin_subpackage("libclang-cpp" + minor_aware_ext, max_pin="x.x") }} # [unix]
skip: true # [win]
requirements:
build:
@@ -120,14 +131,15 @@ outputs:
- libcxx {{ cxx_compiler_version }} # [osx]
- llvmdev =={{ version }}
- llvm =={{ version }}
+ - zlib # [linux]
run:
- {{ pin_compatible("libcxx", max_pin=None) }} # [osx]
test:
commands:
- - test ! -f "$PREFIX/lib/libclang-cpp.so" # [linux]
- - test -f "$PREFIX/lib/libclang-cpp.so.{{ major_version }}" # [linux]
- - test ! -f "$PREFIX/lib/libclang-cpp.dylib" # [osx]
- - test -f "$PREFIX/lib/libclang-cpp.{{ major_version }}.dylib" # [osx]
+ - test ! -f "$PREFIX/lib/libclang-cpp.so" # [linux]
+ - test -f "$PREFIX/lib/libclang-cpp.so.{{ minor_aware_ext }}" # [linux]
+ - test ! -f "$PREFIX/lib/libclang-cpp.dylib" # [osx]
+ - test -f "$PREFIX/lib/libclang-cpp.{{ minor_aware_ext }}.dylib" # [osx]
- name: libclang-cpp
script: install_libclang_cpp.sh # [unix]
@@ -137,7 +149,7 @@ outputs:
string: {{ variant }}_h{{ PKG_HASH }}_{{ build_number }}
{% if not win %}
run_exports: # [unix]
- - {{ pin_subpackage("libclang-cpp" + major_version, max_pin="x.x") }} # [unix]
+ - {{ pin_subpackage("libclang-cpp" + minor_aware_ext, max_pin="x.x") }} # [unix]
{% endif %}
requirements:
build:
@@ -150,10 +162,11 @@ outputs:
- libcxx {{ cxx_compiler_version }} # [osx]
- llvmdev =={{ version }}
- llvm =={{ version }}
- - {{ pin_subpackage("libclang-cpp" + major_version, exact=True) }} # [unix]
+ - zlib # [linux]
+ - {{ pin_subpackage("libclang-cpp" + minor_aware_ext, exact=True) }} # [unix]
run:
- {{ pin_compatible("libcxx", max_pin=None) }} # [osx]
- - {{ pin_subpackage("libclang-cpp" + major_version, exact=True) }} # [unix]
+ - {{ pin_subpackage("libclang-cpp" + minor_aware_ext, exact=True) }} # [unix]
test:
commands:
- test -f "$PREFIX/lib/libclang-cpp.so" # [linux]
@@ -167,28 +180,36 @@ outputs:
track_features:
- hcc # [variant=="hcc"]
string: {{ variant }}_h{{ PKG_HASH }}_{{ build_number }}
+ run_exports:
+ - libclang {{ minor_aware_ext }}.*
requirements:
build:
- {{ compiler('cxx') }}
- cmake >=3.4.3
- - ninja # [win]
- - make # [unix]
+ - ninja # [win]
+ - make # [unix]
- llvmdev =={{ version }} # [build_platform != target_platform]
host:
- - libcxx {{ cxx_compiler_version }} # [osx]
+ - libcxx {{ cxx_compiler_version }} # [osx]
- llvmdev =={{ version }}
- llvm =={{ version }}
+ - zlib # [linux or win]
- {{ pin_subpackage("clang", exact=True) }}
run:
- {{ pin_compatible("libcxx", max_pin=None) }} # [osx]
test:
commands:
- - test -f "$PREFIX/lib/libclang.so" # [linux]
- - test -f "$PREFIX/lib/libclang.so.{{ major_version }}" # [linux]
- - test -f "$PREFIX/lib/libclang.dylib" # [osx]
- - if not exist %LIBRARY_BIN%\\libclang.dll exit 1 # [win]
+ - test -f "$PREFIX/lib/libclang.so" # [linux]
+ - test -f "$PREFIX/lib/libclang.so.{{ minor_aware_ext }}" # [linux]
+ {% if minor_aware_ext != major_version %}
+ - test ! -f "$PREFIX/lib/libclang.so.{{ major_version }}" # [linux]
+ - test ! -f "$PREFIX/lib/libclang.{{ major_version }}.dylib" # [osx]
+ {% endif %}
+ - test -f "$PREFIX/lib/libclang.dylib" # [osx]
+ - test -f "$PREFIX/lib/libclang.{{ minor_aware_ext }}.dylib" # [osx]
+ - if not exist %LIBRARY_BIN%\\libclang.dll exit 1 # [win]
- - name: clang
+ - name: clang-{{ major_version }}
script: install_clang.sh # [unix]
script: install_clang.bat # [win]
build:
@@ -198,37 +219,58 @@ outputs:
requirements:
build:
- {{ compiler('cxx') }}
- - libcxx # [osx]
+ - libcxx # [osx]
- cmake >=3.4.3
- - ninja # [win]
- - make # [unix]
- - llvmdev =={{ version }} # [build_platform != target_platform]
+ - ninja # [win]
+ - make # [unix]
+ - llvmdev =={{ version }} # [build_platform != target_platform]
host:
- libcxx {{ cxx_compiler_version }} # [osx]
- llvmdev =={{ version }}
- llvm =={{ version }}
- - {{ pin_compatible("libclang-cpp" + major_version, exact=True) }} # [unix]
+ - zlib # [linux or win]
+ - {{ pin_compatible("libclang-cpp" + minor_aware_ext, exact=True) }} # [unix]
run:
- - {{ pin_compatible("libcxx", max_pin=None) }} # [osx]
- - {{ pin_compatible("libclang-cpp" + major_version, exact=True) }} # [unix]
+ - {{ pin_compatible("libcxx", max_pin=None) }} # [osx]
+ - {{ pin_compatible("libclang-cpp" + minor_aware_ext, exact=True) }} # [unix]
run_constrained:
- clangdev {{ version }}
- clangxx {{ version }}
- clang-tools {{ version }}
- llvm-tools {{ version }}
+ test:
+ commands:
+ - clang-{{ major_version }} --version
+ - test ! -f "$PREFIX/bin/clang" # [unix]
+ - test ! -f "$PREFIX/bin/clang-cl" # [unix]
+ - test ! -f "$PREFIX/bin/clang-cpp" # [unix]
+ - if exist %LIBRARY_BIN%\\clang.exe exit 1 # [win]
+ - if exist %LIBRARY_BIN%\\clang-cl.exe exit 1 # [win]
+ - if exist %LIBRARY_BIN%\\clang-cpp.exe exit 1 # [win]
+ - test ! -f "$PREFIX/lib/libclang-cpp.so" # [linux]
+ - test -f "$PREFIX/lib/libclang-cpp.so.{{ minor_aware_ext }}" # [linux]
+ - test ! -f "$PREFIX/lib/libclang-cpp.dylib" # [osx]
+ - test -f "$PREFIX/lib/libclang-cpp.{{ minor_aware_ext }}.dylib" # [osx]
+ - test -f "$PREFIX/lib/clang/{{ '.'.join(version.split('.')[:3]) }}/include/stdatomic.h" # [unix]
+ - if not exist %LIBRARY_LIB%\\clang\\{{ '.'.join(version.split('.')[:3]) }}\\include\\stdatomic.h exit 1 # [win]
+
+ - name: clang
+ script: install_clang_symlinks.sh # [unix]
+ script: install_clang_symlinks.bat # [win]
+ requirements:
+ host:
+ - zlib # [win]
+ - gcc_impl_{{ target_platform }} # [linux]
+ - {{ pin_subpackage("clang-" ~ major_version, exact=True) }}
+ run:
+ - gcc_impl_{{ target_platform }} # [linux]
+ - {{ pin_subpackage("clang-" ~ major_version, exact=True) }}
test:
commands:
- clang --version
- clang-cl --version
- clang-cpp --version
- - clang-{{ major_version }} --version # [unix]
- - test -f "$PREFIX/lib/libclang-cpp.so" # [linux]
- - test -f "$PREFIX/lib/libclang-cpp.so.{{ major_version }}" # [linux]
- - test -f "$PREFIX/lib/libclang-cpp.dylib" # [osx]
- - test -f "$PREFIX/lib/clang/{{ '.'.join(version.split('.')[:3]) }}/include/stdatomic.h" # [unix]
- - if not exist %LIBRARY_LIB%\\clang\\{{ '.'.join(version.split('.')[:3]) }}\\include\\stdatomic.h exit 1 # [win]
- # Defaults provides this, so let's do the same in conda-forge
- name: clangxx
script: install_clangxx.sh # [unix]
script: install_clangxx.bat # [win]
@@ -238,6 +280,7 @@ outputs:
string: {{ variant }}_h{{ PKG_HASH }}_{{ build_number }}
requirements:
host:
+ - zlib # [win]
- {{ pin_subpackage("clang", exact=True) }}
run:
- {{ pin_subpackage("clang", exact=True) }}
@@ -250,6 +293,81 @@ outputs:
- clang++ --version
- clang++ -v -c mytest.cxx
+ - name: clang-format-{{ major_version }}
+ script: install_clang_format.sh # [unix]
+ script: install_clang_format.bat # [win]
+ build:
+ track_features:
+ - hcc # [variant=="hcc"]
+ string: {{ variant }}_h{{ PKG_HASH }}_{{ build_number }}
+ # for windows, use the clang-format package.
+ skip: true # [win]
+ requirements:
+ build:
+ # "compiling .pyc files" fails without this
+ - python >3
+ - {{ compiler('cxx') }}
+ - cmake >=3.4.3
+ - ninja # [win]
+ - make # [unix]
+ - llvmdev =={{ version }} # [build_platform != target_platform]
+ host:
+ - {{ pin_subpackage("clang", exact=True) }}
+ - {{ pin_subpackage("clangxx", exact=True) }}
+ - {{ pin_subpackage("libclang", exact=True) }}
+ - {{ pin_subpackage("libclang-cpp", exact=True) }}
+ - libcxx {{ cxx_compiler_version }} # [osx]
+ - llvmdev =={{ version }}
+ - llvm =={{ version }}
+ - zlib # [linux or win]
+ - libxml2 # [win]
+ run:
+ - {{ pin_compatible("libcxx", max_pin=None) }} # [osx]
+ - {{ pin_subpackage("libclang-cpp" + minor_aware_ext, max_pin="x.x") }} # [unix]
+ test:
+ commands:
+ - clang-format-{{ major_version }} --version
+ - test ! -f ${PREFIX}/bin/clang-format # [unix]
+ - if exist %LIBRARY_BIN%\\clang-format.exe exit 1 # [win]
+ - test ! -f ${PREFIX}/bin/c-index-test # [unix]
+ - if exist %LIBRARY_BIN%\\c-index-test.exe exit 1 # [win]
+
+ - name: clang-format
+ script: install_clang_format.sh # [unix]
+ script: install_clang_format.bat # [win]
+ build:
+ track_features:
+ - hcc # [variant=="hcc"]
+ string: {{ variant }}_h{{ PKG_HASH }}_{{ build_number }}
+ requirements:
+ build:
+ # "compiling .pyc files" fails without this
+ - python >3
+ - {{ compiler('cxx') }}
+ - cmake >=3.4.3
+ - ninja # [win]
+ - make # [unix]
+ - llvmdev =={{ version }} # [build_platform != target_platform]
+ host:
+ - {{ pin_subpackage("clang", exact=True) }}
+ - {{ pin_subpackage("clangxx", exact=True) }}
+ - {{ pin_subpackage("libclang", exact=True) }}
+ - {{ pin_subpackage("libclang-cpp", exact=True) }}
+ - {{ pin_subpackage("clang-format-" + major_version, exact=True) }} # [unix]
+ - libcxx {{ cxx_compiler_version }} # [osx]
+ - llvmdev =={{ version }}
+ - llvm =={{ version }}
+ - zlib # [linux or win]
+ run:
+ - {{ pin_compatible("libcxx", max_pin=None) }} # [osx]
+ - {{ pin_subpackage("libclang-cpp" + minor_aware_ext, max_pin="x.x") }} # [unix]
+ - {{ pin_subpackage("clang-format-" + major_version, exact=True) }} # [unix]
+ test:
+ commands:
+ - clang-format --version
+ - test ! -f ${PREFIX}/bin/c-index-test # [unix]
+ - if exist %LIBRARY_BIN%\\c-index-test.exe exit 1 # [win]
+
- name: clang-tools
script: install_clang_tools.sh # [unix]
script: install_clang_tools.bat # [win]
@@ -270,13 +388,17 @@ outputs:
- {{ pin_subpackage("clang", exact=True) }}
- {{ pin_subpackage("clangxx", exact=True) }}
- {{ pin_subpackage("libclang", exact=True) }}
+ - {{ pin_subpackage("libclang-cpp", exact=True) }}
+ - {{ pin_subpackage("clang-format", exact=True) }}
- libcxx {{ cxx_compiler_version }} # [osx]
- llvmdev =={{ version }}
- llvm =={{ version }}
+ - zlib # [linux or win]
run:
- - {{ pin_subpackage("clang", exact=True) }}
- - {{ pin_subpackage("clangxx", exact=True) }}
- {{ pin_compatible("libcxx", max_pin=None) }} # [osx]
+ - {{ pin_subpackage("clang-format", exact=True) }}
+ - {{ pin_subpackage("libclang-cpp" + minor_aware_ext, max_pin="x.x") }} # [unix]
+ - libclang {{ minor_aware_ext }}.* # [unix]
run_constrained:
- clangdev {{ version }}
test:
@@ -301,8 +423,6 @@ outputs:
- python
- libclang =={{ version }}
test:
- requires:
- - nose
source_files:
- bindings/python/tests
- bindings/python/examples/cindex
@@ -311,8 +431,7 @@ outputs:
- clang.cindex
commands:
- cd bindings/python
- - cp tests/cindex/util.py tests
- - nosetests -v
+ - python -m unittest discover -v
about:
home: http://llvm.org/
@@ -329,3 +448,5 @@ extra:
- SylvainCorlay
- timsnyder
- chrisburr
+ - xhochy
+ - h-vetinari
diff --git a/recipe/patches/0001-Find-conda-gcc-installation.patch b/recipe/patches/0001-Find-conda-gcc-installation.patch
index 763c06d0..dafc4893 100644
--- a/recipe/patches/0001-Find-conda-gcc-installation.patch
+++ b/recipe/patches/0001-Find-conda-gcc-installation.patch
@@ -1,17 +1,17 @@
-From e7a1fd56465717f1b8db4985fb88f6990aa567c2 Mon Sep 17 00:00:00 2001
+From 240f51e12e33cc47f36e8748571f1474b48fc2d5 Mon Sep 17 00:00:00 2001
From: Isuru Fernando
Date: Mon, 8 Apr 2019 16:20:03 -0500
-Subject: [PATCH 1/2] Find conda gcc installation
+Subject: [PATCH 1/7] Find conda gcc installation
---
lib/Driver/ToolChains/Gnu.cpp | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp
-index 2ad45097..1ad905a4 100644
+index da39f29e4619..a3efb8f88fa7 100644
--- a/lib/Driver/ToolChains/Gnu.cpp
+++ b/lib/Driver/ToolChains/Gnu.cpp
-@@ -1871,7 +1871,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
+@@ -2077,7 +2077,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
static const char *const AArch64LibDirs[] = {"/lib64", "/lib"};
static const char *const AArch64Triples[] = {
"aarch64-none-linux-gnu", "aarch64-linux-gnu", "aarch64-redhat-linux",
@@ -20,25 +20,25 @@ index 2ad45097..1ad905a4 100644
static const char *const AArch64beLibDirs[] = {"/lib"};
static const char *const AArch64beTriples[] = {"aarch64_be-none-linux-gnu",
"aarch64_be-linux-gnu"};
-@@ -1896,7 +1896,8 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
+@@ -2105,7 +2105,8 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
"x86_64-redhat-linux", "x86_64-suse-linux",
"x86_64-manbo-linux-gnu", "x86_64-linux-gnu",
"x86_64-slackware-linux", "x86_64-unknown-linux",
- "x86_64-amazon-linux", "x86_64-linux-android"};
+ "x86_64-amazon-linux", "x86_64-linux-android",
+ "x86_64-conda_cos6-linux-gnu", "x86_64-conda_cos7-linux-gnu", "x86_64-conda-linux-gnu"};
- static const char *const X32LibDirs[] = {"/libx32"};
- static const char *const X86LibDirs[] = {"/lib32", "/lib"};
- static const char *const X86Triples[] = {
-@@ -1949,7 +1950,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
- static const char *const PPC64LELibDirs[] = {"/lib64", "/lib"};
+ static const char *const X32Triples[] = {"x86_64-linux-gnux32",
+ "x86_64-pc-linux-gnux32"};
+ static const char *const X32LibDirs[] = {"/libx32", "/lib"};
+@@ -2172,7 +2173,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
static const char *const PPC64LETriples[] = {
"powerpc64le-linux-gnu", "powerpc64le-unknown-linux-gnu",
-- "powerpc64le-suse-linux", "ppc64le-redhat-linux"};
-+ "powerpc64le-suse-linux", "ppc64le-redhat-linux", "powerpc64le-conda_cos7-linux-gnu", "powerpc64le-conda-linux-gnu"};
+ "powerpc64le-none-linux-gnu", "powerpc64le-suse-linux",
+- "ppc64le-redhat-linux"};
++ "ppc64le-redhat-linux", "powerpc64le-conda_cos7-linux-gnu", "powerpc64le-conda-linux-gnu"};
- static const char *const RISCV32LibDirs[] = {"/lib", "/lib32"};
- static const char *const RISCVTriples[] = {"riscv32-unknown-linux-gnu",
+ static const char *const RISCV32LibDirs[] = {"/lib32", "/lib"};
+ static const char *const RISCV32Triples[] = {"riscv32-unknown-linux-gnu",
--
-2.17.1
+2.32.0.windows.2
diff --git a/recipe/patches/0002-Fix-sysroot-detection-for-linux.patch b/recipe/patches/0002-Fix-sysroot-detection-for-linux.patch
index e336b67b..6566ffb1 100644
--- a/recipe/patches/0002-Fix-sysroot-detection-for-linux.patch
+++ b/recipe/patches/0002-Fix-sysroot-detection-for-linux.patch
@@ -1,17 +1,17 @@
-From 662d7b8e96468596a67e4b8e917b5f776e1e745f Mon Sep 17 00:00:00 2001
+From 1bc8fe7d1b8f9a6f9598bad73b349a05ec7a10b7 Mon Sep 17 00:00:00 2001
From: Isuru Fernando
Date: Mon, 8 Apr 2019 16:32:17 -0500
-Subject: [PATCH 2/2] Fix sysroot detection for linux
+Subject: [PATCH 2/7] Fix sysroot detection for linux
---
lib/Driver/ToolChains/Linux.cpp | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/lib/Driver/ToolChains/Linux.cpp b/lib/Driver/ToolChains/Linux.cpp
-index 65ab9b2d..77e7b178 100644
+index c9360fc67165..5a1a373e03b3 100644
--- a/lib/Driver/ToolChains/Linux.cpp
+++ b/lib/Driver/ToolChains/Linux.cpp
-@@ -478,7 +478,7 @@ std::string Linux::computeSysRoot() const {
+@@ -347,7 +347,7 @@ std::string Linux::computeSysRoot() const {
return AndroidSysRootPath;
}
@@ -20,7 +20,7 @@ index 65ab9b2d..77e7b178 100644
return std::string();
// Standalone MIPS toolchains use different names for sysroot folder
-@@ -496,6 +496,14 @@ std::string Linux::computeSysRoot() const {
+@@ -365,6 +365,14 @@ std::string Linux::computeSysRoot() const {
if (getVFS().exists(Path))
return Path;
@@ -36,5 +36,5 @@ index 65ab9b2d..77e7b178 100644
if (getVFS().exists(Path))
--
-2.17.1
+2.32.0.windows.2
diff --git a/recipe/patches/0002-clang-add-conda-specific-env-var-CONDA_BUILD_SYSROOT.patch b/recipe/patches/0003-clang-add-conda-specific-env-var-CONDA_BUILD_SYSROOT.patch
similarity index 78%
rename from recipe/patches/0002-clang-add-conda-specific-env-var-CONDA_BUILD_SYSROOT.patch
rename to recipe/patches/0003-clang-add-conda-specific-env-var-CONDA_BUILD_SYSROOT.patch
index 3815b83a..d26dba7a 100644
--- a/recipe/patches/0002-clang-add-conda-specific-env-var-CONDA_BUILD_SYSROOT.patch
+++ b/recipe/patches/0003-clang-add-conda-specific-env-var-CONDA_BUILD_SYSROOT.patch
@@ -1,7 +1,7 @@
-From 7565075efc6ba701dc5a6d0ba7667658dac5d3d9 Mon Sep 17 00:00:00 2001
+From c4c6e21033e9f48cceb0c428a7262d18de2b9c28 Mon Sep 17 00:00:00 2001
From: Nehal J Wani
Date: Sat, 25 Aug 2018 09:20:04 -0500
-Subject: [PATCH 2/3] clang: add conda specific env var CONDA_BUILD_SYSROOT
+Subject: [PATCH 3/7] clang: add conda specific env var CONDA_BUILD_SYSROOT
---
lib/Driver/Driver.cpp | 9 +++++++--
@@ -9,12 +9,12 @@ Subject: [PATCH 2/3] clang: add conda specific env var CONDA_BUILD_SYSROOT
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
-index 952a716..67e4917 100644
+index 94a7553e273b..5b9261e990b2 100644
--- a/lib/Driver/Driver.cpp
+++ b/lib/Driver/Driver.cpp
-@@ -971,8 +971,13 @@ Compilation *Driver::BuildCompilation(ArrayRef ArgList) {
- A->claim();
- PrefixDirs.push_back(A->getValue(0));
+@@ -1152,8 +1152,13 @@ Compilation *Driver::BuildCompilation(ArrayRef ArgList) {
+ CompilerPath = Split.second;
+ }
}
- if (const Arg *A = Args.getLastArg(options::OPT__sysroot_EQ))
- SysRoot = A->getValue();
@@ -29,10 +29,10 @@ index 952a716..67e4917 100644
DyldPrefix = A->getValue();
diff --git a/lib/Frontend/InitHeaderSearch.cpp b/lib/Frontend/InitHeaderSearch.cpp
-index 8a70404..b1c5f55 100644
+index ba9f96384f81..a3ed9d818976 100644
--- a/lib/Frontend/InitHeaderSearch.cpp
+++ b/lib/Frontend/InitHeaderSearch.cpp
-@@ -27,6 +27,7 @@
+@@ -26,6 +26,7 @@
#include "llvm/ADT/Twine.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Path.h"
@@ -40,7 +40,7 @@ index 8a70404..b1c5f55 100644
#include "llvm/Support/raw_ostream.h"
using namespace clang;
-@@ -228,7 +229,10 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple,
+@@ -240,7 +241,10 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple,
LLVM_FALLTHROUGH;
default:
// FIXME: temporary hack: hard-coded paths.
@@ -53,5 +53,5 @@ index 8a70404..b1c5f55 100644
}
}
--
-2.5.4 (Apple Git-61)
+2.32.0.windows.2
diff --git a/recipe/patches/0003-clang-Fix-normalizeProgramName-s-handling-of-dots-ou.patch b/recipe/patches/0004-Fix-normalizeProgramName-s-handling-of-dots-outside-.patch
similarity index 90%
rename from recipe/patches/0003-clang-Fix-normalizeProgramName-s-handling-of-dots-ou.patch
rename to recipe/patches/0004-Fix-normalizeProgramName-s-handling-of-dots-outside-.patch
index df449f57..ddc98949 100644
--- a/recipe/patches/0003-clang-Fix-normalizeProgramName-s-handling-of-dots-ou.patch
+++ b/recipe/patches/0004-Fix-normalizeProgramName-s-handling-of-dots-outside-.patch
@@ -1,7 +1,7 @@
-From 810992794396fbd34349bf1dac9a9fe38a4d5020 Mon Sep 17 00:00:00 2001
+From 31d103bb665332fbc7eaa94ff419eac866444429 Mon Sep 17 00:00:00 2001
From: Ray Donnelly
Date: Wed, 30 Aug 2017 20:01:49 +0100
-Subject: [PATCH 3/3] Fix normalizeProgramName()'s handling of dots outside of
+Subject: [PATCH 4/7] Fix normalizeProgramName()'s handling of dots outside of
.exe
It used to strip everything after the last dot, turning:
@@ -18,7 +18,7 @@ x86_64-apple-darwin13.4
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/lib/Driver/ToolChain.cpp b/lib/Driver/ToolChain.cpp
-index b8c12fc9..e6eb95fa 100644
+index 6c1b88141c45..369955206817 100644
--- a/lib/Driver/ToolChain.cpp
+++ b/lib/Driver/ToolChain.cpp
@@ -50,6 +50,7 @@ using namespace driver;
@@ -40,7 +40,7 @@ index b8c12fc9..e6eb95fa 100644
+StringRef program_name_stem(StringRef path) {
+ StringRef fname = llvm::sys::path::filename(path);
+ size_t pos = StringRef::npos;
-+ if (fname.endswith_lower(".exe")) {
++ if (fname.endswith_insensitive(".exe")) {
+ pos = fname.find_last_of('.');
+ }
+ if (pos == StringRef::npos)
@@ -61,3 +61,6 @@ index b8c12fc9..e6eb95fa 100644
#ifdef _WIN32
// Transform to lowercase for case insensitive file systems.
std::transform(ProgName.begin(), ProgName.end(), ProgName.begin(), ::tolower);
+--
+2.32.0.windows.2
+
diff --git a/recipe/patches/0001-Set-VERSION-in-osx-as-well.patch b/recipe/patches/0005-Set-VERSION-in-osx-as-well.patch
similarity index 61%
rename from recipe/patches/0001-Set-VERSION-in-osx-as-well.patch
rename to recipe/patches/0005-Set-VERSION-in-osx-as-well.patch
index 34060fd7..0e9c7709 100644
--- a/recipe/patches/0001-Set-VERSION-in-osx-as-well.patch
+++ b/recipe/patches/0005-Set-VERSION-in-osx-as-well.patch
@@ -1,27 +1,28 @@
-From f3a88106a4178516c4cfc89b4b98b23ecdebb73a Mon Sep 17 00:00:00 2001
+From 4afac3fc2fd07bc125ebc94ef85fa0f13d4a0b57 Mon Sep 17 00:00:00 2001
From: Isuru Fernando
Date: Sat, 27 Jul 2019 11:55:23 -0500
-Subject: [PATCH] Set VERSION in osx as well
+Subject: [PATCH 5/7] Set VERSION in osx as well
---
- tools/libclang/CMakeLists.txt | 4 ++++
- 1 file changed, 4 insertions(+)
+ tools/libCMakeLists.txt | 5 +++++
+ 1 file changed, 5 insertions(+)
diff --git a/tools/libclang/CMakeLists.txt b/tools/libclang/CMakeLists.txt
-index 32333b01..6d5f3290 100644
+index bf88dca0a34b..199513142708 100644
--- a/tools/libclang/CMakeLists.txt
+++ b/tools/libclang/CMakeLists.txt
-@@ -114,6 +114,10 @@ if(ENABLE_SHARED)
+@@ -154,6 +154,11 @@ if(ENABLE_SHARED)
set_property(TARGET libclang APPEND_STRING PROPERTY
LINK_FLAGS ${LIBCLANG_LINK_FLAGS})
+ set_target_properties(libclang
+ PROPERTIES
+ VERSION ${LIBCLANG_LIBRARY_VERSION}
++ SOVERSION ${LIBCLANG_LIBRARY_VERSION}
+ )
else()
set_target_properties(libclang
PROPERTIES
--
-2.22.0
+2.32.0.windows.2
diff --git a/recipe/patches/cross-compile.diff b/recipe/patches/0006-Fix-crosscompiling-LLVM-tools.patch
similarity index 53%
rename from recipe/patches/cross-compile.diff
rename to recipe/patches/0006-Fix-crosscompiling-LLVM-tools.patch
index b7963cc8..a09708e4 100644
--- a/recipe/patches/cross-compile.diff
+++ b/recipe/patches/0006-Fix-crosscompiling-LLVM-tools.patch
@@ -1,6 +1,17 @@
---- CMakeLists.txt.old 2020-08-07 20:15:39.605174899 +0000
-+++ CMakeLists.txt 2020-08-07 20:20:01.383910098 +0000
-@@ -111,6 +111,16 @@
+From c6a64699cbb17679a70ff9ac87d4799dae2bf082 Mon Sep 17 00:00:00 2001
+From: Isuru Fernando
+Date: Tue, 11 May 2021 15:08:13 +0200
+Subject: [PATCH 6/7] Fix crosscompiling LLVM tools
+
+---
+ CMakeLists.txt | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 95cdbd8f6663..09eadf6ed60e 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -110,6 +110,16 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
option(LLVM_ENABLE_LIBXML2 "Use libxml2 if available." ON)
include(AddLLVM)
@@ -17,3 +28,6 @@
include(TableGen)
include(HandleLLVMOptions)
include(VersionFromVCS)
+--
+2.32.0.windows.2
+
diff --git a/recipe/patches/0007-Only-error-on-undefined-TARGET_OS_OSX.patch b/recipe/patches/0007-Only-error-on-undefined-TARGET_OS_OSX.patch
new file mode 100644
index 00000000..a172397c
--- /dev/null
+++ b/recipe/patches/0007-Only-error-on-undefined-TARGET_OS_OSX.patch
@@ -0,0 +1,25 @@
+From 5758ee01ce81dbc4934c89ec7713e1877fe4789d Mon Sep 17 00:00:00 2001
+From: "Uwe L. Korn"
+Date: Tue, 11 May 2021 15:09:51 +0200
+Subject: [PATCH 7/7] Only error on undefined TARGET_OS_OSX
+
+---
+ lib/Driver/ToolChains/Darwin.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/Driver/ToolChains/Darwin.cpp b/lib/Driver/ToolChains/Darwin.cpp
+index 261f522f6c49..cf28bf94dc72 100644
+--- a/lib/Driver/ToolChains/Darwin.cpp
++++ b/lib/Driver/ToolChains/Darwin.cpp
+@@ -992,7 +992,7 @@ DarwinClang::DarwinClang(const Driver &D, const llvm::Triple &Triple,
+
+ void DarwinClang::addClangWarningOptions(ArgStringList &CC1Args) const {
+ // Always error about undefined 'TARGET_OS_*' macros.
+- CC1Args.push_back("-Wundef-prefix=TARGET_OS_");
++ CC1Args.push_back("-Wundef-prefix=TARGET_OS_OSX");
+ CC1Args.push_back("-Werror=undef-prefix");
+
+ // For modern targets, promote certain warnings to errors.
+--
+2.32.0.windows.2
+