diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index 6894cd14..a59d6834 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -23,11 +23,6 @@ jobs: timeoutInMinutes: 360 steps: - - script: | - rm -rf /opt/ghc - df -h - displayName: Manage disk space - # configure qemu binfmt-misc running. This allows us to run docker containers # embedded qemu-static - script: | diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml index 8a96a72e..82c5318e 100755 --- a/.azure-pipelines/azure-pipelines-win.yml +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -17,6 +17,7 @@ jobs: UPLOAD_TEMP: D:\\tmp steps: + - task: PythonScript@0 displayName: 'Download Miniforge' inputs: @@ -35,52 +36,14 @@ jobs: displayName: Add conda to PATH - script: | - call activate base - mamba.exe install "python=3.10" conda-build conda pip boa conda-forge-ci-setup=3 -c conda-forge --strict-channel-priority --yes - displayName: Install conda-build - - - script: set PYTHONUNBUFFERED=1 - displayName: Set PYTHONUNBUFFERED - - # Configure the VM - - script: | - call activate base - setup_conda_rc .\ ".\recipe" .\.ci_support\%CONFIG%.yaml - displayName: conda-forge CI setup - - # Configure the VM. - - script: | - set "CI=azure" - call activate base - run_conda_forge_build_setup - displayName: conda-forge build setup - - - script: | - call activate base - if EXIST LICENSE.txt ( - copy LICENSE.txt "recipe\\recipe-scripts-license.txt" - ) - conda.exe mambabuild "recipe" -m .ci_support\%CONFIG%.yaml --suppress-variables - displayName: Build recipe + call ".scripts\run_win_build.bat" + displayName: Run Windows build env: PYTHONUNBUFFERED: 1 - - script: | - set "FEEDSTOCK_NAME=%BUILD_REPOSITORY_NAME:*/=%" - call activate base - validate_recipe_outputs "%FEEDSTOCK_NAME%" - displayName: Validate Recipe Outputs - - - script: | - set "GIT_BRANCH=%BUILD_SOURCEBRANCHNAME%" - set "FEEDSTOCK_NAME=%BUILD_REPOSITORY_NAME:*/=%" - set "TEMP=$(UPLOAD_TEMP)" - if not exist "%TEMP%\" md "%TEMP%" - set "TMP=%TEMP%" - call activate base - upload_package --validate --feedstock-name="%FEEDSTOCK_NAME%" .\ ".\recipe" .ci_support\%CONFIG%.yaml - displayName: Upload package - env: + CONFIG: $(CONFIG) + CI: azure + UPLOAD_PACKAGES: $(UPLOAD_PACKAGES) + UPLOAD_TEMP: $(UPLOAD_TEMP) BINSTAR_TOKEN: $(BINSTAR_TOKEN) FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) - STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) - condition: and(succeeded(), not(eq(variables['UPLOAD_PACKAGES'], 'False')), not(eq(variables['Build.Reason'], 'PullRequest'))) \ No newline at end of file + STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) \ No newline at end of file diff --git a/.ci_support/migrations/libxml2211.yaml b/.ci_support/migrations/libxml2211.yaml deleted file mode 100644 index 9bce3143..00000000 --- a/.ci_support/migrations/libxml2211.yaml +++ /dev/null @@ -1,7 +0,0 @@ -__migrator: - build_number: 1 - kind: version - migration_number: 1 -libxml2: -- '2.11' -migrator_ts: 1684203491.9767957 diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index a6b09f6b..322832b9 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -31,11 +31,10 @@ pkgs_dirs: CONDARC - -mamba install --update-specs --yes --quiet --channel conda-forge \ - conda-build pip boa conda-forge-ci-setup=3 -mamba update --update-specs --yes --quiet --channel conda-forge \ - conda-build pip boa conda-forge-ci-setup=3 +mamba install --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ + pip mamba conda-build boa conda-forge-ci-setup=3 +mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ + pip mamba conda-build boa conda-forge-ci-setup # set up the condarc setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" diff --git a/.scripts/logging_utils.sh b/.scripts/logging_utils.sh index 57bc95c2..aff009f0 100644 --- a/.scripts/logging_utils.sh +++ b/.scripts/logging_utils.sh @@ -12,7 +12,7 @@ function startgroup { echo "##[group]$1";; travis ) echo "$1" - echo -en 'travis_fold:start:'"${1// /}"'\\r';; + echo -en 'travis_fold:start:'"${1// /}"'\r';; github_actions ) echo "::group::$1";; * ) @@ -28,7 +28,7 @@ function endgroup { azure ) echo "##[endgroup]";; travis ) - echo -en 'travis_fold:end:'"${1// /}"'\\r';; + echo -en 'travis_fold:end:'"${1// /}"'\r';; github_actions ) echo "::endgroup::";; esac diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index bb00584b..cd9a88f2 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -23,10 +23,10 @@ bash $MINIFORGE_FILE -b -p ${MINIFORGE_HOME} source ${MINIFORGE_HOME}/etc/profile.d/conda.sh conda activate base -mamba install --update-specs --quiet --yes --channel conda-forge \ - conda-build pip boa conda-forge-ci-setup=3 -mamba update --update-specs --yes --quiet --channel conda-forge \ - conda-build pip boa conda-forge-ci-setup=3 +mamba install --update-specs --quiet --yes --channel conda-forge --strict-channel-priority \ + pip mamba conda-build boa conda-forge-ci-setup=3 +mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ + pip mamba conda-build boa conda-forge-ci-setup @@ -55,11 +55,6 @@ source run_conda_forge_build_setup echo -e "\n\nMaking the build clobber file" make_build_number ./ ./recipe ./.ci_support/${CONFIG}.yaml -if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]]; then - EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test" -fi - - if [[ -f LICENSE.txt ]]; then cp LICENSE.txt "recipe/recipe-scripts-license.txt" fi @@ -75,6 +70,11 @@ if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then # Drop into an interactive shell /bin/bash else + + 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 ${EXTRA_CB_OPTIONS:-} \ --clobber-file ./.ci_support/clobber_${CONFIG}.yaml diff --git a/.scripts/run_win_build.bat b/.scripts/run_win_build.bat new file mode 100644 index 00000000..07d34456 --- /dev/null +++ b/.scripts/run_win_build.bat @@ -0,0 +1,115 @@ +:: PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here +:: will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent +:: changes to this script, consider a proposal to conda-smithy so that other feedstocks can also +:: benefit from the improvement. + +:: Note: we assume a Miniforge installation is available + +:: INPUTS (required environment variables) +:: CONFIG: name of the .ci_support/*.yaml file for this job +:: CI: azure, github_actions, or unset +:: UPLOAD_PACKAGES: true or false +:: UPLOAD_ON_BRANCH: true or false + +setlocal enableextensions enabledelayedexpansion + +call :start_group "Configuring conda" + +:: Activate the base conda environment +call activate base + +:: Provision the necessary dependencies to build the recipe later +echo Installing dependencies +mamba.exe install "python=3.10" pip mamba conda-build boa conda-forge-ci-setup=3 -c conda-forge --strict-channel-priority --yes +if !errorlevel! neq 0 exit /b !errorlevel! + +:: Set basic configuration +echo Setting up configuration +setup_conda_rc .\ ".\recipe" .\.ci_support\%CONFIG%.yaml +if !errorlevel! neq 0 exit /b !errorlevel! +echo Running build setup +CALL run_conda_forge_build_setup + + +if !errorlevel! neq 0 exit /b !errorlevel! + +if EXIST LICENSE.txt ( + echo Copying feedstock license + copy LICENSE.txt "recipe\\recipe-scripts-license.txt" +) +if NOT [%HOST_PLATFORM%] == [%BUILD_PLATFORM%] ( + set "EXTRA_CB_OPTIONS=%EXTRA_CB_OPTIONS% --no-test" +) + +call :end_group + +:: Build the recipe +echo Building recipe +conda.exe mambabuild "recipe" -m .ci_support\%CONFIG%.yaml --suppress-variables %EXTRA_CB_OPTIONS% +if !errorlevel! neq 0 exit /b !errorlevel! + +:: Prepare some environment variables for the upload step +if /i "%CI%" == "github_actions" ( + set "FEEDSTOCK_NAME=%GITHUB_REPOSITORY:*/=%" + set "GIT_BRANCH=%GITHUB_REF:refs/heads/=%" + if /i "%GITHUB_EVENT_NAME%" == "pull_request" ( + set "IS_PR_BUILD=True" + ) else ( + set "IS_PR_BUILD=False" + ) + set "TEMP=%RUNNER_TEMP%" +) +if /i "%CI%" == "azure" ( + set "FEEDSTOCK_NAME=%BUILD_REPOSITORY_NAME:*/=%" + set "GIT_BRANCH=%BUILD_SOURCEBRANCHNAME%" + if /i "%BUILD_REASON%" == "PullRequest" ( + set "IS_PR_BUILD=True" + ) else ( + set "IS_PR_BUILD=False" + ) + set "TEMP=%UPLOAD_TEMP%" +) + +:: Validate +call :start_group "Validating outputs" +validate_recipe_outputs "%FEEDSTOCK_NAME%" +if !errorlevel! neq 0 exit /b !errorlevel! +call :end_group + +if /i "%UPLOAD_PACKAGES%" == "true" ( + if /i "%IS_PR_BUILD%" == "false" ( + call :start_group "Uploading packages" + if not exist "%TEMP%\" md "%TEMP%" + set "TMP=%TEMP%" + upload_package --validate --feedstock-name="%FEEDSTOCK_NAME%" .\ ".\recipe" .ci_support\%CONFIG%.yaml + if !errorlevel! neq 0 exit /b !errorlevel! + call :end_group + ) +) + +exit + +:: Logging subroutines + +:start_group +if /i "%CI%" == "github_actions" ( + echo ::group::%~1 + exit /b +) +if /i "%CI%" == "azure" ( + echo ##[group]%~1 + exit /b +) +echo %~1 +exit /b + +:end_group +if /i "%CI%" == "github_actions" ( + echo ::endgroup:: + exit /b +) +if /i "%CI%" == "azure" ( + echo ##[endgroup] + exit /b +) +exit /b \ No newline at end of file diff --git a/README.md b/README.md index aa25898b..856de467 100644 --- a/README.md +++ b/README.md @@ -84,15 +84,15 @@ Current release info | Name | Downloads | Version | Platforms | | --- | --- | --- | --- | | [![Conda Recipe](https://img.shields.io/badge/recipe-clang-green.svg)](https://anaconda.org/conda-forge/clang) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/clang.svg)](https://anaconda.org/conda-forge/clang) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/clang.svg)](https://anaconda.org/conda-forge/clang) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/clang.svg)](https://anaconda.org/conda-forge/clang) | -| [![Conda Recipe](https://img.shields.io/badge/recipe-clang--16-green.svg)](https://anaconda.org/conda-forge/clang-16) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/clang-16.svg)](https://anaconda.org/conda-forge/clang-16) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/clang-16.svg)](https://anaconda.org/conda-forge/clang-16) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/clang-16.svg)](https://anaconda.org/conda-forge/clang-16) | +| [![Conda Recipe](https://img.shields.io/badge/recipe-clang--17-green.svg)](https://anaconda.org/conda-forge/clang-17) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/clang-17.svg)](https://anaconda.org/conda-forge/clang-17) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/clang-17.svg)](https://anaconda.org/conda-forge/clang-17) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/clang-17.svg)](https://anaconda.org/conda-forge/clang-17) | | [![Conda Recipe](https://img.shields.io/badge/recipe-clang--format-green.svg)](https://anaconda.org/conda-forge/clang-format) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/clang-format.svg)](https://anaconda.org/conda-forge/clang-format) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/clang-format.svg)](https://anaconda.org/conda-forge/clang-format) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/clang-format.svg)](https://anaconda.org/conda-forge/clang-format) | -| [![Conda Recipe](https://img.shields.io/badge/recipe-clang--format--16-green.svg)](https://anaconda.org/conda-forge/clang-format-16) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/clang-format-16.svg)](https://anaconda.org/conda-forge/clang-format-16) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/clang-format-16.svg)](https://anaconda.org/conda-forge/clang-format-16) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/clang-format-16.svg)](https://anaconda.org/conda-forge/clang-format-16) | +| [![Conda Recipe](https://img.shields.io/badge/recipe-clang--format--17-green.svg)](https://anaconda.org/conda-forge/clang-format-17) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/clang-format-17.svg)](https://anaconda.org/conda-forge/clang-format-17) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/clang-format-17.svg)](https://anaconda.org/conda-forge/clang-format-17) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/clang-format-17.svg)](https://anaconda.org/conda-forge/clang-format-17) | | [![Conda Recipe](https://img.shields.io/badge/recipe-clang--tools-green.svg)](https://anaconda.org/conda-forge/clang-tools) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/clang-tools.svg)](https://anaconda.org/conda-forge/clang-tools) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/clang-tools.svg)](https://anaconda.org/conda-forge/clang-tools) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/clang-tools.svg)](https://anaconda.org/conda-forge/clang-tools) | | [![Conda Recipe](https://img.shields.io/badge/recipe-clangdev-green.svg)](https://anaconda.org/conda-forge/clangdev) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/clangdev.svg)](https://anaconda.org/conda-forge/clangdev) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/clangdev.svg)](https://anaconda.org/conda-forge/clangdev) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/clangdev.svg)](https://anaconda.org/conda-forge/clangdev) | | [![Conda Recipe](https://img.shields.io/badge/recipe-clangxx-green.svg)](https://anaconda.org/conda-forge/clangxx) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/clangxx.svg)](https://anaconda.org/conda-forge/clangxx) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/clangxx.svg)](https://anaconda.org/conda-forge/clangxx) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/clangxx.svg)](https://anaconda.org/conda-forge/clangxx) | | [![Conda Recipe](https://img.shields.io/badge/recipe-libclang-green.svg)](https://anaconda.org/conda-forge/libclang) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/libclang.svg)](https://anaconda.org/conda-forge/libclang) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/libclang.svg)](https://anaconda.org/conda-forge/libclang) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/libclang.svg)](https://anaconda.org/conda-forge/libclang) | | [![Conda Recipe](https://img.shields.io/badge/recipe-libclang--cpp-green.svg)](https://anaconda.org/conda-forge/libclang-cpp) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/libclang-cpp.svg)](https://anaconda.org/conda-forge/libclang-cpp) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/libclang-cpp.svg)](https://anaconda.org/conda-forge/libclang-cpp) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/libclang-cpp.svg)](https://anaconda.org/conda-forge/libclang-cpp) | -| [![Conda Recipe](https://img.shields.io/badge/recipe-libclang--cpp16-green.svg)](https://anaconda.org/conda-forge/libclang-cpp16) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/libclang-cpp16.svg)](https://anaconda.org/conda-forge/libclang-cpp16) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/libclang-cpp16.svg)](https://anaconda.org/conda-forge/libclang-cpp16) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/libclang-cpp16.svg)](https://anaconda.org/conda-forge/libclang-cpp16) | +| [![Conda Recipe](https://img.shields.io/badge/recipe-libclang--cpp17-green.svg)](https://anaconda.org/conda-forge/libclang-cpp17) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/libclang-cpp17.svg)](https://anaconda.org/conda-forge/libclang-cpp17) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/libclang-cpp17.svg)](https://anaconda.org/conda-forge/libclang-cpp17) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/libclang-cpp17.svg)](https://anaconda.org/conda-forge/libclang-cpp17) | | [![Conda Recipe](https://img.shields.io/badge/recipe-libclang13-green.svg)](https://anaconda.org/conda-forge/libclang13) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/libclang13.svg)](https://anaconda.org/conda-forge/libclang13) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/libclang13.svg)](https://anaconda.org/conda-forge/libclang13) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/libclang13.svg)](https://anaconda.org/conda-forge/libclang13) | | [![Conda Recipe](https://img.shields.io/badge/recipe-python--clang-green.svg)](https://anaconda.org/conda-forge/python-clang) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/python-clang.svg)](https://anaconda.org/conda-forge/python-clang) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/python-clang.svg)](https://anaconda.org/conda-forge/python-clang) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/python-clang.svg)](https://anaconda.org/conda-forge/python-clang) | @@ -106,16 +106,16 @@ conda config --add channels conda-forge conda config --set channel_priority strict ``` -Once the `conda-forge` channel has been enabled, `clang, clang-16, clang-format, clang-format-16, clang-tools, clangdev, clangxx, libclang, libclang-cpp, libclang-cpp16, libclang13, python-clang` can be installed with `conda`: +Once the `conda-forge` channel has been enabled, `clang, clang-17, clang-format, clang-format-17, clang-tools, clangdev, clangxx, libclang, libclang-cpp, libclang-cpp17, libclang13, python-clang` can be installed with `conda`: ``` -conda install clang clang-16 clang-format clang-format-16 clang-tools clangdev clangxx libclang libclang-cpp libclang-cpp16 libclang13 python-clang +conda install clang clang-17 clang-format clang-format-17 clang-tools clangdev clangxx libclang libclang-cpp libclang-cpp17 libclang13 python-clang ``` or with `mamba`: ``` -mamba install clang clang-16 clang-format clang-format-16 clang-tools clangdev clangxx libclang libclang-cpp libclang-cpp16 libclang13 python-clang +mamba install clang clang-17 clang-format clang-format-17 clang-tools clangdev clangxx libclang libclang-cpp libclang-cpp17 libclang13 python-clang ``` It is possible to list all of the versions of `clang` available on your platform with `conda`: diff --git a/recipe/build.sh b/recipe/build.sh index e6ad11a0..5f52fda2 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -15,8 +15,14 @@ rm -rf llvm-project cd clang IFS='.' read -r -a PKG_VER_ARRAY <<< "${PKG_VERSION}" +# default SOVER for tagged releases is just the major version +SOVER_EXT=${VER_ARR[0]} +if [[ "${PKG_VERSION}" == *dev0 ]]; then + # otherwise with git suffix + SOVER_EXT="${SOVER_EXT}git" +fi -sed -i.bak "s/libLTO.dylib/libLTO.${PKG_VER_ARRAY[0]}.dylib/g" lib/Driver/ToolChains/Darwin.cpp +sed -i.bak "s/libLTO.dylib/libLTO.${SOVER_EXT}.dylib/g" lib/Driver/ToolChains/Darwin.cpp if [[ "$variant" == "hcc" ]]; then CMAKE_ARGS="$CMAKE_ARGS -DKALMAR_BACKEND=HCC_BACKEND_AMDGPU -DHCC_VERSION_STRING=2.7-19365-24e69cd8-24e69cd8-24e69cd8" @@ -36,6 +42,7 @@ fi if [[ "$target_platform" == osx* ]]; then export CXXFLAGS="$CXXFLAGS -DTARGET_OS_OSX=1" + CMAKE_ARGS="$CMAKE_ARGS -DLLVM_ENABLE_LIBCXX=ON" fi # disable -fno-plt due to some GCC bug causing linker errors, see diff --git a/recipe/install_clang_tools.sh b/recipe/install_clang_tools.sh index 83445ac0..95a09ca7 100644 --- a/recipe/install_clang_tools.sh +++ b/recipe/install_clang_tools.sh @@ -15,6 +15,10 @@ rm -rf lib/lib*.a MAJOR_VERSION=$(echo ${PKG_VERSION} | cut -f1 -d".") for f in ${PREFIX}/bin/clang-*; do if [[ "$(basename $f)" == clang-format-* ]]; then + # already got versioned in install_clang_format.sh + continue + elif [[ "$(basename $f)" == "clang-${MAJOR_VERSION}" ]]; then + # installation also creates a versioned clang, no need to re-version it continue fi rm -f ${PREFIX}/bin/$(basename $f)-${MAJOR_VERSION} @@ -22,6 +26,7 @@ for f in ${PREFIX}/bin/clang-*; do ln -s ${PREFIX}/bin/$(basename $f)-${MAJOR_VERSION} $f; done -rm ${PREFIX}/bin/clang-${MAJOR_VERSION}-${MAJOR_VERSION} +# part of output "clang", not "clang-tools" +rm ${PREFIX}/bin/clang-${MAJOR_VERSION} rm ${PREFIX}/bin/clang-cpp-${MAJOR_VERSION} rm ${PREFIX}/bin/clang-cl-${MAJOR_VERSION} diff --git a/recipe/meta.yaml b/recipe/meta.yaml index c98218bf..9cdfe8e2 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,10 +1,14 @@ -{% set version = "16.0.6" %} +{% set version = "17.0.1" %} {% set major_version = version.split(".")[0] %} -{% set build_number = 1 %} +{% set build_number = 0 %} {% set minor_aware_ext = major_version %} {% if version.split(".")[1] | int > 0 %} -{% set minor_aware_ext = major_version + "." + version.split(".")[1] %} +{% set minor_aware_ext = major_version ~ "." ~ version.split(".")[1] %} +{% elif version.split(".")[-1].startswith("rc") %} +{% set minor_aware_ext = major_version ~ "rc" %} +{% elif version.split(".")[-1] == "dev0" %} +{% set minor_aware_ext = major_version ~ "git" %} {% endif %} {% if libclang_soversion is not defined %} @@ -17,7 +21,7 @@ package: source: - url: https://github.com/llvm/llvm-project/releases/download/llvmorg-{{ version.replace(".rc", "-rc") }}/llvm-project-{{ version.replace(".rc", "rc") }}.src.tar.xz - sha256: ce5e71081d17ce9e86d7cbcfa28c4b04b9300f8fb7e78422b1feb6bc52c3028e + sha256: b0e42aafc01ece2ca2b42e3526f54bebc4b1f1dc8de6e34f46a0446a13e882b9 patches: - patches/0001-Fix-sysroot-detection-for-linux.patch - patches/0002-clang-add-conda-specific-env-var-CONDA_BUILD_SYSROOT.patch @@ -130,9 +134,10 @@ outputs: - name: libclang-cpp{{ minor_aware_ext }} script: install_libclang_cpp.sh # [unix] files: - - lib/libclang-cpp.so.16 # [linux] - - lib/libclang-cpp.16.dylib # [osx] + - lib/libclang-cpp.so.{{ minor_aware_ext }} # [linux] + - lib/libclang-cpp.{{ minor_aware_ext }}.dylib # [osx] build: + skip: true # [win] track_features: - hcc # [variant=="hcc"] string: {{ variant }}_h{{ PKG_HASH }}_{{ build_number }} @@ -143,7 +148,6 @@ outputs: - zlib # [unix] - libxml2 # [unix] - zstd # [unix] - skip: true # [win] requirements: build: - {{ compiler('cxx') }} @@ -541,7 +545,6 @@ outputs: ignore_run_exports_from: # the build fails if it doesn't find the following, but it's not used - zlib # [unix] - - libxml2 # [unix] - zstd # [unix] requirements: build: diff --git a/recipe/patches/0001-Fix-sysroot-detection-for-linux.patch b/recipe/patches/0001-Fix-sysroot-detection-for-linux.patch index 21a636bc..f8dc81a6 100644 --- a/recipe/patches/0001-Fix-sysroot-detection-for-linux.patch +++ b/recipe/patches/0001-Fix-sysroot-detection-for-linux.patch @@ -1,4 +1,4 @@ -From e46d9dd8f6701270b5243348ffb4b8c3430c4229 Mon Sep 17 00:00:00 2001 +From 4d6597584b90d2bc17b440dcdeff29cdc934a6dd Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Mon, 8 Apr 2019 16:32:17 -0500 Subject: [PATCH 1/7] Fix sysroot detection for linux @@ -8,10 +8,10 @@ Subject: [PATCH 1/7] Fix sysroot detection for linux 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp -index c6fb290ffdb..b817620a8bb 100644 +index 1ba222bf83b..ee361924b9e 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp -@@ -370,18 +370,30 @@ std::string Linux::computeSysRoot() const { +@@ -394,18 +394,30 @@ std::string Linux::computeSysRoot() const { return std::string(); } diff --git a/recipe/patches/0002-clang-add-conda-specific-env-var-CONDA_BUILD_SYSROOT.patch b/recipe/patches/0002-clang-add-conda-specific-env-var-CONDA_BUILD_SYSROOT.patch index acbd00ef..1d75836d 100644 --- a/recipe/patches/0002-clang-add-conda-specific-env-var-CONDA_BUILD_SYSROOT.patch +++ b/recipe/patches/0002-clang-add-conda-specific-env-var-CONDA_BUILD_SYSROOT.patch @@ -1,4 +1,4 @@ -From c17bbdb9087baecccf7e06e55ac380ae71ee280c Mon Sep 17 00:00:00 2001 +From 3d234ba553a1ec9078e107803da4f97b483f8e94 Mon Sep 17 00:00:00 2001 From: Nehal J Wani Date: Sat, 25 Aug 2018 09:20:04 -0500 Subject: [PATCH 2/7] clang: add conda specific env var CONDA_BUILD_SYSROOT @@ -9,14 +9,14 @@ Subject: [PATCH 2/7] clang: add conda specific env var CONDA_BUILD_SYSROOT 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp -index a268f2fa8fc..baf84d4d1ad 100644 +index 488350169ef..168e5977d8f 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp -@@ -1327,6 +1327,11 @@ Compilation *Driver::BuildCompilation(ArrayRef ArgList) { +@@ -1348,6 +1348,11 @@ Compilation *Driver::BuildCompilation(ArrayRef ArgList) { CompilerPath = Split.second; } } -+ if (Optional CondaBuildSysrootValue = ++ if (std::optional CondaBuildSysrootValue = + llvm::sys::Process::GetEnv("CONDA_BUILD_SYSROOT")) { + SysRoot = *CondaBuildSysrootValue; + } @@ -25,23 +25,23 @@ index a268f2fa8fc..baf84d4d1ad 100644 SysRoot = A->getValue(); if (const Arg *A = Args.getLastArg(options::OPT__dyld_prefix_EQ)) diff --git a/clang/lib/Lex/InitHeaderSearch.cpp b/clang/lib/Lex/InitHeaderSearch.cpp -index d4465565718..8354362d1ff 100644 +index 41382d7cb3f..3f2fab2b5bb 100644 --- a/clang/lib/Lex/InitHeaderSearch.cpp +++ b/clang/lib/Lex/InitHeaderSearch.cpp -@@ -25,6 +25,7 @@ +@@ -24,6 +24,7 @@ #include "llvm/ADT/Twine.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/Path.h" +#include "llvm/Support/Process.h" #include "llvm/Support/raw_ostream.h" + #include "llvm/TargetParser/Triple.h" #include - -@@ -243,7 +244,10 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple, +@@ -241,7 +242,10 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple, [[fallthrough]]; default: // FIXME: temporary hack: hard-coded paths. - AddPath("/usr/local/include", System, false); -+ Optional CondaBuildSysrootValue = ++ std::optional CondaBuildSysrootValue = + llvm::sys::Process::GetEnv("CONDA_BUILD_SYSROOT"); + if (!CondaBuildSysrootValue.has_value()) + AddPath("/usr/local/include", System, false); diff --git a/recipe/patches/0003-Fix-normalizeProgramName-s-handling-of-dots-outside-.patch b/recipe/patches/0003-Fix-normalizeProgramName-s-handling-of-dots-outside-.patch index cc88af87..bc776289 100644 --- a/recipe/patches/0003-Fix-normalizeProgramName-s-handling-of-dots-outside-.patch +++ b/recipe/patches/0003-Fix-normalizeProgramName-s-handling-of-dots-outside-.patch @@ -1,4 +1,4 @@ -From 3e7e229e2da4008946ba9b5cf15f3a9606a835ee Mon Sep 17 00:00:00 2001 +From 703241c36d0d97cdbf8caaf9020a1ba68ca7dba8 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Wed, 30 Aug 2017 20:01:49 +0100 Subject: [PATCH 3/7] Fix normalizeProgramName()'s handling of dots outside of @@ -18,10 +18,10 @@ x86_64-apple-darwin13.4 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp -index bc70205a6c0..3a7948509a6 100644 +index d60fdbc1796..9bcd82e15d9 100644 --- a/clang/lib/Driver/ToolChain.cpp +++ b/clang/lib/Driver/ToolChain.cpp -@@ -51,6 +51,7 @@ using namespace driver; +@@ -55,6 +55,7 @@ using namespace driver; using namespace tools; using namespace llvm; using namespace llvm::opt; @@ -29,7 +29,7 @@ index bc70205a6c0..3a7948509a6 100644 static llvm::opt::Arg *GetRTTIArgument(const ArgList &Args) { return Args.getLastArg(options::OPT_mkernel, options::OPT_fapple_kext, -@@ -223,10 +224,30 @@ static const DriverSuffix *FindDriverSuffix(StringRef ProgName, size_t &Pos) { +@@ -323,10 +324,30 @@ static const DriverSuffix *FindDriverSuffix(StringRef ProgName, size_t &Pos) { return nullptr; } diff --git a/recipe/patches/0004-Set-VERSION-in-osx-as-well.patch b/recipe/patches/0004-Set-VERSION-in-osx-as-well.patch index 7c8bc287..9b465047 100644 --- a/recipe/patches/0004-Set-VERSION-in-osx-as-well.patch +++ b/recipe/patches/0004-Set-VERSION-in-osx-as-well.patch @@ -1,4 +1,4 @@ -From 53451239fa132559547b7dd8022d74526fba102a Mon Sep 17 00:00:00 2001 +From fa5e626e9e956791d467547eddaea6d42f405cde Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Sat, 27 Jul 2019 11:55:23 -0500 Subject: [PATCH 4/7] Set VERSION in osx as well diff --git a/recipe/patches/0005-Fix-crosscompiling-LLVM-tools.patch b/recipe/patches/0005-Fix-crosscompiling-LLVM-tools.patch index 68d86419..12d283ae 100644 --- a/recipe/patches/0005-Fix-crosscompiling-LLVM-tools.patch +++ b/recipe/patches/0005-Fix-crosscompiling-LLVM-tools.patch @@ -1,4 +1,4 @@ -From bcde5c3f996bf4f2e4abe17a697ee8fc675dbcee Mon Sep 17 00:00:00 2001 +From b65c6470a8778b0dbc760ed297407d6e8afb4f66 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Tue, 11 May 2021 15:08:13 +0200 Subject: [PATCH 5/7] Fix crosscompiling LLVM tools @@ -8,10 +8,10 @@ Subject: [PATCH 5/7] Fix crosscompiling LLVM tools 1 file changed, 10 insertions(+) diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt -index 090cfa35207..3f617c60244 100644 +index f7936d72e08..758f517f4d3 100644 --- a/clang/CMakeLists.txt +++ b/clang/CMakeLists.txt -@@ -67,6 +67,16 @@ if(CLANG_BUILT_STANDALONE) +@@ -60,6 +60,16 @@ if(CLANG_BUILT_STANDALONE) option(LLVM_ENABLE_LIBXML2 "Use libxml2 if available." ON) include(AddLLVM) diff --git a/recipe/patches/0006-Only-error-on-undefined-TARGET_OS_OSX.patch b/recipe/patches/0006-Only-error-on-undefined-TARGET_OS_OSX.patch index 3d2aea0a..14c4c961 100644 --- a/recipe/patches/0006-Only-error-on-undefined-TARGET_OS_OSX.patch +++ b/recipe/patches/0006-Only-error-on-undefined-TARGET_OS_OSX.patch @@ -1,4 +1,4 @@ -From ced5907cd03b4c84c0cb0d9d8a9bd07324852b2d Mon Sep 17 00:00:00 2001 +From 90ba141457474dd8034fc405e7c92c85b214b3b1 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Tue, 11 May 2021 15:09:51 +0200 Subject: [PATCH 6/7] Only error on undefined TARGET_OS_OSX @@ -8,10 +8,10 @@ Subject: [PATCH 6/7] Only error on undefined TARGET_OS_OSX 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/Driver/ToolChains/Darwin.cpp b/clang/lib/Driver/ToolChains/Darwin.cpp -index 9f95c962ee9..fb3f8f16d04 100644 +index 65bd6c6a7eb..3276f9948e8 100644 --- a/clang/lib/Driver/ToolChains/Darwin.cpp +++ b/clang/lib/Driver/ToolChains/Darwin.cpp -@@ -1099,7 +1099,7 @@ DarwinClang::DarwinClang(const Driver &D, const llvm::Triple &Triple, +@@ -1136,7 +1136,7 @@ DarwinClang::DarwinClang(const Driver &D, const llvm::Triple &Triple, void DarwinClang::addClangWarningOptions(ArgStringList &CC1Args) const { // Always error about undefined 'TARGET_OS_*' macros. diff --git a/recipe/patches/0007-set-libclang-SOVERSION-unconditionally.patch b/recipe/patches/0007-set-libclang-SOVERSION-unconditionally.patch index 8c0a365e..dfec6384 100644 --- a/recipe/patches/0007-set-libclang-SOVERSION-unconditionally.patch +++ b/recipe/patches/0007-set-libclang-SOVERSION-unconditionally.patch @@ -1,4 +1,4 @@ -From ad4c79a522f9888398020dbf1df75f4c2f9f4ca6 Mon Sep 17 00:00:00 2001 +From 3477a72499fbb53bf252a489fb70dd56469c1a59 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Thu, 14 Apr 2022 11:57:00 +1100 Subject: [PATCH 7/7] set libclang SOVERSION unconditionally