diff options
author | Yi Kong <yikong@google.com> | 2019-03-07 14:47:10 -0800 |
---|---|---|
committer | Yi Kong <yikong@google.com> | 2019-03-07 14:50:40 -0800 |
commit | 649b4adfc45b26ae937fe597ef6134d244f89686 (patch) | |
tree | 9a6837e6ff673f9f530804998d484c4383a0d41e | |
parent | 374532a04c019417faac07b7fdf62e83170649b4 (diff) | |
download | clang-649b4adfc45b26ae937fe597ef6134d244f89686.tar.gz |
Make HasFloat16 true for all architectures
Upstream Clang removed _Float16 literal support on non-ARM targets.
frameworks/ml/nn makes heavy use of _Float16 on x86, causing it fail to
build.
Make HasFloat16 true for now in Android toolchain so that NN could
continue to build.
Bug: 127391056
Change-Id: I2be6122d7b1dd8622d6b71606552e2afbfff62a4
-rw-r--r-- | lib/Basic/TargetInfo.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Basic/TargetInfo.cpp b/lib/Basic/TargetInfo.cpp index 5a75b857c2..923e70649a 100644 --- a/lib/Basic/TargetInfo.cpp +++ b/lib/Basic/TargetInfo.cpp @@ -34,7 +34,12 @@ TargetInfo::TargetInfo(const llvm::Triple &T) : TargetOpts(), Triple(T) { NoAsmVariants = false; HasLegalHalfType = false; HasFloat128 = false; - HasFloat16 = false; + + // Android-changed: Make HasFloat16 available by default + // http://b/127391056 + // HasFloat16 = false; + HasFloat16 = true; + PointerWidth = PointerAlign = 32; BoolWidth = BoolAlign = 8; IntWidth = IntAlign = 32; |