Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .azure-pipelines/azure-pipelines-linux.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% set version = "17.0.0.dev0" %}
{% set version = "17.0.0.rc1" %}
{% set major_version = version.split(".")[0] %}
{% set build_number = 0 %}

Expand All @@ -18,21 +18,18 @@ 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-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
- 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"]
Expand Down Expand Up @@ -441,6 +438,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]
Expand Down
41 changes: 0 additions & 41 deletions recipe/patches/0001-Find-conda-gcc-installation.patch

This file was deleted.

48 changes: 48 additions & 0 deletions recipe/patches/0001-Fix-sysroot-detection-for-linux.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
From 4d6597584b90d2bc17b440dcdeff29cdc934a6dd Mon Sep 17 00:00:00 2001
From: Isuru Fernando <[email protected]>
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 1ba222bf83b..ee361924b9e 100644
--- a/clang/lib/Driver/ToolChains/Linux.cpp
+++ b/clang/lib/Driver/ToolChains/Linux.cpp
@@ -394,18 +394,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();

28 changes: 0 additions & 28 deletions recipe/patches/0002-Fix-sysroot-detection-for-linux.patch

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,33 +1,29 @@
From 71e378ea8d60be6768548552bb759e167169e132 Mon Sep 17 00:00:00 2001
From 3d234ba553a1ec9078e107803da4f97b483f8e94 Mon Sep 17 00:00:00 2001
From: Nehal J Wani <[email protected]>
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 be8632b0954..04fa0916a7a 100644
index 488350169ef..168e5977d8f 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/lib/Driver/Driver.cpp
@@ -1341,8 +1341,13 @@ Compilation *Driver::BuildCompilation(ArrayRef<const char *> ArgList) {
@@ -1348,6 +1348,11 @@ Compilation *Driver::BuildCompilation(ArrayRef<const char *> ArgList) {
CompilerPath = Split.second;
}
}
- if (const Arg *A = Args.getLastArg(options::OPT__sysroot_EQ))
- SysRoot = A->getValue();
+ if (std::optional<std::string> CondaBuildSysrootValue =
+ llvm::sys::Process::GetEnv("CONDA_BUILD_SYSROOT")) {
+ SysRoot = *CondaBuildSysrootValue;
+ } else {
+ if (const Arg *A = Args.getLastArg(options::OPT__sysroot_EQ))
+ SysRoot = A->getValue();
+ }
+ // 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__dyld_prefix_EQ))
DyldPrefix = A->getValue();

diff --git a/clang/lib/Lex/InitHeaderSearch.cpp b/clang/lib/Lex/InitHeaderSearch.cpp
index 41382d7cb3f..3f2fab2b5bb 100644
--- a/clang/lib/Lex/InitHeaderSearch.cpp
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 278d19cdfa3bed3d983590b7a58d3bc4ecfe2e0d Mon Sep 17 00:00:00 2001
From 703241c36d0d97cdbf8caaf9020a1ba68ca7dba8 Mon Sep 17 00:00:00 2001
From: Ray Donnelly <[email protected]>
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:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 24a7281ff97a5b2081a1e336b286acb91c58f900 Mon Sep 17 00:00:00 2001
From fa5e626e9e956791d467547eddaea6d42f405cde Mon Sep 17 00:00:00 2001
From: Isuru Fernando <[email protected]>
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 +++++
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From c23ee33d6a264db0f1910ee2f1bd37f725d1cce2 Mon Sep 17 00:00:00 2001
From b65c6470a8778b0dbc760ed297407d6e8afb4f66 Mon Sep 17 00:00:00 2001
From: Isuru Fernando <[email protected]>
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 ++++++++++
Expand Down
Loading