From 04d05c1d8e2492eaecbab335d6cde8e0d90c43c4 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Sat, 2 Mar 2024 17:02:10 +0000 Subject: [PATCH 01/23] Add a package for v1.2.0 --- recipe/meta.yaml | 10 ++-- ...-cppinterop-Add-missing-dependencies.patch | 17 ------ ...2-cppinterop-Move-cmake-config-files.patch | 45 ---------------- ...nterop-Fix-Cmake-package-return-info.patch | 53 ------------------- 4 files changed, 3 insertions(+), 122 deletions(-) delete mode 100644 recipe/patches/cppinterop/cppinterop-1.1.0-0001-cppinterop-Add-missing-dependencies.patch delete mode 100644 recipe/patches/cppinterop/cppinterop-1.1.0-0002-cppinterop-Move-cmake-config-files.patch delete mode 100644 recipe/patches/cppinterop/cppinterop-1.1.0-0003-cppinterop-Fix-Cmake-package-return-info.patch diff --git a/recipe/meta.yaml b/recipe/meta.yaml index baa17c2..5e8a93d 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,6 +1,6 @@ {% set name = "CppInterOp" %} -{% set build_number = 1 %} -{% set version = "1.1.0" %} +{% set build_number = 0 %} +{% set version = "1.2.0" %} {% set revision_tag = "v"+version %} package: @@ -9,12 +9,8 @@ package: source: - url: https://github.com/compiler-research/CppInterOp/archive/refs/tags/{{ revision_tag }}.tar.gz - sha256: 29377ba4fecd82395efd2fefcaa911fe72396d78293607852bd0e9b9ab65d1dc + sha256: b3cf25f500624fe12ffc40f858a04c46daea808298e64d924b594eb35ca1c806 folder: cppinterop - patches: - - patches/cppinterop/cppinterop-1.1.0-0001-cppinterop-Add-missing-dependencies.patch - - path: patches - folder: add_patches build: skip: true # [win] diff --git a/recipe/patches/cppinterop/cppinterop-1.1.0-0001-cppinterop-Add-missing-dependencies.patch b/recipe/patches/cppinterop/cppinterop-1.1.0-0001-cppinterop-Add-missing-dependencies.patch deleted file mode 100644 index 81151cd..0000000 --- a/recipe/patches/cppinterop/cppinterop-1.1.0-0001-cppinterop-Add-missing-dependencies.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/lib/Interpreter/CMakeLists.txt b/lib/Interpreter/CMakeLists.txt -index 5c0b2730..028ee567 100644 ---- a/lib/Interpreter/CMakeLists.txt -+++ b/lib/Interpreter/CMakeLists.txt -@@ -76,6 +76,12 @@ if (LLVM_LINK_LLVM_DYLIB) - FrontendHLSL - LTO - ) -+ # We will need to append the missing dependencies to pull in the right -+ # LLVM library dependencies. -+ list(APPEND link_libs -+ clangCodeGen -+ clangStaticAnalyzerCore -+ ) - endif(LLVM_LINK_LLVM_DYLIB) - - add_llvm_library(clangCppInterOp diff --git a/recipe/patches/cppinterop/cppinterop-1.1.0-0002-cppinterop-Move-cmake-config-files.patch b/recipe/patches/cppinterop/cppinterop-1.1.0-0002-cppinterop-Move-cmake-config-files.patch deleted file mode 100644 index 95dd872..0000000 --- a/recipe/patches/cppinterop/cppinterop-1.1.0-0002-cppinterop-Move-cmake-config-files.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 2e215b73..6b85b2c0 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -319,15 +319,15 @@ set(CPPINTEROP_VERSION_MINOR "${CMAKE_MATCH_2}") - set(CPPINTEROP_VERSION_PATCH "${CMAKE_MATCH_3}") - - configure_file( -- ${CMAKE_CURRENT_SOURCE_DIR}/cmake/CppInterOpConfig.cmake.in -- ${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/CppInterOpConfig.cmake -+ ${CMAKE_CURRENT_SOURCE_DIR}/cmake/CppInterOp/CppInterOpConfig.cmake.in -+ ${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/CppInterOp/CppInterOpConfig.cmake - @ONLY) - configure_file( -- ${CMAKE_CURRENT_SOURCE_DIR}/cmake/CppInterOpConfigVersion.cmake.in -- ${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/CppInterOpConfigVersion.cmake -+ ${CMAKE_CURRENT_SOURCE_DIR}/cmake/CppInterOp/CppInterOpConfigVersion.cmake.in -+ ${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/CppInterOp/CppInterOpConfigVersion.cmake - @ONLY) --install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/ -- DESTINATION lib/cmake -+install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/CppInterOp -+ DESTINATION lib/cmake/CppInterOp - FILES_MATCHING - PATTERN "*.cmake" - ) -diff --git a/cmake/CppInterOpConfig.cmake.in b/cmake/CppInterOp/CppInterOpConfig.cmake.in -similarity index 93% -rename from cmake/CppInterOpConfig.cmake.in -rename to cmake/CppInterOp/CppInterOpConfig.cmake.in -index 29e3fb20..f1bc63de 100644 ---- a/cmake/CppInterOpConfig.cmake.in -+++ b/cmake/CppInterOp/CppInterOpConfig.cmake.in -@@ -4,6 +4,7 @@ - get_filename_component(CPPINTEROP_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) - get_filename_component(CPPINTEROP_INSTALL_PREFIX "${CPPINTEROP_INSTALL_PREFIX}" PATH) - get_filename_component(CPPINTEROP_INSTALL_PREFIX "${CPPINTEROP_INSTALL_PREFIX}" PATH) -+get_filename_component(CPPINTEROP_INSTALL_PREFIX "${CPPINTEROP_INSTALL_PREFIX}" PATH) - - ### build/install workaround - -diff --git a/cmake/CppInterOpConfigVersion.cmake.in b/cmake/CppInterOp/CppInterOpConfigVersion.cmake.in -similarity index 100% -rename from cmake/CppInterOpConfigVersion.cmake.in -rename to cmake/CppInterOp/CppInterOpConfigVersion.cmake.in diff --git a/recipe/patches/cppinterop/cppinterop-1.1.0-0003-cppinterop-Fix-Cmake-package-return-info.patch b/recipe/patches/cppinterop/cppinterop-1.1.0-0003-cppinterop-Fix-Cmake-package-return-info.patch deleted file mode 100644 index 2fc2dac..0000000 --- a/recipe/patches/cppinterop/cppinterop-1.1.0-0003-cppinterop-Fix-Cmake-package-return-info.patch +++ /dev/null @@ -1,53 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6b85b2c0..d8b340a4 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -312,7 +312,7 @@ include_directories(BEFORE SYSTEM - ) - - --file(READ "VERSION" CPPINTEROP_VERSION) -+file(STRINGS "VERSION" CPPINTEROP_VERSION) - string(REGEX MATCH "([0-9]*)\.([0-9]*)\.([0-9]*)" CPPINTEROP_VERSION_ONLY "${CPPINTEROP_VERSION}") - set(CPPINTEROP_VERSION_MAJOR "${CMAKE_MATCH_1}") - set(CPPINTEROP_VERSION_MINOR "${CMAKE_MATCH_2}") -diff --git a/cmake/CppInterOp/CppInterOpConfig.cmake.in b/cmake/CppInterOp/CppInterOpConfig.cmake.in -index f1bc63de..51f59ef0 100644 ---- a/cmake/CppInterOp/CppInterOpConfig.cmake.in -+++ b/cmake/CppInterOp/CppInterOpConfig.cmake.in -@@ -10,14 +10,16 @@ get_filename_component(CPPINTEROP_INSTALL_PREFIX "${CPPINTEROP_INSTALL_PREFIX}" - - if (IS_DIRECTORY "${CPPINTEROP_INSTALL_PREFIX}/include") - set(_include "${CPPINTEROP_INSTALL_PREFIX}/include") -+ set(_libs "${CPPINTEROP_INSTALL_PREFIX}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}clangCppInterOp${CMAKE_SHARED_LIBRARY_SUFFIX}") - else() - set(_include "@CMAKE_CURRENT_SOURCE_DIR@/include") -+ set(_libs "@CMAKE_CURRENT_SOURCE_DIR@/lib/${CMAKE_SHARED_LIBRARY_PREFIX}clangCppInterOp${CMAKE_SHARED_LIBRARY_SUFFIX}") - endif() - --if (IS_DIRECTORY "${CPPINTEROP_INSTALL_PREFIX}/cmake") -- set(_cmake "${CPPINTEROP_INSTALL_PREFIX}/cmake") -+if (IS_DIRECTORY "${CPPINTEROP_INSTALL_PREFIX}/lib/cmake/CppInterOp") -+ set(_cmake "${CPPINTEROP_INSTALL_PREFIX}/lib/cmake/CppInterOp") - else() -- set(_cmake "@CMAKE_CURRENT_SOURCE_DIR@/cmake") -+ set(_cmake "@CMAKE_CURRENT_SOURCE_DIR@/cmake/CppInterOp") - endif() - - ### -@@ -25,11 +27,13 @@ endif() - set(CPPINTEROP_EXPORTED_TARGETS "clangCppInterOp") - set(CPPINTEROP_CMAKE_DIR "${_cmake}") - set(CPPINTEROP_INCLUDE_DIRS "${_include}") -+set(CPPINTEROP_LIBRARIES "${_libs}") - - # Provide all our library targets to users. - add_library(clangCppInterOp SHARED IMPORTED) --set_property(TARGET clangCppInterOp PROPERTY IMPORTED_LOCATION "${CPPINTEROP_DIR}/lib/libclangCppInterOp.so") - set_property(TARGET clangCppInterOp PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${_include}") -+set_property(TARGET clangCppInterOp PROPERTY IMPORTED_LOCATION "${_libs}") - --unset(_include) - unset(_cmake) -+unset(_include) -+unset(_libs) From 34df7a11fb3ad4de609ab2e3a31bb24e548277be Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Sat, 2 Mar 2024 17:30:06 +0000 Subject: [PATCH 02/23] Enable windows --- recipe/bld.bat | 2 +- recipe/meta.yaml | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/recipe/bld.bat b/recipe/bld.bat index 30e11bd..833590f 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -1,7 +1,7 @@ rem # Common settings set CPU_COUNT=%NUMBER_OF_PROCESSORS% -set PATH="%PATH%;%BUILD_PREFIX%/x86_64-conda-linux-gnu/lib;%BUILD_PREFIX/lib;%PREFIX/lib" +set PATH="%PREFIX%\Library\bin;%PATH%;%BUILD_PREFIX%/x86_64-conda-linux-gnu/lib;%BUILD_PREFIX/lib;%PREFIX/lib" set INCLUDE="%INCLUDE%;%cd%/include;%BUILD_PREFIX/x86_64-conda-linux-gnu/include/c++/12.3.0;%BUILD_PREFIX%/x86_64-conda-linux-gnu/include/c++/12.3.0/x86_64-conda-linux-gnu;%BUILD_PREFIX%/x86_64-conda-linux-gnu/sysroot/usr/include;%BUILD_PREFIX%/include;%PREFIX%/include" rem ### Build CppInterOp next to llvm-project. diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 5e8a93d..416a8cc 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -13,7 +13,6 @@ source: folder: cppinterop build: - skip: true # [win] number: {{ build_number }} string: clang{{ (clangdev or "None").split(".")[0] }}_repl_h{{ PKG_HASH }}_{{ build_number }} @@ -24,7 +23,6 @@ requirements: - make # [unix] - ninja # [win] - {{ compiler('cxx') }} - - wget - llvm {{ clangdev }} - llvmdev {{ clangdev }} - clangdev {{ clangdev }} From 204fce503914a6292a969c0cdb6c5d0cd18be963 Mon Sep 17 00:00:00 2001 From: "conda-forge-webservices[bot]" <91080706+conda-forge-webservices[bot]@users.noreply.github.com> Date: Sat, 2 Mar 2024 18:31:37 +0000 Subject: [PATCH 03/23] MNT: Re-rendered with conda-build 24.1.2, conda-smithy 3.31.1, and conda-forge-pinning 2024.03.02.16.55.54 --- .azure-pipelines/azure-pipelines-win.yml | 52 ++++++++++ .ci_support/linux_64_.yaml | 2 +- .ci_support/osx_64_.yaml | 2 +- .ci_support/win_64_.yaml | 16 +++ .gitignore | 5 +- .scripts/build_steps.sh | 6 +- .scripts/run_osx_build.sh | 6 +- .scripts/run_win_build.bat | 120 +++++++++++++++++++++++ README.md | 11 ++- azure-pipelines.yml | 1 + build-locally.py | 5 +- 11 files changed, 212 insertions(+), 14 deletions(-) create mode 100755 .azure-pipelines/azure-pipelines-win.yml create mode 100644 .ci_support/win_64_.yaml create mode 100755 .scripts/run_win_build.bat diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml new file mode 100755 index 0000000..d609fcd --- /dev/null +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -0,0 +1,52 @@ +# 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: win + pool: + vmImage: windows-2022 + strategy: + matrix: + win_64_: + CONFIG: win_64_ + UPLOAD_PACKAGES: 'True' + timeoutInMinutes: 360 + variables: + CONDA_BLD_PATH: D:\\bld\\ + UPLOAD_TEMP: D:\\tmp + + steps: + + - task: PythonScript@0 + displayName: 'Download Miniforge' + inputs: + scriptSource: inline + script: | + import urllib.request + url = 'https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Windows-x86_64.exe' + path = r"$(Build.ArtifactStagingDirectory)/Miniforge.exe" + urllib.request.urlretrieve(url, path) + + - script: | + start /wait "" %BUILD_ARTIFACTSTAGINGDIRECTORY%\Miniforge.exe /InstallationType=JustMe /RegisterPython=0 /S /D=C:\Miniforge + displayName: Install Miniforge + + - powershell: Write-Host "##vso[task.prependpath]C:\Miniforge\Scripts" + displayName: Add conda to PATH + + - script: | + call ".scripts\run_win_build.bat" + displayName: Run Windows build + env: + PYTHONUNBUFFERED: 1 + CONFIG: $(CONFIG) + CI: azure + flow_run_id: azure_$(Build.BuildNumber).$(System.JobAttempt) + remote_url: $(Build.Repository.Uri) + sha: $(Build.SourceVersion) + UPLOAD_PACKAGES: $(UPLOAD_PACKAGES) + UPLOAD_TEMP: $(UPLOAD_TEMP) + BINSTAR_TOKEN: $(BINSTAR_TOKEN) + FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) + 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 540e4b7..7b0d70d 100644 --- a/.ci_support/linux_64_.yaml +++ b/.ci_support/linux_64_.yaml @@ -13,7 +13,7 @@ cxx_compiler_version: docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 libxml2: -- '2.12' +- '2' target_platform: - linux-64 zlib: diff --git a/.ci_support/osx_64_.yaml b/.ci_support/osx_64_.yaml index 6b3149b..3d28826 100644 --- a/.ci_support/osx_64_.yaml +++ b/.ci_support/osx_64_.yaml @@ -13,7 +13,7 @@ cxx_compiler: cxx_compiler_version: - '16' libxml2: -- '2.12' +- '2' macos_machine: - x86_64-apple-darwin13.4.0 target_platform: diff --git a/.ci_support/win_64_.yaml b/.ci_support/win_64_.yaml new file mode 100644 index 0000000..8dafe89 --- /dev/null +++ b/.ci_support/win_64_.yaml @@ -0,0 +1,16 @@ +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +clangdev: +- 17.* +cxx_compiler: +- vs2019 +libxml2: +- '2' +target_platform: +- win-64 +zlib: +- '1.2' +zstd: +- '1.5' diff --git a/.gitignore b/.gitignore index 62bf059..179afe5 100644 --- a/.gitignore +++ b/.gitignore @@ -7,8 +7,9 @@ * !/conda-forge.yml -# Don't ignore any subfolders if the parent folder is 'un-ignored' -!/*/ +# Don't ignore any files/folders if the parent folder is 'un-ignored' +# This also avoids warnings when adding an already-checked file with an ignored parent. +!/**/ # Don't ignore any files/folders recursively in the following folders !/recipe/** !/.ci_support/** diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index f017291..a4d638b 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -34,9 +34,9 @@ CONDARC export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1 mamba install --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ - pip mamba conda-build boa conda-forge-ci-setup=4 + pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ - pip mamba conda-build boa conda-forge-ci-setup=4 + pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" # set up the condarc setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" @@ -65,7 +65,7 @@ if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then # Drop into an interactive shell /bin/bash else - conda mambabuild "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ + conda build "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ --suppress-variables ${EXTRA_CB_OPTIONS:-} \ --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" \ --extra-meta flow_run_id="${flow_run_id:-}" remote_url="${remote_url:-}" sha="${sha:-}" diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index 1fa8468..2879be2 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -26,9 +26,9 @@ export CONDA_SOLVER="libmamba" export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1 mamba install --update-specs --quiet --yes --channel conda-forge --strict-channel-priority \ - pip mamba conda-build boa conda-forge-ci-setup=4 + pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ - pip mamba conda-build boa conda-forge-ci-setup=4 + pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" @@ -77,7 +77,7 @@ if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then /bin/bash else - conda mambabuild ./recipe -m ./.ci_support/${CONFIG}.yaml \ + conda build ./recipe -m ./.ci_support/${CONFIG}.yaml \ --suppress-variables ${EXTRA_CB_OPTIONS:-} \ --clobber-file ./.ci_support/clobber_${CONFIG}.yaml \ --extra-meta flow_run_id="$flow_run_id" remote_url="$remote_url" sha="$sha" diff --git a/.scripts/run_win_build.bat b/.scripts/run_win_build.bat new file mode 100755 index 0000000..a5871f6 --- /dev/null +++ b/.scripts/run_win_build.bat @@ -0,0 +1,120 @@ +:: 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 +:: Configure the solver +set "CONDA_SOLVER=libmamba" +if !errorlevel! neq 0 exit /b !errorlevel! +set "CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1" + +:: Provision the necessary dependencies to build the recipe later +echo Installing dependencies +mamba.exe install "python=3.10" pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" -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 [%flow_run_id%] == [] ( + set "EXTRA_CB_OPTIONS=%EXTRA_CB_OPTIONS% --extra-meta flow_run_id=%flow_run_id% remote_url=%remote_url% sha=%sha%" +) + +call :end_group + +:: Build the recipe +echo Building recipe +conda.exe build "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 b676f0d..bc54a54 100644 --- a/README.md +++ b/README.md @@ -11,9 +11,9 @@ Summary: The CppInterOp library provides a minimalist approach for other languag to interoperate with C++ entities. -Development: https://cppinterop.readthedocs.io/en/1.1.0/DevelopersDocumentation.html +Development: https://cppinterop.readthedocs.io/en/1.2.0/DevelopersDocumentation.html -Documentation: https://cppinterop.readthedocs.io/en/1.1.0 +Documentation: https://cppinterop.readthedocs.io/en/1.2.0 CppInterOp exposes API from Clang and LLVM in a backward compatibe way. The API support downstream tools that utilize interactive C++ by using @@ -55,6 +55,13 @@ Current build status variant + + win_64 + + + variant + + diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 33a441c..6b346f5 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -4,4 +4,5 @@ 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 diff --git a/build-locally.py b/build-locally.py index 3f4b7a7..e0d408d 100755 --- a/build-locally.py +++ b/build-locally.py @@ -64,8 +64,9 @@ def verify_config(ns): elif ns.config.startswith("osx"): if "OSX_SDK_DIR" not in os.environ: raise RuntimeError( - "Need OSX_SDK_DIR env variable set. Run 'export OSX_SDK_DIR=SDKs' " - "to download the SDK automatically to 'SDKs/MacOSX.sdk'. " + "Need OSX_SDK_DIR env variable set. Run 'export OSX_SDK_DIR=$PWD/SDKs' " + "to download the SDK automatically to '$PWD/SDKs/MacOSX.sdk'. " + "Note: OSX_SDK_DIR must be set to an absolute path. " "Setting this variable implies agreement to the licensing terms of the SDK by Apple." ) From 54ebcda00940fa59fff3673ddfe52da00d057ef0 Mon Sep 17 00:00:00 2001 From: Alexander Penev <7923188+alexander-penev@users.noreply.github.com> Date: Sat, 2 Mar 2024 21:40:37 +0200 Subject: [PATCH 04/23] Update bld.bat --- recipe/bld.bat | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipe/bld.bat b/recipe/bld.bat index 833590f..72a4fce 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -1,5 +1,8 @@ rem # Common settings +set +dir + set CPU_COUNT=%NUMBER_OF_PROCESSORS% set PATH="%PREFIX%\Library\bin;%PATH%;%BUILD_PREFIX%/x86_64-conda-linux-gnu/lib;%BUILD_PREFIX/lib;%PREFIX/lib" set INCLUDE="%INCLUDE%;%cd%/include;%BUILD_PREFIX/x86_64-conda-linux-gnu/include/c++/12.3.0;%BUILD_PREFIX%/x86_64-conda-linux-gnu/include/c++/12.3.0/x86_64-conda-linux-gnu;%BUILD_PREFIX%/x86_64-conda-linux-gnu/sysroot/usr/include;%BUILD_PREFIX%/include;%PREFIX%/include" From 89a98873eaeaf8cd09694a5c50e4c62f64260388 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Sat, 2 Mar 2024 19:57:02 +0000 Subject: [PATCH 05/23] add verbosity --- recipe/bld.bat | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipe/bld.bat b/recipe/bld.bat index 72a4fce..f494056 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -1,3 +1,5 @@ +@echo on + rem # Common settings set From f9fa414681b3357fd9e760b99dee89ef90527d29 Mon Sep 17 00:00:00 2001 From: Alexander Penev <7923188+alexander-penev@users.noreply.github.com> Date: Sat, 2 Mar 2024 22:18:09 +0200 Subject: [PATCH 06/23] Update bld.bat --- recipe/bld.bat | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/recipe/bld.bat b/recipe/bld.bat index f494056..48a80de 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -2,8 +2,12 @@ rem # Common settings -set -dir +echo "-------------" +dir /S %PREFIX%\Library\bin +echo "-------------" +dir /S %PREFIX% +echo "-------------" +dir /S %BUILD_PREFIX% set CPU_COUNT=%NUMBER_OF_PROCESSORS% set PATH="%PREFIX%\Library\bin;%PATH%;%BUILD_PREFIX%/x86_64-conda-linux-gnu/lib;%BUILD_PREFIX/lib;%PREFIX/lib" From cd7ef57f70954562c6d47f9d8254962b0fa8c2a3 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Sat, 2 Mar 2024 20:18:31 +0000 Subject: [PATCH 07/23] Build prefix --- recipe/bld.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/bld.bat b/recipe/bld.bat index 48a80de..8a02b2b 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -10,7 +10,7 @@ echo "-------------" dir /S %BUILD_PREFIX% set CPU_COUNT=%NUMBER_OF_PROCESSORS% -set PATH="%PREFIX%\Library\bin;%PATH%;%BUILD_PREFIX%/x86_64-conda-linux-gnu/lib;%BUILD_PREFIX/lib;%PREFIX/lib" +set PATH="%BUILD_PREFIX%\Library\bin;%PATH%;%BUILD_PREFIX%/x86_64-conda-linux-gnu/lib;%BUILD_PREFIX/lib;%PREFIX/lib" set INCLUDE="%INCLUDE%;%cd%/include;%BUILD_PREFIX/x86_64-conda-linux-gnu/include/c++/12.3.0;%BUILD_PREFIX%/x86_64-conda-linux-gnu/include/c++/12.3.0/x86_64-conda-linux-gnu;%BUILD_PREFIX%/x86_64-conda-linux-gnu/sysroot/usr/include;%BUILD_PREFIX%/include;%PREFIX%/include" rem ### Build CppInterOp next to llvm-project. From 51d208c46d0fd9ac38da7ab53e6360f07b67e330 Mon Sep 17 00:00:00 2001 From: Alexander Penev <7923188+alexander-penev@users.noreply.github.com> Date: Sat, 2 Mar 2024 22:52:51 +0200 Subject: [PATCH 08/23] Update bld.bat --- recipe/bld.bat | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/recipe/bld.bat b/recipe/bld.bat index 8a02b2b..6c862c1 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -1,14 +1,7 @@ -@echo on +rem @echo on rem # Common settings -echo "-------------" -dir /S %PREFIX%\Library\bin -echo "-------------" -dir /S %PREFIX% -echo "-------------" -dir /S %BUILD_PREFIX% - set CPU_COUNT=%NUMBER_OF_PROCESSORS% set PATH="%BUILD_PREFIX%\Library\bin;%PATH%;%BUILD_PREFIX%/x86_64-conda-linux-gnu/lib;%BUILD_PREFIX/lib;%PREFIX/lib" set INCLUDE="%INCLUDE%;%cd%/include;%BUILD_PREFIX/x86_64-conda-linux-gnu/include/c++/12.3.0;%BUILD_PREFIX%/x86_64-conda-linux-gnu/include/c++/12.3.0/x86_64-conda-linux-gnu;%BUILD_PREFIX%/x86_64-conda-linux-gnu/sysroot/usr/include;%BUILD_PREFIX%/include;%PREFIX%/include" @@ -19,6 +12,8 @@ pushd cppinterop mkdir build cd build +echo "--- 1 ---" + cmake ^ -G "Ninja" ^ %CMAKE_ARGS% ^ @@ -28,10 +23,16 @@ cmake ^ -DCPPINTEROP_ENABLE_TESTING=ON ^ .. +echo "--- 2 ---" + ninja -j%CPU_COUNT% check-cppinterop rem if errorlevel 1 exit 1 +echo "--- 3 ---" + ninja install if errorlevel 1 exit 1 +echo "--- 4 ---" + popd From 22b321d7a605322399a6ec2e9341e1cfdf89f36f Mon Sep 17 00:00:00 2001 From: Alexander Penev <7923188+alexander-penev@users.noreply.github.com> Date: Sat, 2 Mar 2024 23:07:00 +0200 Subject: [PATCH 09/23] Update bld.bat --- recipe/bld.bat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipe/bld.bat b/recipe/bld.bat index 6c862c1..41143a8 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -1,9 +1,9 @@ -rem @echo on +@echo on rem # Common settings set CPU_COUNT=%NUMBER_OF_PROCESSORS% -set PATH="%BUILD_PREFIX%\Library\bin;%PATH%;%BUILD_PREFIX%/x86_64-conda-linux-gnu/lib;%BUILD_PREFIX/lib;%PREFIX/lib" +set PATH="%BUILD_PREFIX%\Library\bin;%PREFIX%\Library\bin;%PATH%;%BUILD_PREFIX%/x86_64-conda-linux-gnu/lib;%BUILD_PREFIX/lib;%PREFIX/lib" set INCLUDE="%INCLUDE%;%cd%/include;%BUILD_PREFIX/x86_64-conda-linux-gnu/include/c++/12.3.0;%BUILD_PREFIX%/x86_64-conda-linux-gnu/include/c++/12.3.0/x86_64-conda-linux-gnu;%BUILD_PREFIX%/x86_64-conda-linux-gnu/sysroot/usr/include;%BUILD_PREFIX%/include;%PREFIX%/include" rem ### Build CppInterOp next to llvm-project. From 569f9c63b61f4f4cd2d3be678a5aa12bac910c5d Mon Sep 17 00:00:00 2001 From: Alexander Penev <7923188+alexander-penev@users.noreply.github.com> Date: Sun, 3 Mar 2024 08:05:42 +0200 Subject: [PATCH 10/23] Update bld.bat --- recipe/bld.bat | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/recipe/bld.bat b/recipe/bld.bat index 41143a8..61ee10b 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -14,6 +14,11 @@ cd build echo "--- 1 ---" +echo "%PATH%" + +dir %BUILD_PREFIX%\Library\bin +dir %PREFIX%\Library\bin + cmake ^ -G "Ninja" ^ %CMAKE_ARGS% ^ From 47b25eb8d50eccd5fcbafbde424fba8d998b63b7 Mon Sep 17 00:00:00 2001 From: Alexander Penev <7923188+alexander-penev@users.noreply.github.com> Date: Sun, 3 Mar 2024 08:45:52 +0200 Subject: [PATCH 11/23] Update bld.bat --- recipe/bld.bat | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/recipe/bld.bat b/recipe/bld.bat index 61ee10b..f73f1ea 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -3,8 +3,8 @@ rem # Common settings set CPU_COUNT=%NUMBER_OF_PROCESSORS% -set PATH="%BUILD_PREFIX%\Library\bin;%PREFIX%\Library\bin;%PATH%;%BUILD_PREFIX%/x86_64-conda-linux-gnu/lib;%BUILD_PREFIX/lib;%PREFIX/lib" -set INCLUDE="%INCLUDE%;%cd%/include;%BUILD_PREFIX/x86_64-conda-linux-gnu/include/c++/12.3.0;%BUILD_PREFIX%/x86_64-conda-linux-gnu/include/c++/12.3.0/x86_64-conda-linux-gnu;%BUILD_PREFIX%/x86_64-conda-linux-gnu/sysroot/usr/include;%BUILD_PREFIX%/include;%PREFIX%/include" +set PATH="%BUILD_PREFIX%/Library/bin;%PREFIX%/Library/bin;%PATH%;%BUILD_PREFIX%/x86_64-conda-linux-gnu/lib;%BUILD_PREFIX%/lib;%PREFIX%/lib" +set INCLUDE="%INCLUDE%;%cd%/include;%BUILD_PREFIX%/x86_64-conda-linux-gnu/include/c++/12.3.0;%BUILD_PREFIX%/x86_64-conda-linux-gnu/include/c++/12.3.0/x86_64-conda-linux-gnu;%BUILD_PREFIX%/x86_64-conda-linux-gnu/sysroot/usr/include;%BUILD_PREFIX%/include;%PREFIX%/include" rem ### Build CppInterOp next to llvm-project. @@ -12,13 +12,6 @@ pushd cppinterop mkdir build cd build -echo "--- 1 ---" - -echo "%PATH%" - -dir %BUILD_PREFIX%\Library\bin -dir %PREFIX%\Library\bin - cmake ^ -G "Ninja" ^ %CMAKE_ARGS% ^ @@ -28,16 +21,10 @@ cmake ^ -DCPPINTEROP_ENABLE_TESTING=ON ^ .. -echo "--- 2 ---" - -ninja -j%CPU_COUNT% check-cppinterop +rem ninja -j%CPU_COUNT% check-cppinterop rem if errorlevel 1 exit 1 -echo "--- 3 ---" - ninja install if errorlevel 1 exit 1 -echo "--- 4 ---" - popd From c8ced74dbc8fc92785c37d4ebb86f16694786298 Mon Sep 17 00:00:00 2001 From: Alexander Penev <7923188+alexander-penev@users.noreply.github.com> Date: Sun, 3 Mar 2024 09:03:37 +0200 Subject: [PATCH 12/23] Update bld.bat --- recipe/bld.bat | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/recipe/bld.bat b/recipe/bld.bat index f73f1ea..ee92e79 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -3,8 +3,8 @@ rem # Common settings set CPU_COUNT=%NUMBER_OF_PROCESSORS% -set PATH="%BUILD_PREFIX%/Library/bin;%PREFIX%/Library/bin;%PATH%;%BUILD_PREFIX%/x86_64-conda-linux-gnu/lib;%BUILD_PREFIX%/lib;%PREFIX%/lib" -set INCLUDE="%INCLUDE%;%cd%/include;%BUILD_PREFIX%/x86_64-conda-linux-gnu/include/c++/12.3.0;%BUILD_PREFIX%/x86_64-conda-linux-gnu/include/c++/12.3.0/x86_64-conda-linux-gnu;%BUILD_PREFIX%/x86_64-conda-linux-gnu/sysroot/usr/include;%BUILD_PREFIX%/include;%PREFIX%/include" +set PATH="%BUILD_PREFIX%\Library\bin;%PREFIX%\Library\bin;%PATH%;%BUILD_PREFIX%\x86_64-conda-linux-gnu\lib;%BUILD_PREFIX%\lib;%PREFIX%\lib" +set INCLUDE="%INCLUDE%;%cd%\include;%BUILD_PREFIX%\x86_64-conda-linux-gnu\include\c++\12.3.0;%BUILD_PREFIX%\x86_64-conda-linux-gnu\include\c++\12.3.0\x86_64-conda-linux-gnu;%BUILD_PREFIX%\x86_64-conda-linux-gnu\sysroot\usr\include;%BUILD_PREFIX%\include;%PREFIX%\include" rem ### Build CppInterOp next to llvm-project. @@ -12,6 +12,8 @@ pushd cppinterop mkdir build cd build +path + cmake ^ -G "Ninja" ^ %CMAKE_ARGS% ^ From 4f62539d98141774fa3c39ea855641831c774bc4 Mon Sep 17 00:00:00 2001 From: Alexander Penev <7923188+alexander-penev@users.noreply.github.com> Date: Sun, 3 Mar 2024 09:25:48 +0200 Subject: [PATCH 13/23] Update bld.bat --- recipe/bld.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/bld.bat b/recipe/bld.bat index ee92e79..94b4676 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -14,7 +14,7 @@ cd build path -cmake ^ +%BUILD_PREFIX%\Library\bin\cmake.exe ^ -G "Ninja" ^ %CMAKE_ARGS% ^ -DUSE_CLING=OFF ^ From 410c5a0ed09d7b0da95983e7450f683e2e9c23d7 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Sun, 3 Mar 2024 07:46:13 +0000 Subject: [PATCH 14/23] conda activate --- recipe/bld.bat | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipe/bld.bat b/recipe/bld.bat index 94b4676..bd3b081 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -8,13 +8,15 @@ set INCLUDE="%INCLUDE%;%cd%\include;%BUILD_PREFIX%\x86_64-conda-linux-gnu\includ rem ### Build CppInterOp next to llvm-project. +conda activate %BUILD_PREFIX% + pushd cppinterop mkdir build cd build path -%BUILD_PREFIX%\Library\bin\cmake.exe ^ +cmake ^ -G "Ninja" ^ %CMAKE_ARGS% ^ -DUSE_CLING=OFF ^ From 6b82e516e33adb92f7d8214c53f3245c1ed5b58a Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Sun, 3 Mar 2024 12:01:17 +0000 Subject: [PATCH 15/23] Try --- recipe/meta.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 416a8cc..8017722 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -30,6 +30,8 @@ requirements: - libcxx {{ cxx_compiler_version }} # [osx] - libstdcxx-ng {{ cxx_compiler_version }} # [linux] host: + - cmake + - ninja # [win] - llvm {{ clangdev }} - llvmdev {{ clangdev }} - clangdev {{ clangdev }} From 69132f47cc1433fdf0883e41cdabd9bcc168a3c8 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Sun, 3 Mar 2024 12:31:17 +0000 Subject: [PATCH 16/23] Try1 --- recipe/bld.bat | 10 +++++++--- recipe/meta.yaml | 2 -- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/recipe/bld.bat b/recipe/bld.bat index bd3b081..4cb122b 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -1,14 +1,16 @@ +setlocal EnableDelayedExpansion + @echo on rem # Common settings set CPU_COUNT=%NUMBER_OF_PROCESSORS% -set PATH="%BUILD_PREFIX%\Library\bin;%PREFIX%\Library\bin;%PATH%;%BUILD_PREFIX%\x86_64-conda-linux-gnu\lib;%BUILD_PREFIX%\lib;%PREFIX%\lib" -set INCLUDE="%INCLUDE%;%cd%\include;%BUILD_PREFIX%\x86_64-conda-linux-gnu\include\c++\12.3.0;%BUILD_PREFIX%\x86_64-conda-linux-gnu\include\c++\12.3.0\x86_64-conda-linux-gnu;%BUILD_PREFIX%\x86_64-conda-linux-gnu\sysroot\usr\include;%BUILD_PREFIX%\include;%PREFIX%\include" +::set PATH="%BUILD_PREFIX%\Library\bin;%PREFIX%\Library\bin;%PATH%;%BUILD_PREFIX%\x86_64-conda-linux-gnu\lib;%BUILD_PREFIX%\lib;%PREFIX%\lib" +::set INCLUDE="%INCLUDE%;%cd%\include;%BUILD_PREFIX%\x86_64-conda-linux-gnu\include\c++\12.3.0;%BUILD_PREFIX%\x86_64-conda-linux-gnu\include\c++\12.3.0\x86_64-conda-linux-gnu;%BUILD_PREFIX%\x86_64-conda-linux-gnu\sysroot\usr\include;%BUILD_PREFIX%\include;%PREFIX%\include" rem ### Build CppInterOp next to llvm-project. -conda activate %BUILD_PREFIX% +::conda activate %BUILD_PREFIX% pushd cppinterop mkdir build @@ -25,6 +27,8 @@ cmake ^ -DCPPINTEROP_ENABLE_TESTING=ON ^ .. +if errorlevel 1 exit 1 + rem ninja -j%CPU_COUNT% check-cppinterop rem if errorlevel 1 exit 1 diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 8017722..416a8cc 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -30,8 +30,6 @@ requirements: - libcxx {{ cxx_compiler_version }} # [osx] - libstdcxx-ng {{ cxx_compiler_version }} # [linux] host: - - cmake - - ninja # [win] - llvm {{ clangdev }} - llvmdev {{ clangdev }} - clangdev {{ clangdev }} From 45bc45f02ff11f2c1894c7cad717620ff44eb721 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Sun, 3 Mar 2024 13:09:08 +0000 Subject: [PATCH 17/23] Add zstd --- recipe/meta.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 416a8cc..c911e2a 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -29,6 +29,7 @@ requirements: - git-lfs - libcxx {{ cxx_compiler_version }} # [osx] - libstdcxx-ng {{ cxx_compiler_version }} # [linux] + - zstd # [win] host: - llvm {{ clangdev }} - llvmdev {{ clangdev }} From 602a7892779320f0afa645147d6170f95d61769b Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Sun, 3 Mar 2024 13:24:58 +0000 Subject: [PATCH 18/23] Debug cmake --- recipe/bld.bat | 2 +- recipe/meta.yaml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/recipe/bld.bat b/recipe/bld.bat index 4cb122b..ec541e5 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -25,7 +25,7 @@ cmake ^ -DUSE_REPL=ON ^ -DBUILD_SHARED_LIBS=ON ^ -DCPPINTEROP_ENABLE_TESTING=ON ^ - .. + --trace-expand .. if errorlevel 1 exit 1 diff --git a/recipe/meta.yaml b/recipe/meta.yaml index c911e2a..416a8cc 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -29,7 +29,6 @@ requirements: - git-lfs - libcxx {{ cxx_compiler_version }} # [osx] - libstdcxx-ng {{ cxx_compiler_version }} # [linux] - - zstd # [win] host: - llvm {{ clangdev }} - llvmdev {{ clangdev }} From 382cd0c9d370065facfbdffd43ba817d3160fc68 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Sun, 3 Mar 2024 14:59:20 +0000 Subject: [PATCH 19/23] Remove zstd --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 416a8cc..497b1e7 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -36,7 +36,7 @@ requirements: - backtrace # [unix and x86] - libxml2 - zlib - - zstd + - zstd # [not win] - libcxx {{ cxx_compiler_version }} # [osx] - libstdcxx-ng {{ cxx_compiler_version }} # [linux] run_constrained: From 260b81a68c6135cd24081dbf0fd938fbb20f9112 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Sun, 3 Mar 2024 19:43:50 +0000 Subject: [PATCH 20/23] Install prefix --- recipe/bld.bat | 1 + 1 file changed, 1 insertion(+) diff --git a/recipe/bld.bat b/recipe/bld.bat index ec541e5..20da4c5 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -25,6 +25,7 @@ cmake ^ -DUSE_REPL=ON ^ -DBUILD_SHARED_LIBS=ON ^ -DCPPINTEROP_ENABLE_TESTING=ON ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ --trace-expand .. if errorlevel 1 exit 1 From 51f059cb5d306d151c03511666b06f10e39511f7 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Sun, 3 Mar 2024 20:34:28 +0000 Subject: [PATCH 21/23] add patch --- recipe/meta.yaml | 4 ++++ recipe/patches/cppinterop/0001-patch.patch | 24 ++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 recipe/patches/cppinterop/0001-patch.patch diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 497b1e7..96bd869 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -11,6 +11,10 @@ source: - url: https://github.com/compiler-research/CppInterOp/archive/refs/tags/{{ revision_tag }}.tar.gz sha256: b3cf25f500624fe12ffc40f858a04c46daea808298e64d924b594eb35ca1c806 folder: cppinterop + patches: + - patches/cppinterop/0001-patch.patch + - path: patches + folder: add_patches build: number: {{ build_number }} diff --git a/recipe/patches/cppinterop/0001-patch.patch b/recipe/patches/cppinterop/0001-patch.patch new file mode 100644 index 0000000..b8d5b55 --- /dev/null +++ b/recipe/patches/cppinterop/0001-patch.patch @@ -0,0 +1,24 @@ +From 96f55f8e51864ddc9ad2bd99e82e82ec3f6b7a7a Mon Sep 17 00:00:00 2001 +From: Vassil Vassilev +Date: Sun, 3 Mar 2024 20:32:15 +0000 +Subject: [PATCH] patch + +--- + CMakeLists.txt | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 548e535..f4efb0e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,5 +1,7 @@ + cmake_minimum_required(VERSION 3.13) + ++include(GNUInstallDirs) ++ + set(CMAKE_MODULE_PATH + ${CMAKE_MODULE_PATH} + "${CMAKE_CURRENT_SOURCE_DIR}/cmake" +-- +2.37.1 (Apple Git-137.1) + From 0519622f20f040b83a5aa4ff3d9a1af1549c7720 Mon Sep 17 00:00:00 2001 From: Alexander Penev <7923188+alexander-penev@users.noreply.github.com> Date: Mon, 4 Mar 2024 10:37:34 +0200 Subject: [PATCH 22/23] Debug --- recipe/meta.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 96bd869..f032d94 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -54,6 +54,9 @@ requirements: test: commands: - test -f $PREFIX/lib/libclangCppInterOp${SHLIB_EXT} # [unix] + - echo %LIBRARY_BIN% # [win] + - dir /S %LIBRARY_BIN% # [win] + - dir /S D:\ # [win] - if not exist %LIBRARY_BIN%\\libclangCppInterOp.dll exit 1 # [win] about: From 6860469d4f77354f7085cbea00650d2f82b33921 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Mon, 4 Mar 2024 09:35:08 +0000 Subject: [PATCH 23/23] cleanup --- recipe/bld.bat | 15 +-------------- recipe/meta.yaml | 7 ++----- ...ke-Work-around-a-bug-in-the-llvm-config.patch} | 8 ++++++-- 3 files changed, 9 insertions(+), 21 deletions(-) rename recipe/patches/cppinterop/{0001-patch.patch => 0001-cmake-Work-around-a-bug-in-the-llvm-config.patch} (62%) diff --git a/recipe/bld.bat b/recipe/bld.bat index 20da4c5..3259874 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -1,23 +1,11 @@ setlocal EnableDelayedExpansion -@echo on - -rem # Common settings - set CPU_COUNT=%NUMBER_OF_PROCESSORS% -::set PATH="%BUILD_PREFIX%\Library\bin;%PREFIX%\Library\bin;%PATH%;%BUILD_PREFIX%\x86_64-conda-linux-gnu\lib;%BUILD_PREFIX%\lib;%PREFIX%\lib" -::set INCLUDE="%INCLUDE%;%cd%\include;%BUILD_PREFIX%\x86_64-conda-linux-gnu\include\c++\12.3.0;%BUILD_PREFIX%\x86_64-conda-linux-gnu\include\c++\12.3.0\x86_64-conda-linux-gnu;%BUILD_PREFIX%\x86_64-conda-linux-gnu\sysroot\usr\include;%BUILD_PREFIX%\include;%PREFIX%\include" - -rem ### Build CppInterOp next to llvm-project. - -::conda activate %BUILD_PREFIX% pushd cppinterop mkdir build cd build -path - cmake ^ -G "Ninja" ^ %CMAKE_ARGS% ^ @@ -25,8 +13,7 @@ cmake ^ -DUSE_REPL=ON ^ -DBUILD_SHARED_LIBS=ON ^ -DCPPINTEROP_ENABLE_TESTING=ON ^ - -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ - --trace-expand .. + .. if errorlevel 1 exit 1 diff --git a/recipe/meta.yaml b/recipe/meta.yaml index f032d94..5423912 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -12,7 +12,7 @@ source: sha256: b3cf25f500624fe12ffc40f858a04c46daea808298e64d924b594eb35ca1c806 folder: cppinterop patches: - - patches/cppinterop/0001-patch.patch + - patches/cppinterop/0001-cmake-Work-around-a-bug-in-the-llvm-config.patch - path: patches folder: add_patches @@ -54,10 +54,7 @@ requirements: test: commands: - test -f $PREFIX/lib/libclangCppInterOp${SHLIB_EXT} # [unix] - - echo %LIBRARY_BIN% # [win] - - dir /S %LIBRARY_BIN% # [win] - - dir /S D:\ # [win] - - if not exist %LIBRARY_BIN%\\libclangCppInterOp.dll exit 1 # [win] + - if not exist %LIBRARY_BIN%\\clangCppInterOp.dll exit 1 # [win] about: home: https://github.com/compiler-research/CppInterOp diff --git a/recipe/patches/cppinterop/0001-patch.patch b/recipe/patches/cppinterop/0001-cmake-Work-around-a-bug-in-the-llvm-config.patch similarity index 62% rename from recipe/patches/cppinterop/0001-patch.patch rename to recipe/patches/cppinterop/0001-cmake-Work-around-a-bug-in-the-llvm-config.patch index b8d5b55..bb145f6 100644 --- a/recipe/patches/cppinterop/0001-patch.patch +++ b/recipe/patches/cppinterop/0001-cmake-Work-around-a-bug-in-the-llvm-config.patch @@ -1,8 +1,12 @@ -From 96f55f8e51864ddc9ad2bd99e82e82ec3f6b7a7a Mon Sep 17 00:00:00 2001 +From 3069b953dd1303eb4bd1171a8f5c5501ecdafc29 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Sun, 3 Mar 2024 20:32:15 +0000 -Subject: [PATCH] patch +Subject: [PATCH] [cmake] Work around a bug in the llvm config. +In short we use variables which require including `GNUInstallDirs` but we are +expecting somebody else to include it for us. + +See llvm/llvm-project#83802 --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+)