aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-02-01 11:36:22 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2023-02-01 11:36:22 +0000
commit464934922c71056e7f672caea9d02222abcc41be (patch)
treed5c2e74872927e35e5fae5ece8c1d5363d47734a
parent7737538c2b032b86c72b09bab1629960a200e4cd (diff)
parent88088f66d624b96e9398790344443d3f7c6a4282 (diff)
downloadllvm-464934922c71056e7f672caea9d02222abcc41be.tar.gz
Merge "Snap for 9550355 from 2763906a15b3e1724ba29326c833994488b4b34f to sdk-release" into sdk-releaseplatform-tools-34.0.1platform-tools-34.0.0platform-tools-33.0.4
-rw-r--r--Android.bp5
-rw-r--r--include/llvm/ADT/STLExtras.h20
-rw-r--r--soong/llvm.go4
3 files changed, 26 insertions, 3 deletions
diff --git a/Android.bp b/Android.bp
index cbc59cb04a2d..4189f3073ca5 100644
--- a/Android.bp
+++ b/Android.bp
@@ -53,6 +53,11 @@ cc_defaults {
sanitize: {
hwaddress: false, // code size b/112437884
},
+ arch: {
+ riscv64: {
+ enabled: false,
+ },
+ },
}
// This module defines all of the defaults used to compiled llvm, except for
diff --git a/include/llvm/ADT/STLExtras.h b/include/llvm/ADT/STLExtras.h
index abd39dacc671..a032efa5cee2 100644
--- a/include/llvm/ADT/STLExtras.h
+++ b/include/llvm/ADT/STLExtras.h
@@ -36,7 +36,11 @@ namespace llvm {
//===----------------------------------------------------------------------===//
template<class Ty>
-struct identity : public std::unary_function<Ty, Ty> {
+struct identity {
+ // Android: In upstream LLVM, identity used to inherit from
+ // std::unary_function<Ty, Ty>, so use Ty here instead of Ty&.
+ using argument_type = Ty;
+ using result_type = Ty;
Ty &operator()(Ty &self) const {
return self;
}
@@ -46,14 +50,24 @@ struct identity : public std::unary_function<Ty, Ty> {
};
template<class Ty>
-struct less_ptr : public std::binary_function<Ty, Ty, bool> {
+struct less_ptr {
+ // Android: In upstream LLVM, less_ptr used to inherit from
+ // std::binary_function<Ty, Ty, bool>, so use Ty here instead of const Ty*.
+ using first_argument_type = Ty;
+ using second_argument_type = Ty;
+ using result_type = bool;
bool operator()(const Ty* left, const Ty* right) const {
return *left < *right;
}
};
template<class Ty>
-struct greater_ptr : public std::binary_function<Ty, Ty, bool> {
+struct greater_ptr {
+ // Android: In upstream LLVM, greater_ptr used to inherit from
+ // std::binary_function<Ty, Ty, bool>, so use Ty here instead of const Ty*.
+ using first_argument_type = Ty;
+ using second_argument_type = Ty;
+ using result_type = bool;
bool operator()(const Ty* left, const Ty* right) const {
return *right < *left;
}
diff --git a/soong/llvm.go b/soong/llvm.go
index 6a38fb56aec8..38e2f2036bae 100644
--- a/soong/llvm.go
+++ b/soong/llvm.go
@@ -98,12 +98,16 @@ func forceBuildLlvmComponents(ctx android.LoadHookContext) {
Linux_bionic_arm64 struct {
Enabled *bool
}
+ Linux_musl struct {
+ Enabled *bool
+ }
}
}
p := &props{}
p.Target.Darwin_arm64.Enabled = proptools.BoolPtr(true)
p.Target.Host.Enabled = proptools.BoolPtr(false)
p.Target.Linux_bionic_arm64.Enabled = proptools.BoolPtr(true)
+ p.Target.Linux_musl.Enabled = proptools.BoolPtr(true)
ctx.AppendProperties(p)
}
}