Skip to content

Commit

Permalink
Update ROOT patches for 6.28.4 (conda-forge#232)
Browse files Browse the repository at this point in the history
automerged PR by conda-forge/automerge-action
  • Loading branch information
github-actions[bot] authored Jul 27, 2023
2 parents 4c30a68 + 3d69a5c commit 537141b
Show file tree
Hide file tree
Showing 20 changed files with 396 additions and 44 deletions.
17 changes: 6 additions & 11 deletions .azure-pipelines/azure-pipelines-linux.yml

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

8 changes: 4 additions & 4 deletions .azure-pipelines/azure-pipelines-osx.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.

2 changes: 1 addition & 1 deletion .ci_support/linux_64_variantdefault.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ channel_targets:
cxx_compiler:
- gxx
cxx_compiler_version:
- '11'
- '12'
docker_image:
- quay.io/condaforge/linux-anvil-cos7-x86_64
pin_run_as_build:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ channel_targets:
cxx_compiler:
- gxx
cxx_compiler_version:
- '11'
- '12'
docker_image:
- quay.io/condaforge/linux-anvil-cos7-x86_64
pin_run_as_build:
Expand All @@ -21,6 +21,6 @@ python:
target_platform:
- linux-64
variant:
- root_62800
- root_62804
zlib:
- '1.2'
2 changes: 1 addition & 1 deletion .ci_support/linux_aarch64_variantdefault.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ channel_targets:
cxx_compiler:
- gxx
cxx_compiler_version:
- '11'
- '12'
docker_image:
- quay.io/condaforge/linux-anvil-cos7-x86_64
target_platform:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ channel_targets:
cxx_compiler:
- gxx
cxx_compiler_version:
- '11'
- '12'
docker_image:
- quay.io/condaforge/linux-anvil-cos7-x86_64
target_platform:
- linux-aarch64
variant:
- root_62800
- root_62804
zlib:
- '1.2'
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ docker_image:
target_platform:
- linux-ppc64le
variant:
- root_62800
- root_62804
zlib:
- '1.2'
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ macos_machine:
target_platform:
- osx-64
variant:
- root_62800
- root_62804
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ macos_machine:
target_platform:
- osx-arm64
variant:
- root_62800
- root_62804
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.

20 changes: 10 additions & 10 deletions README.md

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

2 changes: 1 addition & 1 deletion recipe/conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ cxx_compiler_version: # [osx or (linux and ppc64le)]
variant:
- default
- hcc # [linux]
- root_62800 # [linux or osx]
- root_62804 # [linux or osx]
12 changes: 9 additions & 3 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% set version = "13.0.1" %}
{% set major_version = version.split(".")[0] %}
{% set build_number = 1 %}
{% set build_number = 2 %}

{% set minor_aware_ext = major_version %}
{% set minor_int = version.split(".")[1] | int %}
Expand Down Expand Up @@ -116,6 +116,12 @@ source:
- patches/root/0081-Do-not-install-Clang-Cling-Config.cmake-in-the-proje.patch # [variant and variant.startswith("root_")]
- patches/root/0082-AST-Print-honor-AlwaysIncludeTypeForTemplateArgument.patch # [variant and variant.startswith("root_")]
- patches/root/0083-Relax-assertion-on-generating-destructor-call.patch # [variant and variant.startswith("root_")]
- patches/root/0001-Deserialize-LValuePathSerializationHelper-s-type-pro.patch # [variant and variant.startswith("root_")]
- patches/root/0002-Do-not-evaluate-value-dependent-immediate-invocation.patch # [variant and variant.startswith("root_")]
- patches/root/0003-Backport-clang-Allocate-2-bits-to-store-the-constexp.patch # [variant and variant.startswith("root_")]
- patches/root/0004-Implement-a-module-attribute-optional-to-allow-missi.patch # [variant and variant.startswith("root_")]
- patches/root/0005-Add-cplusplus20-as-module-requirement.patch # [variant and variant.startswith("root_")]
- patches/root/0006-survive-Inon-accessible-directory.patch # [variant and variant.startswith("root_")]
folder: .
- url: https://github.com/llvm/llvm-project/releases/download/llvmorg-{{ version.replace(".rc", "-rc") }}/clang-tools-extra-{{ version.replace(".rc", "rc") }}.src.tar.xz
sha256: cc2bc8598848513fa2257a270083e986fd61048347eccf1d801926ea709392d0
Expand Down Expand Up @@ -318,10 +324,10 @@ outputs:
- llvmdev =={{ version }}
- llvm =={{ version }}
- zlib # [linux or win]
- {{ pin_compatible("libclang-cpp" + minor_aware_ext, exact=True) }} # [unix]
- {{ pin_subpackage("libclang-cpp" + minor_aware_ext, exact=True) }} # [unix]
run:
- {{ pin_compatible("libcxx", max_pin=None) }} # [osx]
- {{ pin_compatible("libclang-cpp" + minor_aware_ext, exact=True) }} # [unix]
- {{ pin_subpackage("libclang-cpp" + minor_aware_ext, exact=True) }} # [unix]
run_constrained:
- clangdev {{ version }}
- clangxx {{ version }}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
From b40dd66575e4fb81b8802d7a35bd14b28c54c37d Mon Sep 17 00:00:00 2001
From: Chuanqi Xu <[email protected]>
Date: Tue, 6 Dec 2022 17:38:57 +0800
Subject: [PATCH 1/6] Deserialize LValuePathSerializationHelper's type properly

Close https://github.com/llvm/llvm-project/issues/58716.

Tested with libcxx's modules build.

When we read the type of
LValuePathSerializationHelper, we didn't read the correct type. We read
the element type as its name suggests. But the problem here is that it
looks like that both the usage and serialization use its type as the
top level type. So here is the mismatch.

Actually, the type of LValuePathSerializationHelper is never used after
Deserialization without the assertion. So it doesn't matter for the
release users. And this patch shouldn't change the behavior too.

Reviewed By: erichkeane

Differential Revision: https://reviews.llvm.org/D139406
---
include/clang/AST/APValue.h | 2 +-
include/clang/AST/AbstractBasicReader.h | 5 +++--
lib/AST/APValue.cpp | 4 ++--
3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/include/clang/AST/APValue.h b/include/clang/AST/APValue.h
index 5f4ac02f53..4e22d6c844 100644
--- a/include/clang/AST/APValue.h
+++ b/include/clang/AST/APValue.h
@@ -238,7 +238,7 @@ public:
}
};
class LValuePathSerializationHelper {
- const void *ElemTy;
+ const void *Ty;

public:
ArrayRef<LValuePathEntry> Path;
diff --git a/include/clang/AST/AbstractBasicReader.h b/include/clang/AST/AbstractBasicReader.h
index 5505d661b4..ea09a6d74d 100644
--- a/include/clang/AST/AbstractBasicReader.h
+++ b/include/clang/AST/AbstractBasicReader.h
@@ -190,7 +190,8 @@ public:

APValue::LValuePathSerializationHelper readLValuePathSerializationHelper(
SmallVectorImpl<APValue::LValuePathEntry> &path) {
- auto elemTy = asImpl().readQualType();
+ auto origTy = asImpl().readQualType();
+ auto elemTy = origTy;
unsigned pathLength = asImpl().readUInt32();
for (unsigned i = 0; i < pathLength; ++i) {
if (elemTy->template getAs<RecordType>()) {
@@ -208,7 +209,7 @@ public:
APValue::LValuePathEntry::ArrayIndex(asImpl().readUInt32()));
}
}
- return APValue::LValuePathSerializationHelper(path, elemTy);
+ return APValue::LValuePathSerializationHelper(path, origTy);
}

Qualifiers readQualifiers() {
diff --git a/lib/AST/APValue.cpp b/lib/AST/APValue.cpp
index 9a9233bc1e..b2bf04d628 100644
--- a/lib/AST/APValue.cpp
+++ b/lib/AST/APValue.cpp
@@ -156,10 +156,10 @@ void APValue::LValuePathEntry::Profile(llvm::FoldingSetNodeID &ID) const {

APValue::LValuePathSerializationHelper::LValuePathSerializationHelper(
ArrayRef<LValuePathEntry> Path, QualType ElemTy)
- : ElemTy((const void *)ElemTy.getTypePtrOrNull()), Path(Path) {}
+ : Ty((const void *)ElemTy.getTypePtrOrNull()), Path(Path) {}

QualType APValue::LValuePathSerializationHelper::getType() {
- return QualType::getFromOpaquePtr(ElemTy);
+ return QualType::getFromOpaquePtr(Ty);
}

namespace {
--
2.34.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
From d3c46d7eea97a03287d70f68abda8b59a492eb9b Mon Sep 17 00:00:00 2001
From: Evgeny Shulgin <[email protected]>
Date: Fri, 25 Feb 2022 16:55:08 +0100
Subject: [PATCH 2/6] Do not evaluate value-dependent immediate invocations

Value-dependent ConstantExprs are not meant to be evaluated.
There is an assert in Expr::EvaluateAsConstantExpr that ensures this condition.
But before this patch the method was called without prior check.

Fixes https://github.com/llvm/llvm-project/issues/52768

Reviewed By: erichkeane

Differential Revision: https://reviews.llvm.org/D119375
---
lib/Sema/SemaExpr.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index ca41bc619f..01280681d0 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -16662,7 +16662,10 @@ ExprResult Sema::CheckForImmediateInvocation(ExprResult E, FunctionDecl *Decl) {
ConstantExpr::getStorageKind(Decl->getReturnType().getTypePtr(),
getASTContext()),
/*IsImmediateInvocation*/ true);
- ExprEvalContexts.back().ImmediateInvocationCandidates.emplace_back(Res, 0);
+ /// Value-dependent constant expressions should not be immediately
+ /// evaluated until they are instantiated.
+ if (!Res->isValueDependent())
+ ExprEvalContexts.back().ImmediateInvocationCandidates.emplace_back(Res, 0);
return Res;
}

--
2.34.1

Loading

0 comments on commit 537141b

Please sign in to comment.