Skip to content
Merged
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
b6faa26
Merge remote-tracking branch 'upstream/main' into rc
h-vetinari Jul 18, 2023
0cd990b
Revert "remove rc-channel sources & targets"
h-vetinari Jul 18, 2023
0704ff5
MNT: Re-rendered with conda-build 3.25.0, conda-smithy 3.24.0, and co…
h-vetinari Jul 19, 2023
3dcae7d
build from upstream main branch
h-vetinari Jul 19, 2023
c06df6b
fix jinja string concat and hard-coded version
h-vetinari Jul 19, 2023
8d205ff
rebase & fix patches
h-vetinari Jul 19, 2023
a1ba32e
fix compiler stack on osx vs. rc-label
h-vetinari Jul 19, 2023
2fed2ea
download archive of commit, instead of direct checkout
h-vetinari Jul 20, 2023
bc1242e
move skip to more obvious part of section
h-vetinari Jul 20, 2023
a7a9822
avoid redundant rename in install_clang_tools.sh
h-vetinari Jul 20, 2023
8703c7b
deal with library-extension for building from untagged commit
h-vetinari Jul 20, 2023
1ad4de1
Merge pull request #230 from h-vetinari/rc
h-vetinari Jul 21, 2023
5d13d3a
retrigger CI
h-vetinari Jul 21, 2023
6b634fa
Merge remote-tracking branch 'upstream/main' into rc
h-vetinari Jul 29, 2023
8613d72
clangdev 17.0.0.rc1
h-vetinari Jul 29, 2023
c018f30
MNT: Re-rendered with conda-build 3.26.0, conda-smithy 3.24.1, and co…
h-vetinari Jul 29, 2023
546174a
clangdev 17.0.0.rc1 (#237)
github-actions[bot] Jul 30, 2023
f9aa16a
clarify SOVER_EXT definition in install_llvm.sh
h-vetinari Jul 30, 2023
9cdf0f2
clang-tools now links to libxml2
h-vetinari Jul 30, 2023
7448bc8
clangdev 17.0.0.rc2
h-vetinari Aug 9, 2023
946e156
set LLVM_ENABLE_LIBCXX=ON on osx
h-vetinari Aug 10, 2023
056e5b5
require MacOS 10.13
h-vetinari Aug 10, 2023
e330824
MNT: Re-rendered with conda-build 3.26.0, conda-smithy 3.24.1, and co…
h-vetinari Aug 10, 2023
f4602f0
Merge pull request #238 from h-vetinari/rc
h-vetinari Aug 11, 2023
8b9c7dc
clangdev 17.0.0.rc3
h-vetinari Aug 23, 2023
178fbbf
handle rc suffix
h-vetinari Aug 23, 2023
a72d48b
clangdev 17.0.0.rc3 (#240)
github-actions[bot] Aug 23, 2023
277f2b3
Merge remote-tracking branch 'upstream/rc'
h-vetinari Sep 19, 2023
bec51e1
remove rc-channels
h-vetinari Sep 19, 2023
2794857
clangdev 17.0.0
h-vetinari Sep 19, 2023
82a41b8
Revert "fix compiler stack on osx vs. rc-label"
h-vetinari Sep 19, 2023
cbad9cb
MNT: Re-rendered with conda-build 3.26.1, conda-smithy 3.25.1, and co…
h-vetinari Sep 19, 2023
5d07ff2
clangdev 17.0.1
h-vetinari Sep 22, 2023
77ea915
Revert "require MacOS 10.13"
h-vetinari Sep 26, 2023
3e3f771
MNT: Re-rendered with conda-build 3.26.1, conda-smithy 3.26.2, and co…
h-vetinari Sep 26, 2023
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.

5 changes: 4 additions & 1 deletion .azure-pipelines/azure-pipelines-win.yml

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

7 changes: 0 additions & 7 deletions .ci_support/migrations/libxml2211.yaml

This file was deleted.

4 changes: 3 additions & 1 deletion .ci_support/osx_64_.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
MACOSX_DEPLOYMENT_TARGET:
- '10.9'
- '10.13'
MACOSX_SDK_VERSION:
- '10.13'
channel_sources:
- conda-forge
channel_targets:
Expand Down
10 changes: 5 additions & 5 deletions .scripts/run_osx_build.sh

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.

9 changes: 8 additions & 1 deletion recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,14 @@ rm -rf llvm-project
cd clang

IFS='.' read -r -a PKG_VER_ARRAY <<< "${PKG_VERSION}"
# default SOVER for tagged releases is just the major version
SOVER_EXT=${VER_ARR[0]}
if [[ "${PKG_VERSION}" == *dev0 ]]; then
# otherwise with git suffix
SOVER_EXT="${SOVER_EXT}git"
fi

sed -i.bak "s/libLTO.dylib/libLTO.${PKG_VER_ARRAY[0]}.dylib/g" lib/Driver/ToolChains/Darwin.cpp
sed -i.bak "s/libLTO.dylib/libLTO.${SOVER_EXT}.dylib/g" lib/Driver/ToolChains/Darwin.cpp

if [[ "$variant" == "hcc" ]]; then
CMAKE_ARGS="$CMAKE_ARGS -DKALMAR_BACKEND=HCC_BACKEND_AMDGPU -DHCC_VERSION_STRING=2.7-19365-24e69cd8-24e69cd8-24e69cd8"
Expand All @@ -36,6 +42,7 @@ fi

if [[ "$target_platform" == osx* ]]; then
export CXXFLAGS="$CXXFLAGS -DTARGET_OS_OSX=1"
CMAKE_ARGS="$CMAKE_ARGS -DLLVM_ENABLE_LIBCXX=ON"
fi

# disable -fno-plt due to some GCC bug causing linker errors, see
Expand Down
9 changes: 9 additions & 0 deletions recipe/conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ c_compiler: # [osx]
cxx_compiler: # [osx]
- clang_bootstrap # [osx]

# clang 17 should remain compatible with libcxx 17 (which will be pulled in
# as a test dependency despite requiring `__osx>=10.13`). Since libcxx has
# removed workarounds for MacOS<10.13, clang will fail while including
# the C++ headers, because those rely on things not present in older SDKs.
MACOSX_SDK_VERSION: # [osx and x86_64]
- "10.13" # [osx and x86_64]
MACOSX_DEPLOYMENT_TARGET: # [osx and x86_64]
- "10.13" # [osx and x86_64]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why this is needed here. Can you explain?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment tries to lay out my understanding. It was necessary during the rc-phase once there was a libcxx 17, which would get pulled in by clang, which would then fail when including the C++ stdlib (because how libcxx has removed fallbacks for the old macos SDK).

In theory, the requirement __osx>=10.13 on libcxx should be enough to exclude it in this feedstock, but that's not how our CI seems to work. So I needed to bump to 10.13 here as well. I didn't distinguish between SDK and deployment target, because I thought it would be easier on the resolver if the compiler itself also has the requirement, rather than just the stdlib (which is why I had also added it to the compiler activation).

I'm fine to revert this for now if you prefer. We'll just have to re-fix this feedstock one way or another as soon as libcxx 17 is live.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove it for now. Let's deal with it when I see an actual error.

# Starting from LLVM 14, the ABI of libclang doesn't necessarily
# match the major version anymore - cf. #170 and
# https://github.com/llvm/llvm-project/issues/54004
Expand Down
7 changes: 6 additions & 1 deletion recipe/install_clang_tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,18 @@ rm -rf lib/lib*.a
MAJOR_VERSION=$(echo ${PKG_VERSION} | cut -f1 -d".")
for f in ${PREFIX}/bin/clang-*; do
if [[ "$(basename $f)" == clang-format-* ]]; then
# already got versioned in install_clang_format.sh
continue
elif [[ "$(basename $f)" == "clang-${MAJOR_VERSION}" ]]; then
# installation also creates a versioned clang, no need to re-version it
continue
fi
rm -f ${PREFIX}/bin/$(basename $f)-${MAJOR_VERSION}
mv $f ${PREFIX}/bin/$(basename $f)-${MAJOR_VERSION};
ln -s ${PREFIX}/bin/$(basename $f)-${MAJOR_VERSION} $f;
done

rm ${PREFIX}/bin/clang-${MAJOR_VERSION}-${MAJOR_VERSION}
# part of output "clang", not "clang-tools"
rm ${PREFIX}/bin/clang-${MAJOR_VERSION}
rm ${PREFIX}/bin/clang-cpp-${MAJOR_VERSION}
rm ${PREFIX}/bin/clang-cl-${MAJOR_VERSION}
32 changes: 23 additions & 9 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
{% set version = "16.0.6" %}
{% set version = "17.0.1" %}
{% 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 %}
{% set minor_aware_ext = major_version + "." + version.split(".")[1] %}
{% set minor_aware_ext = major_version ~ "." ~ version.split(".")[1] %}
{% elif version.split(".")[-1].startswith("rc") %}
{% set minor_aware_ext = major_version ~ "rc" %}
{% elif version.split(".")[-1] == "dev0" %}
{% set minor_aware_ext = major_version ~ "git" %}
{% endif %}

{% if libclang_soversion is not defined %}
Expand All @@ -17,7 +21,7 @@ package:

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
sha256: b0e42aafc01ece2ca2b42e3526f54bebc4b1f1dc8de6e34f46a0446a13e882b9
patches:
- patches/0001-Fix-sysroot-detection-for-linux.patch
- patches/0002-clang-add-conda-specific-env-var-CONDA_BUILD_SYSROOT.patch
Expand Down Expand Up @@ -119,6 +123,7 @@ outputs:
- {{ pin_subpackage("libclang", exact=True) }}
- {{ pin_subpackage("libclang-cpp", exact=True) }}
- {{ pin_compatible("libcxx", max_pin=None) }} # [osx]
- __osx >={{ MACOSX_DEPLOYMENT_TARGET }} # [osx and x86_64]
- llvmdev =={{ version }}
test:
commands:
Expand All @@ -130,9 +135,10 @@ outputs:
- name: libclang-cpp{{ minor_aware_ext }}
script: install_libclang_cpp.sh # [unix]
files:
- lib/libclang-cpp.so.16 # [linux]
- lib/libclang-cpp.16.dylib # [osx]
- lib/libclang-cpp.so.{{ minor_aware_ext }} # [linux]
- lib/libclang-cpp.{{ minor_aware_ext }}.dylib # [osx]
build:
skip: true # [win]
track_features:
- hcc # [variant=="hcc"]
string: {{ variant }}_h{{ PKG_HASH }}_{{ build_number }}
Expand All @@ -143,7 +149,6 @@ outputs:
- zlib # [unix]
- libxml2 # [unix]
- zstd # [unix]
skip: true # [win]
requirements:
build:
- {{ compiler('cxx') }}
Expand All @@ -160,6 +165,7 @@ outputs:
- zlib
- zstd
run:
- __osx >={{ MACOSX_DEPLOYMENT_TARGET }} # [osx and x86_64]
- {{ pin_compatible("libcxx", max_pin=None) }} # [osx]
test:
commands:
Expand Down Expand Up @@ -202,6 +208,7 @@ outputs:
- zlib
- zstd
run:
- __osx >={{ MACOSX_DEPLOYMENT_TARGET }} # [osx and x86_64]
- {{ pin_compatible("libcxx", max_pin=None) }} # [osx]
- {{ pin_subpackage("libclang-cpp" ~ minor_aware_ext, exact=True) }} # [unix]
test:
Expand Down Expand Up @@ -247,6 +254,7 @@ outputs:
- zlib
- zstd
run:
- __osx >={{ MACOSX_DEPLOYMENT_TARGET }} # [osx and x86_64]
- {{ pin_compatible("libcxx", max_pin=None) }} # [osx]
test:
commands:
Expand Down Expand Up @@ -311,6 +319,7 @@ outputs:
- zlib
- zstd
run:
- __osx >={{ MACOSX_DEPLOYMENT_TARGET }} # [osx and x86_64]
- {{ pin_compatible("libcxx", max_pin=None) }} # [osx]
- {{ pin_subpackage("libclang" ~ libclang_soversion, exact=True) }}
test:
Expand Down Expand Up @@ -354,6 +363,7 @@ outputs:
- zlib
- zstd
run:
- __osx >={{ MACOSX_DEPLOYMENT_TARGET }} # [osx and x86_64]
- {{ pin_compatible("libcxx", max_pin=None) }} # [osx]
- {{ pin_subpackage("libclang-cpp" ~ minor_aware_ext, exact=True) }} # [unix]
run_constrained:
Expand Down Expand Up @@ -397,7 +407,8 @@ outputs:
- zlib
- zstd
run:
- gcc_impl_{{ target_platform }} # [linux]
- gcc_impl_{{ target_platform }} # [linux]
- __osx >={{ MACOSX_DEPLOYMENT_TARGET }} # [osx and x86_64]
- {{ pin_subpackage("clang-" ~ major_version, exact=True) }}
test:
commands:
Expand Down Expand Up @@ -427,6 +438,7 @@ outputs:
- zlib
- zstd
run:
- __osx >={{ MACOSX_DEPLOYMENT_TARGET }} # [osx and x86_64]
- {{ pin_subpackage("clang", exact=True) }}
test:
requires:
Expand Down Expand Up @@ -476,6 +488,7 @@ outputs:
- zlib
- zstd
run:
- __osx >={{ MACOSX_DEPLOYMENT_TARGET }} # [osx and x86_64]
- {{ pin_compatible("libcxx", max_pin=None) }} # [osx]
- {{ pin_subpackage("libclang-cpp" ~ minor_aware_ext, max_pin="x.x") }} # [unix]
test:
Expand Down Expand Up @@ -522,6 +535,7 @@ outputs:
- zlib
- zstd
run:
- __osx >={{ MACOSX_DEPLOYMENT_TARGET }} # [osx and x86_64]
- {{ pin_compatible("libcxx", max_pin=None) }} # [osx]
- {{ pin_subpackage("libclang-cpp" ~ minor_aware_ext, max_pin="x.x") }} # [unix]
- {{ pin_subpackage("clang-format-" ~ major_version, exact=True) }} # [unix]
Expand All @@ -541,7 +555,6 @@ outputs:
ignore_run_exports_from:
# the build fails if it doesn't find the following, but it's not used
- zlib # [unix]
- libxml2 # [unix]
- zstd # [unix]
requirements:
build:
Expand All @@ -567,6 +580,7 @@ outputs:
- zstd
run:
- ucrt # [win]
- __osx >={{ MACOSX_DEPLOYMENT_TARGET }} # [osx and x86_64]
- {{ pin_compatible("libcxx", max_pin=None) }} # [osx]
- {{ pin_subpackage("clang-format", exact=True) }}
- {{ pin_subpackage("libclang" ~ libclang_soversion, max_pin=None) }}
Expand Down
6 changes: 3 additions & 3 deletions recipe/patches/0001-Fix-sysroot-detection-for-linux.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From e46d9dd8f6701270b5243348ffb4b8c3430c4229 Mon Sep 17 00:00:00 2001
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
Expand All @@ -8,10 +8,10 @@ Subject: [PATCH 1/7] Fix sysroot detection for linux
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
index 1ba222bf83b..ee361924b9e 100644
--- a/clang/lib/Driver/ToolChains/Linux.cpp
+++ b/clang/lib/Driver/ToolChains/Linux.cpp
@@ -370,18 +370,30 @@ std::string Linux::computeSysRoot() const {
@@ -394,18 +394,30 @@ std::string Linux::computeSysRoot() const {
return std::string();
}

Expand Down
Loading