From f9852c796af73e02f51f3687284f2ceab40a3d76 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Wed, 27 Sep 2023 18:02:06 +1100 Subject: [PATCH 1/8] Revert "set flexible channel priority" This reverts commit b6bd62cb4c5647522f047ce883379b108118d8c1. --- conda-forge.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/conda-forge.yml b/conda-forge.yml index bb58923..522a138 100644 --- a/conda-forge.yml +++ b/conda-forge.yml @@ -2,8 +2,6 @@ azure: settings_win: variables: SET_PAGEFILE: "True" -# necessary for osx during rc-phase -channel_priority: flexible conda_forge_output_validation: true github: branch_name: main From 47f24d1c6e7f6cce79eee219cfed9397b40637cf Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Wed, 27 Sep 2023 18:04:24 +1100 Subject: [PATCH 2/8] remove rc-channel sources & targets --- recipe/conda_build_config.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml index 9ec9c17..2ae3812 100644 --- a/recipe/conda_build_config.yaml +++ b/recipe/conda_build_config.yaml @@ -4,9 +4,3 @@ cxx_compiler_version: # [osx] - 17 # [osx] MACOSX_DEPLOYMENT_TARGET: # [osx and x86_64] - "10.13" # [osx and x86_64] - -channel_targets: - - conda-forge llvm_rc - -channel_sources: - - conda-forge/label/llvm_rc,conda-forge From 59e538fcb97772898802abf11201965f0ee0e5fa Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Wed, 27 Sep 2023 18:06:17 +1100 Subject: [PATCH 3/8] remove osx builds again --- recipe/build.sh | 11 +---------- recipe/conda_build_config.yaml | 6 ------ recipe/install_libflang.sh | 14 ++++---------- recipe/meta.yaml | 6 ++---- 4 files changed, 7 insertions(+), 30 deletions(-) delete mode 100644 recipe/conda_build_config.yaml diff --git a/recipe/build.sh b/recipe/build.sh index e077a1b..05de59c 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -8,18 +8,9 @@ if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then CMAKE_ARGS="$CMAKE_ARGS -DLLVM_CONFIG_PATH=$BUILD_PREFIX/bin/llvm-config -DMLIR_TABLEGEN_EXE=$BUILD_PREFIX/bin/mlir-tblgen" fi -if [[ "${target_platform}" == linux-* ]]; then - CMAKE_ARGS="$CMAKE_ARGS -DBUILD_SHARED_LIBS=ON" -else - # unclear segfaults with shared builds on osx - CMAKE_ARGS="$CMAKE_ARGS -DBUILD_SHARED_LIBS=OFF" - # clang on osx still picks up libstdcxx by default for some reason (unless LLVM_ENABLE_LIBCXX), see - # https://github.com/llvm/llvm-project/blob/llvmorg-17.0.0-rc4/llvm/cmake/modules/CheckCompilerVersion.cmake#L66-L88 - CMAKE_ARGS="$CMAKE_ARGS -DLLVM_ENABLE_LIBCXX=ON" -fi - cmake -G Ninja \ ${CMAKE_ARGS} \ + -DBUILD_SHARED_LIBS=ON \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml deleted file mode 100644 index 2ae3812..0000000 --- a/recipe/conda_build_config.yaml +++ /dev/null @@ -1,6 +0,0 @@ -c_compiler_version: # [osx] - - 17 # [osx] -cxx_compiler_version: # [osx] - - 17 # [osx] -MACOSX_DEPLOYMENT_TARGET: # [osx and x86_64] - - "10.13" # [osx and x86_64] diff --git a/recipe/install_libflang.sh b/recipe/install_libflang.sh index 0e3f13a..f2abd5c 100644 --- a/recipe/install_libflang.sh +++ b/recipe/install_libflang.sh @@ -1,13 +1,7 @@ #!/bin/bash set -ex -if [[ "${target_platform}" == linux-* ]]; then - # copy symlink & its target, e.g. libFortranRuntime.so.16 & libFortranRuntime.so - cp $SRC_DIR/build/lib/libFortranRuntime*${SHLIB_EXT}* $PREFIX/lib - # same for libFortranDecimal - cp $SRC_DIR/build/lib/libFortranDecimal*${SHLIB_EXT}* $PREFIX/lib -else - # static builds on unix due to segfaults with shared ones - cp $SRC_DIR/build/lib/libFortranRuntime.a $PREFIX/lib - cp $SRC_DIR/build/lib/libFortranDecimal.a $PREFIX/lib -fi +# copy symlink & its target, e.g. libFortranRuntime.so.16 & libFortranRuntime.so +cp $SRC_DIR/build/lib/libFortranRuntime*${SHLIB_EXT}* $PREFIX/lib +# same for libFortranDecimal +cp $SRC_DIR/build/lib/libFortranDecimal*${SHLIB_EXT}* $PREFIX/lib diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 3b6736d..5a1f064 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -16,8 +16,8 @@ source: build: number: 0 - # intentionally only x64 builds; win (main target), linux (debuggability) - # plus osx to be able to test a consistent llvm stack not just on windows. + # intentionally only windows (main target) & linux (debuggability) + skip: true # [osx] track_features: - flang @@ -64,8 +64,6 @@ outputs: commands: # shared lib on linux - test -f $PREFIX/lib/libFortranRuntime.so # [linux] - # static lib on osx (segfaults with shared ones) - - test -f $PREFIX/lib/libFortranRuntime.a # [osx] # static lib on win (fails to export symbols for shared build) - if not exist %LIBRARY_LIB%\FortranRuntime.lib exit 1 # [win] From a0d94b7e53f2a4cbce063b12d2b7cb6627148dc8 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Wed, 27 Sep 2023 18:06:57 +1100 Subject: [PATCH 4/8] add myself to maintainers --- recipe/meta.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 5a1f064..62efc59 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -148,4 +148,5 @@ about: extra: recipe-maintainers: - isuruf + - h-vetinari feedstock-name: flang From f7bc18ab21885801dc900ef791c87c3631050392 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Wed, 27 Sep 2023 18:07:50 +1100 Subject: [PATCH 5/8] MNT: Re-rendered with conda-build 3.26.1, conda-smithy 3.26.2, and conda-forge-pinning 2023.09.26.23.22.17 --- .azure-pipelines/azure-pipelines-osx.yml | 33 ------- .azure-pipelines/azure-pipelines-win.yml | 53 ++--------- .ci_support/linux_64_.yaml | 4 +- .ci_support/osx_64_.yaml | 23 ----- .ci_support/win_64_.yaml | 4 +- .github/CODEOWNERS | 2 +- .scripts/build_steps.sh | 9 +- .scripts/logging_utils.sh | 4 +- .scripts/run_osx_build.sh | 90 ------------------ .scripts/run_win_build.bat | 112 +++++++++++++++++++++++ README.md | 15 +-- azure-pipelines.yml | 3 +- 12 files changed, 136 insertions(+), 216 deletions(-) delete mode 100644 .azure-pipelines/azure-pipelines-osx.yml delete mode 100644 .ci_support/osx_64_.yaml delete mode 100755 .scripts/run_osx_build.sh create mode 100644 .scripts/run_win_build.bat diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml deleted file mode 100644 index 9e4e167..0000000 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ /dev/null @@ -1,33 +0,0 @@ -# This file was generated automatically from conda-smithy. To update this configuration, -# update the conda-forge.yml and/or the recipe/meta.yaml. -# -*- mode: yaml -*- - -jobs: -- job: osx - pool: - vmImage: macOS-11 - strategy: - matrix: - osx_64_: - CONFIG: osx_64_ - UPLOAD_PACKAGES: 'True' - timeoutInMinutes: 360 - - steps: - # TODO: Fast finish on azure pipelines? - - script: | - export CI=azure - 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: - BINSTAR_TOKEN: $(BINSTAR_TOKEN) - FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) - STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) \ No newline at end of file diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml index 4819fc2..93b9ffc 100755 --- a/.azure-pipelines/azure-pipelines-win.yml +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -18,6 +18,7 @@ jobs: UPLOAD_TEMP: D:\\tmp steps: + - task: PythonScript@0 displayName: 'Download Miniforge' inputs: @@ -36,52 +37,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 %EXTRA_CB_OPTIONS% - 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/linux_64_.yaml b/.ci_support/linux_64_.yaml index e0b4086..334e550 100644 --- a/.ci_support/linux_64_.yaml +++ b/.ci_support/linux_64_.yaml @@ -5,9 +5,9 @@ c_compiler_version: cdt_name: - cos6 channel_sources: -- conda-forge/label/llvm_rc,conda-forge +- conda-forge channel_targets: -- conda-forge llvm_rc +- conda-forge main cxx_compiler: - gxx cxx_compiler_version: diff --git a/.ci_support/osx_64_.yaml b/.ci_support/osx_64_.yaml deleted file mode 100644 index 8a9043a..0000000 --- a/.ci_support/osx_64_.yaml +++ /dev/null @@ -1,23 +0,0 @@ -MACOSX_DEPLOYMENT_TARGET: -- '10.13' -c_compiler: -- clang -c_compiler_version: -- '17' -channel_sources: -- conda-forge/label/llvm_rc,conda-forge -channel_targets: -- conda-forge llvm_rc -cxx_compiler: -- clangxx -cxx_compiler_version: -- '17' -macos_machine: -- x86_64-apple-darwin13.4.0 -target_platform: -- osx-64 -zip_keys: -- - c_compiler_version - - cxx_compiler_version -zlib: -- '1.2' diff --git a/.ci_support/win_64_.yaml b/.ci_support/win_64_.yaml index eb1ff89..c09f40f 100644 --- a/.ci_support/win_64_.yaml +++ b/.ci_support/win_64_.yaml @@ -1,9 +1,9 @@ c_compiler: - vs2019 channel_sources: -- conda-forge/label/llvm_rc,conda-forge +- conda-forge channel_targets: -- conda-forge llvm_rc +- conda-forge main cxx_compiler: - vs2019 target_platform: diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index f66daf5..528c69e 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @isuruf \ No newline at end of file +* @h-vetinari @isuruf \ No newline at end of file diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index 595f8b5..438ed2b 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 57bc95c..aff009f 100755 --- 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 deleted file mode 100755 index 5ef2a19..0000000 --- a/.scripts/run_osx_build.sh +++ /dev/null @@ -1,90 +0,0 @@ -#!/usr/bin/env bash - -# -*- 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 - -MINIFORGE_URL="https://github.com/conda-forge/miniforge/releases/latest/download" -MINIFORGE_FILE="Mambaforge-MacOSX-$(uname -m).sh" -curl -L -O "${MINIFORGE_URL}/${MINIFORGE_FILE}" -rm -rf ${MINIFORGE_HOME} -bash $MINIFORGE_FILE -b -p ${MINIFORGE_HOME} - -( endgroup "Installing a fresh version of Miniforge" ) 2> /dev/null - -( startgroup "Configuring conda" ) 2> /dev/null - -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 - - - -echo -e "\n\nSetting up the condarc and mangling the compiler." -setup_conda_rc ./ ./recipe ./.ci_support/${CONFIG}.yaml - -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 - - - -( endgroup "Configuring conda" ) 2> /dev/null - -echo -e "\n\nMaking the build clobber file" -make_build_number ./ ./recipe ./.ci_support/${CONFIG}.yaml - -if [[ -f LICENSE.txt ]]; then - cp LICENSE.txt "recipe/recipe-scripts-license.txt" -fi - -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 -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 -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}" ./ ./recipe ./.ci_support/${CONFIG}.yaml - fi - - ( endgroup "Uploading packages" ) 2> /dev/null -fi \ No newline at end of file diff --git a/.scripts/run_win_build.bat b/.scripts/run_win_build.bat new file mode 100644 index 0000000..c4486d9 --- /dev/null +++ b/.scripts/run_win_build.bat @@ -0,0 +1,112 @@ +:: 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" +) + +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 c2b9ba4..5c76b2d 100644 --- a/README.md +++ b/README.md @@ -35,13 +35,6 @@ Current build status variant - - osx_64 - - - variant - - win_64 @@ -64,7 +57,6 @@ Current release info | --- | --- | --- | --- | | [![Conda Recipe](https://img.shields.io/badge/recipe-flang-green.svg)](https://anaconda.org/conda-forge/flang) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/flang.svg)](https://anaconda.org/conda-forge/flang) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/flang.svg)](https://anaconda.org/conda-forge/flang) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/flang.svg)](https://anaconda.org/conda-forge/flang) | | [![Conda Recipe](https://img.shields.io/badge/recipe-flang_linux--64-green.svg)](https://anaconda.org/conda-forge/flang_linux-64) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/flang_linux-64.svg)](https://anaconda.org/conda-forge/flang_linux-64) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/flang_linux-64.svg)](https://anaconda.org/conda-forge/flang_linux-64) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/flang_linux-64.svg)](https://anaconda.org/conda-forge/flang_linux-64) | -| [![Conda Recipe](https://img.shields.io/badge/recipe-flang_osx--64-green.svg)](https://anaconda.org/conda-forge/flang_osx-64) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/flang_osx-64.svg)](https://anaconda.org/conda-forge/flang_osx-64) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/flang_osx-64.svg)](https://anaconda.org/conda-forge/flang_osx-64) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/flang_osx-64.svg)](https://anaconda.org/conda-forge/flang_osx-64) | | [![Conda Recipe](https://img.shields.io/badge/recipe-flang_win--64-green.svg)](https://anaconda.org/conda-forge/flang_win-64) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/flang_win-64.svg)](https://anaconda.org/conda-forge/flang_win-64) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/flang_win-64.svg)](https://anaconda.org/conda-forge/flang_win-64) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/flang_win-64.svg)](https://anaconda.org/conda-forge/flang_win-64) | | [![Conda Recipe](https://img.shields.io/badge/recipe-libflang-green.svg)](https://anaconda.org/conda-forge/libflang) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/libflang.svg)](https://anaconda.org/conda-forge/libflang) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/libflang.svg)](https://anaconda.org/conda-forge/libflang) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/libflang.svg)](https://anaconda.org/conda-forge/libflang) | | [![Conda Recipe](https://img.shields.io/badge/recipe-libfortran--main-green.svg)](https://anaconda.org/conda-forge/libfortran-main) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/libfortran-main.svg)](https://anaconda.org/conda-forge/libfortran-main) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/libfortran-main.svg)](https://anaconda.org/conda-forge/libfortran-main) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/libfortran-main.svg)](https://anaconda.org/conda-forge/libfortran-main) | @@ -79,16 +71,16 @@ conda config --add channels conda-forge conda config --set channel_priority strict ``` -Once the `conda-forge` channel has been enabled, `flang, flang_linux-64, flang_osx-64, flang_win-64, libflang, libfortran-main` can be installed with `conda`: +Once the `conda-forge` channel has been enabled, `flang, flang_linux-64, flang_win-64, libflang, libfortran-main` can be installed with `conda`: ``` -conda install flang flang_linux-64 flang_osx-64 flang_win-64 libflang libfortran-main +conda install flang flang_linux-64 flang_win-64 libflang libfortran-main ``` or with `mamba`: ``` -mamba install flang flang_linux-64 flang_osx-64 flang_win-64 libflang libfortran-main +mamba install flang flang_linux-64 flang_win-64 libflang libfortran-main ``` It is possible to list all of the versions of `flang` available on your platform with `conda`: @@ -183,5 +175,6 @@ In order to produce a uniquely identifiable distribution: Feedstock Maintainers ===================== +* [@h-vetinari](https://github.com/h-vetinari/) * [@isuruf](https://github.com/isuruf/) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6b346f5..baa1c2b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -4,5 +4,4 @@ jobs: - template: ./.azure-pipelines/azure-pipelines-linux.yml - - template: ./.azure-pipelines/azure-pipelines-win.yml - - template: ./.azure-pipelines/azure-pipelines-osx.yml \ No newline at end of file + - template: ./.azure-pipelines/azure-pipelines-win.yml \ No newline at end of file From 2b673ec6ea4b550f49e26fc8f6abd633db405911 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Wed, 27 Sep 2023 18:09:07 +1100 Subject: [PATCH 6/8] flang 17.0.1 --- recipe/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 62efc59..0c92a21 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,4 +1,4 @@ -{% set version = "17.0.0.rc3" %} +{% set version = "17.0.1" %} package: name: flang-split @@ -6,7 +6,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: 60493f4e974fcca7b739aea4901af2d957b0eaea34b42815359be59cf6c88fa2 + sha256: b0e42aafc01ece2ca2b42e3526f54bebc4b1f1dc8de6e34f46a0446a13e882b9 patches: # link compiler-rt libs (upstream's find_compiler_rt_library doesn't work correctly); # probably related to https://github.com/llvm/llvm-project/issues/63286 From 1a022402087c0e931b6e27faf64d48228f879847 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Wed, 27 Sep 2023 18:09:25 +1100 Subject: [PATCH 7/8] remove obsolete patches --- recipe/meta.yaml | 6 - ...ompiler-rt-builtins-on-windows-apple.patch | 41 ---- ...ime-build-with-AVOID_NATIVE_INT128_T.patch | 218 ------------------ 3 files changed, 265 deletions(-) delete mode 100644 recipe/patches/0001-always-link-in-compiler-rt-builtins-on-windows-apple.patch delete mode 100644 recipe/patches/0002-flang-Allow-runtime-build-with-AVOID_NATIVE_INT128_T.patch diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 0c92a21..e2265f2 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -7,12 +7,6 @@ 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: b0e42aafc01ece2ca2b42e3526f54bebc4b1f1dc8de6e34f46a0446a13e882b9 - patches: - # link compiler-rt libs (upstream's find_compiler_rt_library doesn't work correctly); - # probably related to https://github.com/llvm/llvm-project/issues/63286 - # - patches/0001-always-link-in-compiler-rt-builtins-on-windows-apple.patch - # backport https://reviews.llvm.org/D154660 - - patches/0002-flang-Allow-runtime-build-with-AVOID_NATIVE_INT128_T.patch build: number: 0 diff --git a/recipe/patches/0001-always-link-in-compiler-rt-builtins-on-windows-apple.patch b/recipe/patches/0001-always-link-in-compiler-rt-builtins-on-windows-apple.patch deleted file mode 100644 index 3af60b0..0000000 --- a/recipe/patches/0001-always-link-in-compiler-rt-builtins-on-windows-apple.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 1d75402d4382084b27b32e38c1591da253200507 Mon Sep 17 00:00:00 2001 -From: "H. Vetinari" -Date: Mon, 17 Apr 2023 23:38:48 +1100 -Subject: [PATCH 1/2] always link in compiler-rt builtins on windows & apple - -rather than patching HandleCompilerRT.cmake, we just -use the fact that we know where the library is located ---- - flang/CMakeLists.txt | 19 ++++++++++++++++--- - 1 file changed, 16 insertions(+), 3 deletions(-) - -diff --git a/flang/CMakeLists.txt b/flang/CMakeLists.txt -index ac30da89995..dd68d5b417c 100644 ---- a/flang/CMakeLists.txt -+++ b/flang/CMakeLists.txt -@@ -47,9 +47,22 @@ endif() - include(GNUInstallDirs) - - # MSVC + clang-cl build requires clang_rt.builtin.${target} library --if (MSVC AND CMAKE_CXX_COMPILER_ID MATCHES Clang) -- include(HandleCompilerRT) -- find_compiler_rt_library(builtins CLANG_RT_BUILTINS_LIBRARY) -+if (MSVC OR APPLE) -+ if (MSVC) -+ cmake_path(SET CLANG_RT_BUILTINS_LIBRARY -+ NORMALIZE -+ "$ENV{LIBRARY_LIB}/clang/$ENV{PKG_VERSION}/lib/windows/clang_rt.builtins-x86_64.lib") -+ else() -+ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64") -+ cmake_path(SET CLANG_RT_BUILTINS_LIBRARY -+ NORMALIZE -+ "$ENV{PREFIX}/lib/clang/$ENV{PKG_VERSION}/lib/libclang_rt.builtins_arm64_osx.a") -+ else() -+ cmake_path(SET CLANG_RT_BUILTINS_LIBRARY -+ NORMALIZE -+ "$ENV{PREFIX}/lib/clang/$ENV{PKG_VERSION}/lib/libclang_rt.builtins_x86_64_osx.a") -+ endif() -+ endif() - get_filename_component(LIBDIR "${CLANG_RT_BUILTINS_LIBRARY}" DIRECTORY) - if (IS_DIRECTORY "${LIBDIR}") - link_libraries(${CLANG_RT_BUILTINS_LIBRARY}) diff --git a/recipe/patches/0002-flang-Allow-runtime-build-with-AVOID_NATIVE_INT128_T.patch b/recipe/patches/0002-flang-Allow-runtime-build-with-AVOID_NATIVE_INT128_T.patch deleted file mode 100644 index d808901..0000000 --- a/recipe/patches/0002-flang-Allow-runtime-build-with-AVOID_NATIVE_INT128_T.patch +++ /dev/null @@ -1,218 +0,0 @@ -From 060ffd3f6425a1cfbc93a2a8b9c8f320f3d3d2d0 Mon Sep 17 00:00:00 2001 -From: Peter Klausler -Date: Thu, 6 Jul 2023 15:07:00 -0700 -Subject: [PATCH 2/2] [flang] Allow runtime build with AVOID_NATIVE_INT128_T=1 - ---- - flang/runtime/command.cpp | 10 +++++++--- - flang/runtime/io-api.cpp | 4 +++- - flang/runtime/numeric.cpp | 24 ++++++++++++------------ - flang/runtime/tools.h | 19 +++++++++++++++++-- - 4 files changed, 39 insertions(+), 18 deletions(-) - -diff --git a/flang/runtime/command.cpp b/flang/runtime/command.cpp -index 6c4f611daaa..b81a0791c5e 100644 ---- a/flang/runtime/command.cpp -+++ b/flang/runtime/command.cpp -@@ -107,9 +107,13 @@ static void StoreLengthToDescriptor( - } - - template struct FitsInIntegerKind { -- bool operator()(std::int64_t value) { -- return value <= std::numeric_limits>::max(); -+ bool operator()([[maybe_unused]] std::int64_t value) { -+ if constexpr (KIND >= 8) { -+ return true; -+ } else { -+ return value <= std::numeric_limits>::max(); -+ } - } - }; - -diff --git a/flang/runtime/io-api.cpp b/flang/runtime/io-api.cpp -index fe58bbc75f8..bf05c79ae8f 100644 ---- a/flang/runtime/io-api.cpp -+++ b/flang/runtime/io-api.cpp -@@ -1483,7 +1483,9 @@ static enum Iostat CheckUnitNumberInRangeImpl(INT unit, bool handleError, - // Only provide the bad unit number in the message if SignalError can print - // it accurately. Otherwise, the generic IostatUnitOverflow message will be - // used. -- if (static_cast(unit) == unit) { -+ if constexpr (sizeof(INT) > sizeof(std::intmax_t)) { -+ errorHandler.SignalError(IostatUnitOverflow); -+ } else if (static_cast(unit) == unit) { - errorHandler.SignalError(IostatUnitOverflow, - "UNIT number %jd is out of range", static_cast(unit)); - } else { -diff --git a/flang/runtime/numeric.cpp b/flang/runtime/numeric.cpp -index 5376bcb569f..21ee91a8681 100644 ---- a/flang/runtime/numeric.cpp -+++ b/flang/runtime/numeric.cpp -@@ -306,7 +306,7 @@ CppTypeFor RTNAME(Ceiling4_8)( - CppTypeFor x) { - return Ceiling>(x); - } --#ifdef __SIZEOF_INT128__ -+#if defined __SIZEOF_INT128__ && !AVOID_NATIVE_UINT128_T - CppTypeFor RTNAME(Ceiling4_16)( - CppTypeFor x) { - return Ceiling>(x); -@@ -328,7 +328,7 @@ CppTypeFor RTNAME(Ceiling8_8)( - CppTypeFor x) { - return Ceiling>(x); - } --#ifdef __SIZEOF_INT128__ -+#if defined __SIZEOF_INT128__ && !AVOID_NATIVE_UINT128_T - CppTypeFor RTNAME(Ceiling8_16)( - CppTypeFor x) { - return Ceiling>(x); -@@ -351,7 +351,7 @@ CppTypeFor RTNAME(Ceiling10_8)( - CppTypeFor x) { - return Ceiling>(x); - } --#ifdef __SIZEOF_INT128__ -+#if defined __SIZEOF_INT128__ && !AVOID_NATIVE_UINT128_T - CppTypeFor RTNAME(Ceiling10_16)( - CppTypeFor x) { - return Ceiling>(x); -@@ -374,7 +374,7 @@ CppTypeFor RTNAME(Ceiling16_8)( - CppTypeFor x) { - return Ceiling>(x); - } --#ifdef __SIZEOF_INT128__ -+#if defined __SIZEOF_INT128__ && !AVOID_NATIVE_UINT128_T - CppTypeFor RTNAME(Ceiling16_16)( - CppTypeFor x) { - return Ceiling>(x); -@@ -434,7 +434,7 @@ CppTypeFor RTNAME(Floor4_8)( - CppTypeFor x) { - return Floor>(x); - } --#ifdef __SIZEOF_INT128__ -+#if defined __SIZEOF_INT128__ && !AVOID_NATIVE_UINT128_T - CppTypeFor RTNAME(Floor4_16)( - CppTypeFor x) { - return Floor>(x); -@@ -456,7 +456,7 @@ CppTypeFor RTNAME(Floor8_8)( - CppTypeFor x) { - return Floor>(x); - } --#ifdef __SIZEOF_INT128__ -+#if defined __SIZEOF_INT128__ && !AVOID_NATIVE_UINT128_T - CppTypeFor RTNAME(Floor8_16)( - CppTypeFor x) { - return Floor>(x); -@@ -479,7 +479,7 @@ CppTypeFor RTNAME(Floor10_8)( - CppTypeFor x) { - return Floor>(x); - } --#ifdef __SIZEOF_INT128__ -+#if defined __SIZEOF_INT128__ && !AVOID_NATIVE_UINT128_T - CppTypeFor RTNAME(Floor10_16)( - CppTypeFor x) { - return Floor>(x); -@@ -502,7 +502,7 @@ CppTypeFor RTNAME(Floor16_8)( - CppTypeFor x) { - return Floor>(x); - } --#ifdef __SIZEOF_INT128__ -+#if defined __SIZEOF_INT128__ && !AVOID_NATIVE_UINT128_T - CppTypeFor RTNAME(Floor16_16)( - CppTypeFor x) { - return Floor>(x); -@@ -710,7 +710,7 @@ CppTypeFor RTNAME(Nint4_8)( - CppTypeFor x) { - return Nint>(x); - } --#ifdef __SIZEOF_INT128__ -+#if defined __SIZEOF_INT128__ && !AVOID_NATIVE_UINT128_T - CppTypeFor RTNAME(Nint4_16)( - CppTypeFor x) { - return Nint>(x); -@@ -732,7 +732,7 @@ CppTypeFor RTNAME(Nint8_8)( - CppTypeFor x) { - return Nint>(x); - } --#ifdef __SIZEOF_INT128__ -+#if defined __SIZEOF_INT128__ && !AVOID_NATIVE_UINT128_T - CppTypeFor RTNAME(Nint8_16)( - CppTypeFor x) { - return Nint>(x); -@@ -755,7 +755,7 @@ CppTypeFor RTNAME(Nint10_8)( - CppTypeFor x) { - return Nint>(x); - } --#ifdef __SIZEOF_INT128__ -+#if defined __SIZEOF_INT128__ && !AVOID_NATIVE_UINT128_T - CppTypeFor RTNAME(Nint10_16)( - CppTypeFor x) { - return Nint>(x); -@@ -778,7 +778,7 @@ CppTypeFor RTNAME(Nint16_8)( - CppTypeFor x) { - return Nint>(x); - } --#ifdef __SIZEOF_INT128__ -+#if defined __SIZEOF_INT128__ && !AVOID_NATIVE_UINT128_T - CppTypeFor RTNAME(Nint16_16)( - CppTypeFor x) { - return Nint>(x); -diff --git a/flang/runtime/tools.h b/flang/runtime/tools.h -index d22093a2ada..72d14982ce4 100644 ---- a/flang/runtime/tools.h -+++ b/flang/runtime/tools.h -@@ -131,7 +131,7 @@ inline RT_API_ATTRS RESULT ApplyType( - return FUNC{}(std::forward(x)...); - case 8: - return FUNC{}(std::forward(x)...); --#ifdef __SIZEOF_INT128__ -+#if defined __SIZEOF_INT128__ && !AVOID_NATIVE_UINT128_T - case 16: - return FUNC{}(std::forward(x)...); - #endif -@@ -230,7 +230,7 @@ inline RT_API_ATTRS RESULT ApplyIntegerKind( - return FUNC<4>{}(std::forward(x)...); - case 8: - return FUNC<8>{}(std::forward(x)...); --#ifdef __SIZEOF_INT128__ -+#if defined __SIZEOF_INT128__ && !AVOID_NATIVE_UINT128_T - case 16: - return FUNC<16>{}(std::forward(x)...); - #endif -@@ -310,6 +310,11 @@ std::optional> inline constexpr GetResultType( - return std::make_pair(TypeCategory::Integer, maxKind); - case TypeCategory::Real: - case TypeCategory::Complex: -+#if !(defined __SIZEOF_INT128__ && !AVOID_NATIVE_UINT128_T) -+ if (xKind == 16) { -+ break; -+ } -+#endif - return std::make_pair(yCat, yKind); - default: - break; -@@ -318,6 +323,11 @@ std::optional> inline constexpr GetResultType( - case TypeCategory::Real: - switch (yCat) { - case TypeCategory::Integer: -+#if !(defined __SIZEOF_INT128__ && !AVOID_NATIVE_UINT128_T) -+ if (yKind == 16) { -+ break; -+ } -+#endif - return std::make_pair(TypeCategory::Real, xKind); - case TypeCategory::Real: - case TypeCategory::Complex: -@@ -329,6 +339,11 @@ std::optional> inline constexpr GetResultType( - case TypeCategory::Complex: - switch (yCat) { - case TypeCategory::Integer: -+#if !(defined __SIZEOF_INT128__ && !AVOID_NATIVE_UINT128_T) -+ if (yKind == 16) { -+ break; -+ } -+#endif - return std::make_pair(TypeCategory::Complex, xKind); - case TypeCategory::Real: - case TypeCategory::Complex: From 80eb7437cef93ec5dc6c7dbe5550b1b4e03c46c2 Mon Sep 17 00:00:00 2001 From: regro-cf-autotick-bot <36490558+regro-cf-autotick-bot@users.noreply.github.com> Date: Tue, 3 Oct 2023 09:12:22 +0000 Subject: [PATCH 8/8] updated v17.0.2 --- recipe/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index e2265f2..e1cb443 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,4 +1,4 @@ -{% set version = "17.0.1" %} +{% set version = "17.0.2" %} package: name: flang-split @@ -6,7 +6,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: b0e42aafc01ece2ca2b42e3526f54bebc4b1f1dc8de6e34f46a0446a13e882b9 + sha256: 351562b14d42fcefcbf00cc1f327680a1062bbbf67a1e1ca6acb64c473b06394 build: number: 0