diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 05cb1097..2a09143a 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,6 +1,6 @@ {% set version = "19.1.2" %} {% set major_version = version.split(".")[0] %} -{% set build_number = 0 %} +{% set build_number = 1 %} # always includes minor as of v18, see https://github.com/llvm/llvm-project/issues/76273 {% set maj_min = major_version ~ "." ~ version.split(".")[1] %} @@ -36,6 +36,7 @@ source: - patches/0007-set-libclang-SOVERSION-unconditionally.patch - patches/0008-Make-PIE-default-on-macOS-too.patch - patches/0009-Find-ROCm-device-library-in-conda-layout.patch + - patches/0010-Add-conda-mingw-paths.patch # name folder for easier deletion; we do the equivalent of downloading # the subproject sources, so the work folder then has clang in it; # for details see build scripts @@ -473,6 +474,7 @@ outputs: test: requires: - {{ compiler("cxx") }} + - gxx_impl_{{ target_platform }} # [win64] files: - mytest.cxx commands: @@ -481,6 +483,7 @@ outputs: - unset CONDA_BUILD_SYSROOT # [unix] - set "CONDA_BUILD_SYSROOT=" # [win] - clang++ -v -c mytest.cxx + - clang++ -v mytest.cxx --target=x86_64-w64-mingw32 # [win64] - name: clang-format-{{ major_version }} script: install_clang_format.sh # [unix] diff --git a/recipe/patches/0010-Add-conda-mingw-paths.patch b/recipe/patches/0010-Add-conda-mingw-paths.patch new file mode 100644 index 00000000..f80b4f43 --- /dev/null +++ b/recipe/patches/0010-Add-conda-mingw-paths.patch @@ -0,0 +1,38 @@ +From b9574b59ea44cfb30ff50633b3b346faba39b39b Mon Sep 17 00:00:00 2001 +From: Isuru Fernando +Date: Fri, 18 Oct 2024 10:28:09 -0400 +Subject: [PATCH 10/10] Add conda mingw paths + +--- + clang/lib/Driver/ToolChains/MinGW.cpp | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/clang/lib/Driver/ToolChains/MinGW.cpp b/clang/lib/Driver/ToolChains/MinGW.cpp +index c81a7ed17029..4f47e01fda58 100644 +--- a/clang/lib/Driver/ToolChains/MinGW.cpp ++++ b/clang/lib/Driver/ToolChains/MinGW.cpp +@@ -532,6 +532,10 @@ toolchains::MinGW::MinGW(const Driver &D, const llvm::Triple &Triple, + getFilePaths().push_back( + (Base + SubdirName + llvm::sys::path::get_separator() + "mingw/lib").str()); + ++ // Conda ++ getFilePaths().push_back( ++ (Base + SubdirName + llvm::sys::path::get_separator() + "sysroot/usr/lib").str()); ++ + // Only include /lib if we're not cross compiling (not even for + // windows->windows to a different arch), or if the sysroot has been set + // (where we presume the user has pointed it at an arch specific +@@ -698,6 +702,10 @@ void toolchains::MinGW::AddClangSystemIncludeArgs(const ArgList &DriverArgs, + addSystemInclude(DriverArgs, CC1Args, + Base + SubdirName + llvm::sys::path::get_separator() + "usr/include"); + ++ // Conda ++ addSystemInclude(DriverArgs, CC1Args, ++ Base + SubdirName + llvm::sys::path::get_separator() + "sysroot/usr/include"); ++ + // Only include /include if we're not cross compiling (but do allow it + // if we're on Windows and building for Windows on another architecture), + // or if the sysroot has been set (where we presume the user has pointed it +-- +2.44.0 +