mirror of
https://git.proxmox.com/git/llvm-toolchain
synced 2025-08-14 13:55:54 +00:00
Add patch from Emanuele Rocca, to make SVE types available in device targets
This commit is contained in:
parent
b2c59c2e6e
commit
26407375db
7
debian/changelog
vendored
7
debian/changelog
vendored
@ -1,4 +1,7 @@
|
|||||||
llvm-toolchain-17 (1:17.0.6-13) UNRELEASED; urgency=medium
|
llvm-toolchain-17 (1:17.0.6-13) unstable; urgency=medium
|
||||||
|
|
||||||
|
[ Emanuele Rocca ]
|
||||||
|
* Make SVE types available in device targets (Closes: #1076578)
|
||||||
|
|
||||||
[ Matthias Klose ]
|
[ Matthias Klose ]
|
||||||
* Pass --package-metadata on distros with supporting linkers (starting
|
* Pass --package-metadata on distros with supporting linkers (starting
|
||||||
@ -7,7 +10,7 @@ llvm-toolchain-17 (1:17.0.6-13) UNRELEASED; urgency=medium
|
|||||||
ELF_PACKAGE_METADATA.
|
ELF_PACKAGE_METADATA.
|
||||||
Setting NO_PKG_METADATA=1 disables the generation of the package metadata.
|
Setting NO_PKG_METADATA=1 disables the generation of the package metadata.
|
||||||
|
|
||||||
-- Matthias Klose <doko@debian.org> Thu, 11 Jul 2024 09:10:08 +0200
|
-- Gianfranco Costamagna <locutusofborg@debian.org> Tue, 30 Jul 2024 09:15:47 +0200
|
||||||
|
|
||||||
llvm-toolchain-17 (1:17.0.6-12) unstable; urgency=medium
|
llvm-toolchain-17 (1:17.0.6-12) unstable; urgency=medium
|
||||||
|
|
||||||
|
56
debian/patches/llvm-toolchain-17-sve-types-aux-target.diff
vendored
Normal file
56
debian/patches/llvm-toolchain-17-sve-types-aux-target.diff
vendored
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
From: Emanuele Rocca <emanuele.rocca@arm.com>
|
||||||
|
Date: Fri, 19 Jul 2024 09:25:38 +0200
|
||||||
|
Subject: [PATCH] [Clang] make SVE types known to device targets too (#99446)
|
||||||
|
|
||||||
|
For the purpose of preprocessing and declarations in header files,
|
||||||
|
ensure clang accepts SVE types for both device and host targets.
|
||||||
|
|
||||||
|
Co-authored-by: Sander De Smalen <sander.desmalen@arm.com>
|
||||||
|
---
|
||||||
|
clang/lib/AST/ASTContext.cpp | 3 ++-
|
||||||
|
clang/lib/Sema/Sema.cpp | 4 +++-
|
||||||
|
clang/test/PCH/aarch64-sve-types.c | 2 ++
|
||||||
|
3 files changed, 7 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
Index: llvm-toolchain-17-17.0.6/clang/lib/AST/ASTContext.cpp
|
||||||
|
===================================================================
|
||||||
|
--- llvm-toolchain-17-17.0.6.orig/clang/lib/AST/ASTContext.cpp
|
||||||
|
+++ llvm-toolchain-17-17.0.6/clang/lib/AST/ASTContext.cpp
|
||||||
|
@@ -1396,7 +1396,8 @@ void ASTContext::InitBuiltinTypes(const
|
||||||
|
#include "clang/Basic/OpenCLExtensionTypes.def"
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (Target.hasAArch64SVETypes()) {
|
||||||
|
+ if (Target.hasAArch64SVETypes() ||
|
||||||
|
+ (AuxTarget && AuxTarget->hasAArch64SVETypes())) {
|
||||||
|
#define SVE_TYPE(Name, Id, SingletonId) \
|
||||||
|
InitBuiltinType(SingletonId, BuiltinType::Id);
|
||||||
|
#include "clang/Basic/AArch64SVEACLETypes.def"
|
||||||
|
Index: llvm-toolchain-17-17.0.6/clang/lib/Sema/Sema.cpp
|
||||||
|
===================================================================
|
||||||
|
--- llvm-toolchain-17-17.0.6.orig/clang/lib/Sema/Sema.cpp
|
||||||
|
+++ llvm-toolchain-17-17.0.6/clang/lib/Sema/Sema.cpp
|
||||||
|
@@ -423,7 +423,9 @@ void Sema::Initialize() {
|
||||||
|
#include "clang/Basic/OpenCLExtensionTypes.def"
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (Context.getTargetInfo().hasAArch64SVETypes()) {
|
||||||
|
+ if (Context.getTargetInfo().hasAArch64SVETypes() ||
|
||||||
|
+ (Context.getAuxTargetInfo() &&
|
||||||
|
+ Context.getAuxTargetInfo()->hasAArch64SVETypes())) {
|
||||||
|
#define SVE_TYPE(Name, Id, SingletonId) \
|
||||||
|
addImplicitTypedef(Name, Context.SingletonId);
|
||||||
|
#include "clang/Basic/AArch64SVEACLETypes.def"
|
||||||
|
Index: llvm-toolchain-17-17.0.6/clang/test/PCH/aarch64-sve-types.c
|
||||||
|
===================================================================
|
||||||
|
--- llvm-toolchain-17-17.0.6.orig/clang/test/PCH/aarch64-sve-types.c
|
||||||
|
+++ llvm-toolchain-17-17.0.6/clang/test/PCH/aarch64-sve-types.c
|
||||||
|
@@ -1,6 +1,8 @@
|
||||||
|
// RUN: %clang_cc1 -triple aarch64-linux-gnu -emit-pch -o %t %s
|
||||||
|
// RUN: %clang_cc1 -triple aarch64-linux-gnu -include-pch %t \
|
||||||
|
// RUN: -fsyntax-only -verify %s
|
||||||
|
+// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -aux-triple aarch64-linux-gnu \
|
||||||
|
+// RUN: -x hip-cpp-output -emit-pch -o %t %s
|
||||||
|
|
||||||
|
// expected-no-diagnostics
|
||||||
|
|
1
debian/patches/series
vendored
1
debian/patches/series
vendored
@ -155,3 +155,4 @@ mips/D154390-pre-R6.diff
|
|||||||
libsanitizer-timebits.diff
|
libsanitizer-timebits.diff
|
||||||
D154931-revert-loong64.patch
|
D154931-revert-loong64.patch
|
||||||
link-with-package-metadata.diff
|
link-with-package-metadata.diff
|
||||||
|
llvm-toolchain-17-sve-types-aux-target.diff
|
||||||
|
Loading…
Reference in New Issue
Block a user