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
6 changes: 4 additions & 2 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -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 %}
Expand All @@ -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
Expand Down Expand Up @@ -437,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]
Expand Down
44 changes: 0 additions & 44 deletions recipe/patches/0001-Find-conda-gcc-installation.patch

This file was deleted.

48 changes: 41 additions & 7 deletions recipe/patches/0002-Fix-sysroot-detection-for-linux.patch
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
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;

Expand All @@ -27,5 +61,5 @@ index c6fb290ffd..fcacc1dcbd 100644

if (getVFS().exists(Path))
--
2.38.1.windows.1
2.38.1