From 352d08a765f738ea03960152e61b22518a241cef Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Fri, 21 Jul 2023 15:23:12 -0500 Subject: [PATCH 1/5] Fix automatic sysroot detection --- recipe/meta.yaml | 3 +- .../0001-Find-conda-gcc-installation.patch | 44 ----------------- ...0002-Fix-sysroot-detection-for-linux.patch | 48 ++++++++++++++++--- 3 files changed, 42 insertions(+), 53 deletions(-) delete mode 100644 recipe/patches/0001-Find-conda-gcc-installation.patch diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 626b4d23..eb60399f 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,6 +1,6 @@ {% set version = "16.0.6" %} {% set major_version = version.split(".")[0] %} -{% set build_number = 0 %} +{% set build_number = 1 %} {% set minor_aware_ext = major_version %} {% if version.split(".")[1] | int > 0 %} @@ -19,7 +19,6 @@ 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 patches: - - patches/0001-Find-conda-gcc-installation.patch - patches/0002-Fix-sysroot-detection-for-linux.patch - patches/0003-clang-add-conda-specific-env-var-CONDA_BUILD_SYSROOT.patch - patches/0004-Fix-normalizeProgramName-s-handling-of-dots-outside-.patch diff --git a/recipe/patches/0001-Find-conda-gcc-installation.patch b/recipe/patches/0001-Find-conda-gcc-installation.patch deleted file mode 100644 index e728c1cb..00000000 --- a/recipe/patches/0001-Find-conda-gcc-installation.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 19132c83dc48e903a5d989f2177d49007f31ea4d Mon Sep 17 00:00:00 2001 -From: Isuru Fernando -Date: Mon, 8 Apr 2019 16:20:03 -0500 -Subject: [PATCH 1/8] Find conda gcc installation - ---- - clang/lib/Driver/ToolChains/Gnu.cpp | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp -index 4f23403166..cd3c03efdd 100644 ---- a/clang/lib/Driver/ToolChains/Gnu.cpp -+++ b/clang/lib/Driver/ToolChains/Gnu.cpp -@@ -2218,7 +2218,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( - static const char *const AArch64LibDirs[] = {"/lib64", "/lib"}; - static const char *const AArch64Triples[] = { - "aarch64-none-linux-gnu", "aarch64-linux-gnu", "aarch64-redhat-linux", -- "aarch64-suse-linux"}; -+ "aarch64-suse-linux", "aarch64-conda_cos7-linux-gnu", "aarch64-conda-linux-gnu"}; - static const char *const AArch64beLibDirs[] = {"/lib"}; - static const char *const AArch64beTriples[] = {"aarch64_be-none-linux-gnu", - "aarch64_be-linux-gnu"}; -@@ -2248,7 +2248,8 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( - "x86_64-redhat-linux", "x86_64-suse-linux", - "x86_64-manbo-linux-gnu", "x86_64-linux-gnu", - "x86_64-slackware-linux", "x86_64-unknown-linux", -- "x86_64-amazon-linux"}; -+ "x86_64-amazon-linux", "x86_64-conda_cos6-linux-gnu", -+ "x86_64-conda_cos7-linux-gnu", "x86_64-conda-linux-gnu"}; - static const char *const X32Triples[] = {"x86_64-linux-gnux32", - "x86_64-pc-linux-gnux32"}; - static const char *const X32LibDirs[] = {"/libx32", "/lib"}; -@@ -2315,7 +2316,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( - static const char *const PPC64LETriples[] = { - "powerpc64le-linux-gnu", "powerpc64le-unknown-linux-gnu", - "powerpc64le-none-linux-gnu", "powerpc64le-suse-linux", -- "ppc64le-redhat-linux"}; -+ "ppc64le-redhat-linux", "powerpc64le-conda_cos7-linux-gnu", "powerpc64le-conda-linux-gnu"}; - - static const char *const RISCV32LibDirs[] = {"/lib32", "/lib"}; - static const char *const RISCV32Triples[] = {"riscv32-unknown-linux-gnu", --- -2.38.1.windows.1 - diff --git a/recipe/patches/0002-Fix-sysroot-detection-for-linux.patch b/recipe/patches/0002-Fix-sysroot-detection-for-linux.patch index 66331eae..89baa82a 100644 --- a/recipe/patches/0002-Fix-sysroot-detection-for-linux.patch +++ b/recipe/patches/0002-Fix-sysroot-detection-for-linux.patch @@ -1,17 +1,51 @@ -From c66404de3a5fb2ae88e836e995ebcf13cd38f1e6 Mon Sep 17 00:00:00 2001 +From 69f6efe448031a872bee2610d5b274d9e34f5786 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Mon, 8 Apr 2019 16:32:17 -0500 -Subject: [PATCH 2/8] Fix sysroot detection for linux +Subject: [PATCH] Fix sysroot detection for linux --- - clang/lib/Driver/ToolChains/Linux.cpp | 8 ++++++++ - 1 file changed, 8 insertions(+) + clang/lib/Driver/ToolChains/Linux.cpp | 29 ++++++++++++++++++++++----- + 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp -index c6fb290ffd..fcacc1dcbd 100644 +index c9360fc67165..d5cae51698ca 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp -@@ -388,6 +388,14 @@ std::string Linux::computeSysRoot() const { +@@ -347,24 +347,43 @@ std::string Linux::computeSysRoot() const { + return AndroidSysRootPath; + } + +- if (!GCCInstallation.isValid() || !getTriple().isMIPS()) ++ if (!GCCInstallation.isValid()) + return std::string(); + +- // Standalone MIPS toolchains use different names for sysroot folder +- // and put it into different places. Here we try to check some known +- // variants. +- ++ // Check for conda layout + const StringRef InstallDir = GCCInstallation.getInstallPath(); + const StringRef TripleStr = GCCInstallation.getTriple().str(); + const Multilib &Multilib = GCCInstallation.getMultilib(); + + std::string Path = ++ (InstallDir + "/../../../../" + TripleStr + "/sysroot") ++ .str(); ++ ++ if (getVFS().exists(Path)) ++ return Path; ++ ++ if (!getTriple().isMIPS()) ++ return std::string(); ++ ++ // Standalone MIPS toolchains use different names for sysroot folder ++ // and put it into different places. Here we try to check some known ++ // variants. ++ ++ Path = + (InstallDir + "/../../../../" + TripleStr + "/libc" + Multilib.osSuffix()) + .str(); + if (getVFS().exists(Path)) return Path; @@ -27,5 +61,5 @@ index c6fb290ffd..fcacc1dcbd 100644 if (getVFS().exists(Path)) -- -2.38.1.windows.1 +2.38.1 From 8cddf2a97f0819ef7b1244341def3c60d66b2fe6 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Sat, 22 Jul 2023 02:06:20 -0500 Subject: [PATCH 2/5] check with CONDA_BUILD_SYSROOT unset --- recipe/meta.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index eb60399f..f629379d 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -436,6 +436,9 @@ outputs: commands: - clang++ --version - clang++ -v -c mytest.cxx + - unset CONDA_BUILD_SYSROOT # [unix] + - set "CONDA_BUILD_SYSROOT=" # [win] + - clang++ -v -c mytest.cxx - name: clang-format-{{ major_version }} script: install_clang_format.sh # [unix] From 3c0b7a94f7a821d3bd56793df0939f56b70e4db6 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Fri, 28 Jul 2023 10:55:34 +1100 Subject: [PATCH 3/5] rebase & renormalize patches --- recipe/meta.yaml | 14 ++-- ...0001-Fix-sysroot-detection-for-linux.patch | 48 ++++++++++++++ ...0002-Fix-sysroot-detection-for-linux.patch | 65 ------------------- ...pecific-env-var-CONDA_BUILD_SYSROOT.patch} | 25 +++---- ...ramName-s-handling-of-dots-outside-.patch} | 9 +-- ... => 0004-Set-VERSION-in-osx-as-well.patch} | 9 +-- ... 0005-Fix-crosscompiling-LLVM-tools.patch} | 9 +-- ...ly-error-on-undefined-TARGET_OS_OSX.patch} | 9 +-- ...-libclang-SOVERSION-unconditionally.patch} | 9 +-- 9 files changed, 79 insertions(+), 118 deletions(-) create mode 100644 recipe/patches/0001-Fix-sysroot-detection-for-linux.patch delete mode 100644 recipe/patches/0002-Fix-sysroot-detection-for-linux.patch rename recipe/patches/{0003-clang-add-conda-specific-env-var-CONDA_BUILD_SYSROOT.patch => 0002-clang-add-conda-specific-env-var-CONDA_BUILD_SYSROOT.patch} (71%) rename recipe/patches/{0004-Fix-normalizeProgramName-s-handling-of-dots-outside-.patch => 0003-Fix-normalizeProgramName-s-handling-of-dots-outside-.patch} (92%) rename recipe/patches/{0005-Set-VERSION-in-osx-as-well.patch => 0004-Set-VERSION-in-osx-as-well.patch} (80%) rename recipe/patches/{0006-Fix-crosscompiling-LLVM-tools.patch => 0005-Fix-crosscompiling-LLVM-tools.patch} (83%) rename recipe/patches/{0007-Only-error-on-undefined-TARGET_OS_OSX.patch => 0006-Only-error-on-undefined-TARGET_OS_OSX.patch} (81%) rename recipe/patches/{0008-set-libclang-SOVERSION-unconditionally.patch => 0007-set-libclang-SOVERSION-unconditionally.patch} (91%) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index f629379d..c98218bf 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -19,15 +19,15 @@ 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 patches: - - patches/0002-Fix-sysroot-detection-for-linux.patch - - patches/0003-clang-add-conda-specific-env-var-CONDA_BUILD_SYSROOT.patch - - patches/0004-Fix-normalizeProgramName-s-handling-of-dots-outside-.patch - - patches/0005-Set-VERSION-in-osx-as-well.patch - - patches/0006-Fix-crosscompiling-LLVM-tools.patch + - patches/0001-Fix-sysroot-detection-for-linux.patch + - patches/0002-clang-add-conda-specific-env-var-CONDA_BUILD_SYSROOT.patch + - patches/0003-Fix-normalizeProgramName-s-handling-of-dots-outside-.patch + - patches/0004-Set-VERSION-in-osx-as-well.patch + - patches/0005-Fix-crosscompiling-LLVM-tools.patch # Disable -Werror,-Wundef-prefix=TARGET_OS as they are not yet defined in the 10.9 SDK used for osx-64 # Only enable it for TARGET_OS_OSX. - - patches/0007-Only-error-on-undefined-TARGET_OS_OSX.patch # [osx and x86_64] - - patches/0008-set-libclang-SOVERSION-unconditionally.patch + - patches/0006-Only-error-on-undefined-TARGET_OS_OSX.patch # [osx and x86_64] + - patches/0007-set-libclang-SOVERSION-unconditionally.patch # check out git history before LLVM 16 for these patches # - patches/amd-roc-2.7.0.diff # [variant != "hcc"] # - patches/amd-roc-hcc-2.7.0.diff # [variant == "hcc"] diff --git a/recipe/patches/0001-Fix-sysroot-detection-for-linux.patch b/recipe/patches/0001-Fix-sysroot-detection-for-linux.patch new file mode 100644 index 00000000..21a636bc --- /dev/null +++ b/recipe/patches/0001-Fix-sysroot-detection-for-linux.patch @@ -0,0 +1,48 @@ +From e46d9dd8f6701270b5243348ffb4b8c3430c4229 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 + +--- + clang/lib/Driver/ToolChains/Linux.cpp | 20 ++++++++++++++++---- + 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 +--- a/clang/lib/Driver/ToolChains/Linux.cpp ++++ b/clang/lib/Driver/ToolChains/Linux.cpp +@@ -370,18 +370,30 @@ std::string Linux::computeSysRoot() const { + return std::string(); + } + +- if (!GCCInstallation.isValid() || !getTriple().isMIPS()) ++ if (!GCCInstallation.isValid()) ++ return std::string(); ++ ++ // Check for conda layout ++ const StringRef InstallDir = GCCInstallation.getInstallPath(); ++ const StringRef TripleStr = GCCInstallation.getTriple().str(); ++ ++ std::string Path = ++ (InstallDir + "/../../../../" + TripleStr + "/sysroot") ++ .str(); ++ ++ if (getVFS().exists(Path)) ++ return Path; ++ ++ if (!getTriple().isMIPS()) + return std::string(); + + // Standalone MIPS toolchains use different names for sysroot folder + // and put it into different places. Here we try to check some known + // variants. + +- const StringRef InstallDir = GCCInstallation.getInstallPath(); +- const StringRef TripleStr = GCCInstallation.getTriple().str(); + const Multilib &Multilib = GCCInstallation.getMultilib(); + +- std::string Path = ++ Path = + (InstallDir + "/../../../../" + TripleStr + "/libc" + Multilib.osSuffix()) + .str(); + diff --git a/recipe/patches/0002-Fix-sysroot-detection-for-linux.patch b/recipe/patches/0002-Fix-sysroot-detection-for-linux.patch deleted file mode 100644 index 89baa82a..00000000 --- a/recipe/patches/0002-Fix-sysroot-detection-for-linux.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 69f6efe448031a872bee2610d5b274d9e34f5786 Mon Sep 17 00:00:00 2001 -From: Isuru Fernando -Date: Mon, 8 Apr 2019 16:32:17 -0500 -Subject: [PATCH] Fix sysroot detection for linux - ---- - clang/lib/Driver/ToolChains/Linux.cpp | 29 ++++++++++++++++++++++----- - 1 file changed, 24 insertions(+), 5 deletions(-) - -diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp -index c9360fc67165..d5cae51698ca 100644 ---- a/clang/lib/Driver/ToolChains/Linux.cpp -+++ b/clang/lib/Driver/ToolChains/Linux.cpp -@@ -347,24 +347,43 @@ std::string Linux::computeSysRoot() const { - return AndroidSysRootPath; - } - -- if (!GCCInstallation.isValid() || !getTriple().isMIPS()) -+ if (!GCCInstallation.isValid()) - return std::string(); - -- // Standalone MIPS toolchains use different names for sysroot folder -- // and put it into different places. Here we try to check some known -- // variants. -- -+ // Check for conda layout - const StringRef InstallDir = GCCInstallation.getInstallPath(); - const StringRef TripleStr = GCCInstallation.getTriple().str(); - const Multilib &Multilib = GCCInstallation.getMultilib(); - - std::string Path = -+ (InstallDir + "/../../../../" + TripleStr + "/sysroot") -+ .str(); -+ -+ if (getVFS().exists(Path)) -+ return Path; -+ -+ if (!getTriple().isMIPS()) -+ return std::string(); -+ -+ // Standalone MIPS toolchains use different names for sysroot folder -+ // and put it into different places. Here we try to check some known -+ // variants. -+ -+ Path = - (InstallDir + "/../../../../" + TripleStr + "/libc" + Multilib.osSuffix()) - .str(); - - if (getVFS().exists(Path)) - return Path; - -+ Path = -+ (InstallDir + "/../../../../" + TripleStr + "/sysroot") -+ .str(); -+ -+ if (getVFS().exists(Path)) -+ return Path; -+ -+ - Path = (InstallDir + "/../../../../sysroot" + Multilib.osSuffix()).str(); - - if (getVFS().exists(Path)) --- -2.38.1 - diff --git a/recipe/patches/0003-clang-add-conda-specific-env-var-CONDA_BUILD_SYSROOT.patch b/recipe/patches/0002-clang-add-conda-specific-env-var-CONDA_BUILD_SYSROOT.patch similarity index 71% rename from recipe/patches/0003-clang-add-conda-specific-env-var-CONDA_BUILD_SYSROOT.patch rename to recipe/patches/0002-clang-add-conda-specific-env-var-CONDA_BUILD_SYSROOT.patch index 166dd5e9..acbd00ef 100644 --- a/recipe/patches/0003-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,35 +1,31 @@ -From c2c32b2cd1c88f88d150ff502d5f1e0fd4d99512 Mon Sep 17 00:00:00 2001 +From c17bbdb9087baecccf7e06e55ac380ae71ee280c Mon Sep 17 00:00:00 2001 From: Nehal J Wani Date: Sat, 25 Aug 2018 09:20:04 -0500 -Subject: [PATCH 3/8] clang: add conda specific env var CONDA_BUILD_SYSROOT +Subject: [PATCH 2/7] clang: add conda specific env var CONDA_BUILD_SYSROOT --- - clang/lib/Driver/Driver.cpp | 9 +++++++-- + clang/lib/Driver/Driver.cpp | 5 +++++ clang/lib/Lex/InitHeaderSearch.cpp | 6 +++++- - 2 files changed, 12 insertions(+), 3 deletions(-) + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp -index 661d9977fb..f5a75515ed 100644 +index a268f2fa8fc..baf84d4d1ad 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp -@@ -1327,8 +1327,13 @@ Compilation *Driver::BuildCompilation(ArrayRef ArgList) { +@@ -1327,6 +1327,11 @@ Compilation *Driver::BuildCompilation(ArrayRef ArgList) { CompilerPath = Split.second; } } -- if (const Arg *A = Args.getLastArg(options::OPT__sysroot_EQ)) -- SysRoot = A->getValue(); + if (Optional CondaBuildSysrootValue = + llvm::sys::Process::GetEnv("CONDA_BUILD_SYSROOT")) { + SysRoot = *CondaBuildSysrootValue; + } + // Override CONDA_BUILD_SYSROOT and consume sysroot option -+ if (const Arg *A = Args.getLastArg(options::OPT__sysroot_EQ)) -+ SysRoot = A->getValue(); + if (const Arg *A = Args.getLastArg(options::OPT__sysroot_EQ)) + SysRoot = A->getValue(); if (const Arg *A = Args.getLastArg(options::OPT__dyld_prefix_EQ)) - DyldPrefix = A->getValue(); - diff --git a/clang/lib/Lex/InitHeaderSearch.cpp b/clang/lib/Lex/InitHeaderSearch.cpp -index d446556571..8354362d1f 100644 +index d4465565718..8354362d1ff 100644 --- a/clang/lib/Lex/InitHeaderSearch.cpp +++ b/clang/lib/Lex/InitHeaderSearch.cpp @@ -25,6 +25,7 @@ @@ -52,6 +48,3 @@ index d446556571..8354362d1f 100644 break; } } --- -2.38.1.windows.1 - diff --git a/recipe/patches/0004-Fix-normalizeProgramName-s-handling-of-dots-outside-.patch b/recipe/patches/0003-Fix-normalizeProgramName-s-handling-of-dots-outside-.patch similarity index 92% rename from recipe/patches/0004-Fix-normalizeProgramName-s-handling-of-dots-outside-.patch rename to recipe/patches/0003-Fix-normalizeProgramName-s-handling-of-dots-outside-.patch index efab6d1e..cc88af87 100644 --- a/recipe/patches/0004-Fix-normalizeProgramName-s-handling-of-dots-outside-.patch +++ b/recipe/patches/0003-Fix-normalizeProgramName-s-handling-of-dots-outside-.patch @@ -1,7 +1,7 @@ -From d4dffafebae289d10cffcdd8cb41956d53e2fadc Mon Sep 17 00:00:00 2001 +From 3e7e229e2da4008946ba9b5cf15f3a9606a835ee Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Wed, 30 Aug 2017 20:01:49 +0100 -Subject: [PATCH 4/8] Fix normalizeProgramName()'s handling of dots outside of +Subject: [PATCH 3/7] Fix normalizeProgramName()'s handling of dots outside of .exe It used to strip everything after the last dot, turning: @@ -18,7 +18,7 @@ x86_64-apple-darwin13.4 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp -index bc70205a6c..3a7948509a 100644 +index bc70205a6c0..3a7948509a6 100644 --- a/clang/lib/Driver/ToolChain.cpp +++ b/clang/lib/Driver/ToolChain.cpp @@ -51,6 +51,7 @@ using namespace driver; @@ -61,6 +61,3 @@ index bc70205a6c..3a7948509a 100644 if (is_style_windows(llvm::sys::path::Style::native)) { // Transform to lowercase for case insensitive file systems. std::transform(ProgName.begin(), ProgName.end(), ProgName.begin(), --- -2.38.1.windows.1 - diff --git a/recipe/patches/0005-Set-VERSION-in-osx-as-well.patch b/recipe/patches/0004-Set-VERSION-in-osx-as-well.patch similarity index 80% rename from recipe/patches/0005-Set-VERSION-in-osx-as-well.patch rename to recipe/patches/0004-Set-VERSION-in-osx-as-well.patch index 2e2721f9..7c8bc287 100644 --- a/recipe/patches/0005-Set-VERSION-in-osx-as-well.patch +++ b/recipe/patches/0004-Set-VERSION-in-osx-as-well.patch @@ -1,14 +1,14 @@ -From 736992bda48c9a10db659b402991590af76e8922 Mon Sep 17 00:00:00 2001 +From 53451239fa132559547b7dd8022d74526fba102a Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Sat, 27 Jul 2019 11:55:23 -0500 -Subject: [PATCH 5/8] Set VERSION in osx as well +Subject: [PATCH 4/7] Set VERSION in osx as well --- clang/tools/libclang/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/clang/tools/libclang/CMakeLists.txt b/clang/tools/libclang/CMakeLists.txt -index 4f23065a24..da8a9740fa 100644 +index 4f23065a247..da8a9740fab 100644 --- a/clang/tools/libclang/CMakeLists.txt +++ b/clang/tools/libclang/CMakeLists.txt @@ -172,6 +172,11 @@ if(ENABLE_SHARED) @@ -23,6 +23,3 @@ index 4f23065a24..da8a9740fa 100644 else() set_target_properties(libclang PROPERTIES --- -2.38.1.windows.1 - diff --git a/recipe/patches/0006-Fix-crosscompiling-LLVM-tools.patch b/recipe/patches/0005-Fix-crosscompiling-LLVM-tools.patch similarity index 83% rename from recipe/patches/0006-Fix-crosscompiling-LLVM-tools.patch rename to recipe/patches/0005-Fix-crosscompiling-LLVM-tools.patch index b3882e3d..68d86419 100644 --- a/recipe/patches/0006-Fix-crosscompiling-LLVM-tools.patch +++ b/recipe/patches/0005-Fix-crosscompiling-LLVM-tools.patch @@ -1,14 +1,14 @@ -From d3f9de592fb29a1e7f6870e3738778cec01a61e7 Mon Sep 17 00:00:00 2001 +From bcde5c3f996bf4f2e4abe17a697ee8fc675dbcee Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Tue, 11 May 2021 15:08:13 +0200 -Subject: [PATCH 6/8] Fix crosscompiling LLVM tools +Subject: [PATCH 5/7] Fix crosscompiling LLVM tools --- clang/CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt -index 090cfa3520..3f617c6024 100644 +index 090cfa35207..3f617c60244 100644 --- a/clang/CMakeLists.txt +++ b/clang/CMakeLists.txt @@ -67,6 +67,16 @@ if(CLANG_BUILT_STANDALONE) @@ -28,6 +28,3 @@ index 090cfa3520..3f617c6024 100644 include(TableGen) include(HandleLLVMOptions) include(VersionFromVCS) --- -2.38.1.windows.1 - diff --git a/recipe/patches/0007-Only-error-on-undefined-TARGET_OS_OSX.patch b/recipe/patches/0006-Only-error-on-undefined-TARGET_OS_OSX.patch similarity index 81% rename from recipe/patches/0007-Only-error-on-undefined-TARGET_OS_OSX.patch rename to recipe/patches/0006-Only-error-on-undefined-TARGET_OS_OSX.patch index f8b2bf01..3d2aea0a 100644 --- a/recipe/patches/0007-Only-error-on-undefined-TARGET_OS_OSX.patch +++ b/recipe/patches/0006-Only-error-on-undefined-TARGET_OS_OSX.patch @@ -1,14 +1,14 @@ -From b11a745c54966f9f48cff368a2d46cb0e265597d Mon Sep 17 00:00:00 2001 +From ced5907cd03b4c84c0cb0d9d8a9bd07324852b2d Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Tue, 11 May 2021 15:09:51 +0200 -Subject: [PATCH 7/8] Only error on undefined TARGET_OS_OSX +Subject: [PATCH 6/7] Only error on undefined TARGET_OS_OSX --- clang/lib/Driver/ToolChains/Darwin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/Driver/ToolChains/Darwin.cpp b/clang/lib/Driver/ToolChains/Darwin.cpp -index 9f95c962ee..fb3f8f16d0 100644 +index 9f95c962ee9..fb3f8f16d04 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, @@ -20,6 +20,3 @@ index 9f95c962ee..fb3f8f16d0 100644 CC1Args.push_back("-Werror=undef-prefix"); // For modern targets, promote certain warnings to errors. --- -2.38.1.windows.1 - diff --git a/recipe/patches/0008-set-libclang-SOVERSION-unconditionally.patch b/recipe/patches/0007-set-libclang-SOVERSION-unconditionally.patch similarity index 91% rename from recipe/patches/0008-set-libclang-SOVERSION-unconditionally.patch rename to recipe/patches/0007-set-libclang-SOVERSION-unconditionally.patch index 9b9d9155..8c0a365e 100644 --- a/recipe/patches/0008-set-libclang-SOVERSION-unconditionally.patch +++ b/recipe/patches/0007-set-libclang-SOVERSION-unconditionally.patch @@ -1,7 +1,7 @@ -From 3be041186eb565edd232229bfb2a4b6201c5b636 Mon Sep 17 00:00:00 2001 +From ad4c79a522f9888398020dbf1df75f4c2f9f4ca6 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Thu, 14 Apr 2022 11:57:00 +1100 -Subject: [PATCH 8/8] set libclang SOVERSION unconditionally +Subject: [PATCH 7/7] set libclang SOVERSION unconditionally and avoid creating libclang with full version suffix --- @@ -9,7 +9,7 @@ and avoid creating libclang with full version suffix 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/clang/tools/libclang/CMakeLists.txt b/clang/tools/libclang/CMakeLists.txt -index da8a9740fa..dd4d43c56b 100644 +index da8a9740fab..dd4d43c56b4 100644 --- a/clang/tools/libclang/CMakeLists.txt +++ b/clang/tools/libclang/CMakeLists.txt @@ -9,10 +9,7 @@ @@ -44,6 +44,3 @@ index da8a9740fa..dd4d43c56b 100644 endif() endif() --- -2.38.1.windows.1 - From 8613d7268e85d4012582a6ea8d19bcc2b69947a2 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sat, 29 Jul 2023 18:19:59 +1100 Subject: [PATCH 4/5] clangdev 17.0.0.rc1 --- recipe/meta.yaml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index d114b349..8254f63e 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,6 +1,6 @@ -{% set version = "17.0.0.dev0" %} +{% set version = "17.0.0.rc1" %} {% 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 %} @@ -18,10 +18,8 @@ package: version: {{ version }} source: - - url: https://github.com/llvm/llvm-project/archive/a4f4d82c35b80b681687b545200456e79a82d9c2.tar.gz - sha256: 900eeba6c46ed73594cf5b7fb6d32f29a29fcec34c644140f24b6435afbccf07 - # - 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 + - url: https://github.com/llvm/llvm-project/releases/download/llvmorg-{{ version.replace(".rc", "-rc") }}/llvm-project-{{ version.replace(".rc", "rc") }}.src.tar.xz + sha256: 01b80625c131b8281dcf76a4e6395d10f45835c60e27357c92abf5a98c9a0337 patches: - patches/0001-Fix-sysroot-detection-for-linux.patch - patches/0002-clang-add-conda-specific-env-var-CONDA_BUILD_SYSROOT.patch From c018f3029fd2de86800a4215a815abab331c587d Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sat, 29 Jul 2023 18:22:30 +1100 Subject: [PATCH 5/5] MNT: Re-rendered with conda-build 3.26.0, conda-smithy 3.24.1, and conda-forge-pinning 2023.07.28.20.44.13 --- .azure-pipelines/azure-pipelines-linux.yml | 5 ----- README.md | 12 ++++++------ 2 files changed, 6 insertions(+), 11 deletions(-) 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/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`: