mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Backed out changeset 4523372c4945 (bug 1462498) for Win build bustages on a CLOSED TREE
--HG-- rename : build/build-clang/clang-6-linux64.json => build/build-clang/clang-6-pre-linux64.json rename : build/build-clang/clang-6-macosx64.json => build/build-clang/clang-6-pre-macosx64.json rename : taskcluster/scripts/misc/build-clang-6-linux-macosx-cross.sh => taskcluster/scripts/misc/build-clang-6-pre-linux-macosx-cross.sh rename : taskcluster/scripts/misc/build-clang-6-linux.sh => taskcluster/scripts/misc/build-clang-6-pre-linux.sh
This commit is contained in:
parent
a20173c1a1
commit
f489d7af8e
@ -1,14 +1,14 @@
|
||||
{
|
||||
"llvm_revision": "326563",
|
||||
"llvm_revision": "317840",
|
||||
"stages": "3",
|
||||
"build_libcxx": true,
|
||||
"build_type": "Release",
|
||||
"assertions": false,
|
||||
"llvm_repo": "https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_600/final",
|
||||
"clang_repo": "https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_600/final",
|
||||
"compiler_repo": "https://llvm.org/svn/llvm-project/compiler-rt/tags/RELEASE_600/final",
|
||||
"libcxx_repo": "https://llvm.org/svn/llvm-project/libcxx/tags/RELEASE_600/final",
|
||||
"libcxxabi_repo": "https://llvm.org/svn/llvm-project/libcxxabi/tags/RELEASE_600/final",
|
||||
"llvm_repo": "https://llvm.org/svn/llvm-project/llvm/trunk",
|
||||
"clang_repo": "https://llvm.org/svn/llvm-project/cfe/trunk",
|
||||
"compiler_repo": "https://llvm.org/svn/llvm-project/compiler-rt/trunk",
|
||||
"libcxx_repo": "https://llvm.org/svn/llvm-project/libcxx/trunk",
|
||||
"libcxxabi_repo": "https://llvm.org/svn/llvm-project/libcxxabi/trunk",
|
||||
"python_path": "/usr/bin/python2.7",
|
||||
"gcc_dir": "/builds/worker/workspace/build/src/gcc",
|
||||
"cc": "/builds/worker/workspace/build/src/gcc/bin/gcc",
|
@ -1,15 +1,15 @@
|
||||
{
|
||||
"llvm_revision": "326563",
|
||||
"llvm_revision": "317840",
|
||||
"stages": "1",
|
||||
"build_libcxx": true,
|
||||
"build_type": "Release",
|
||||
"assertions": false,
|
||||
"osx_cross_compile": true,
|
||||
"llvm_repo": "https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_600/final",
|
||||
"clang_repo": "https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_600/final",
|
||||
"compiler_repo": "https://llvm.org/svn/llvm-project/compiler-rt/tags/RELEASE_600/final",
|
||||
"libcxx_repo": "https://llvm.org/svn/llvm-project/libcxx/tags/RELEASE_600/final",
|
||||
"libcxxabi_repo": "https://llvm.org/svn/llvm-project/libcxxabi/tags/RELEASE_600/final",
|
||||
"llvm_repo": "https://llvm.org/svn/llvm-project/llvm/trunk",
|
||||
"clang_repo": "https://llvm.org/svn/llvm-project/cfe/trunk",
|
||||
"compiler_repo": "https://llvm.org/svn/llvm-project/compiler-rt/trunk",
|
||||
"libcxx_repo": "https://llvm.org/svn/llvm-project/libcxx/trunk",
|
||||
"libcxxabi_repo": "https://llvm.org/svn/llvm-project/libcxxabi/trunk",
|
||||
"python_path": "/usr/bin/python2.7",
|
||||
"gcc_dir": "/builds/worker/workspace/build/src/gcc",
|
||||
"cc": "/builds/worker/workspace/build/src/clang/bin/clang",
|
||||
@ -21,6 +21,7 @@
|
||||
"ld": "/builds/worker/workspace/build/src/clang/bin/clang",
|
||||
"patches": [
|
||||
"compiler-rt-cross-compile.patch",
|
||||
"compiler-rt-no-codesign.patch"
|
||||
"compiler-rt-no-codesign.patch",
|
||||
"r321543.patch"
|
||||
]
|
||||
}
|
@ -1,18 +1,20 @@
|
||||
{
|
||||
"llvm_revision": "326563",
|
||||
"llvm_revision": "317840",
|
||||
"stages": "3",
|
||||
"build_libcxx": false,
|
||||
"build_type": "Release",
|
||||
"assertions": false,
|
||||
"llvm_repo": "https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_600/final",
|
||||
"clang_repo": "https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_600/final",
|
||||
"lld_repo": "https://llvm.org/svn/llvm-project/lld/tags/RELEASE_600/final",
|
||||
"compiler_repo": "https://llvm.org/svn/llvm-project/compiler-rt/tags/RELEASE_600/final",
|
||||
"libcxx_repo": "https://llvm.org/svn/llvm-project/libcxx/tags/RELEASE_600/final",
|
||||
"llvm_repo": "https://llvm.org/svn/llvm-project/llvm/trunk",
|
||||
"clang_repo": "https://llvm.org/svn/llvm-project/cfe/trunk",
|
||||
"lld_repo": "https://llvm.org/svn/llvm-project/lld/trunk",
|
||||
"compiler_repo": "https://llvm.org/svn/llvm-project/compiler-rt/trunk",
|
||||
"libcxx_repo": "https://llvm.org/svn/llvm-project/libcxx/trunk",
|
||||
"python_path": "c:/mozilla-build/python/python.exe",
|
||||
"cc": "cl.exe",
|
||||
"cxx": "cl.exe",
|
||||
"patches": [
|
||||
"r318309.patch",
|
||||
"r320462.patch",
|
||||
"msvc-host-x64.patch",
|
||||
"loosen-msvc-detection.patch"
|
||||
]
|
||||
|
@ -1,19 +1,23 @@
|
||||
{
|
||||
"llvm_revision": "326563",
|
||||
"llvm_revision": "317840",
|
||||
"stages": "3",
|
||||
"build_libcxx": false,
|
||||
"build_type": "Release",
|
||||
"assertions": false,
|
||||
"llvm_repo": "https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_600/final",
|
||||
"clang_repo": "https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_600/final",
|
||||
"lld_repo": "https://llvm.org/svn/llvm-project/lld/tags/RELEASE_600/final",
|
||||
"compiler_repo": "https://llvm.org/svn/llvm-project/compiler-rt/tags/RELEASE_600/final",
|
||||
"libcxx_repo": "https://llvm.org/svn/llvm-project/libcxx/tags/RELEASE_600/final",
|
||||
"llvm_repo": "https://llvm.org/svn/llvm-project/llvm/trunk",
|
||||
"clang_repo": "https://llvm.org/svn/llvm-project/cfe/trunk",
|
||||
"lld_repo": "https://llvm.org/svn/llvm-project/lld/trunk",
|
||||
"compiler_repo": "https://llvm.org/svn/llvm-project/compiler-rt/trunk",
|
||||
"libcxx_repo": "https://llvm.org/svn/llvm-project/libcxx/trunk",
|
||||
"python_path": "c:/mozilla-build/python/python.exe",
|
||||
"cc": "cl.exe",
|
||||
"cxx": "cl.exe",
|
||||
"ml": "ml64.exe",
|
||||
"patches": [
|
||||
"loosen-msvc-detection.patch"
|
||||
"r318309.patch",
|
||||
"r320462.patch",
|
||||
"loosen-msvc-detection.patch",
|
||||
"hide-gcda-profiling-symbols.patch",
|
||||
"fflush-before-unlocking.patch"
|
||||
]
|
||||
}
|
||||
|
12
build/build-clang/fflush-before-unlocking.patch
Normal file
12
build/build-clang/fflush-before-unlocking.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff --git a/compiler-rt/lib/profile/GCDAProfiling.c b/compiler-rt/lib/profile/GCDAProfiling.c
|
||||
index f0c05075a..11b1c4557 100644
|
||||
--- a/compiler-rt/lib/profile/GCDAProfiling.c
|
||||
+++ b/compiler-rt/lib/profile/GCDAProfiling.c
|
||||
@@ -468,6 +468,7 @@ void llvm_gcda_end_file() {
|
||||
unmap_file();
|
||||
}
|
||||
|
||||
+ fflush(output_file);
|
||||
flock(fd, LOCK_UN);
|
||||
fclose(output_file);
|
||||
output_file = NULL;
|
279
build/build-clang/r318309.patch
Normal file
279
build/build-clang/r318309.patch
Normal file
@ -0,0 +1,279 @@
|
||||
From a53ee5453ba652fc640467847415dd44c24fed02 Mon Sep 17 00:00:00 2001
|
||||
From: Hans Wennborg <hans@hanshq.net>
|
||||
Date: Wed, 15 Nov 2017 17:11:53 +0000
|
||||
Subject: [PATCH] BuiltinOperatorOverloadBuilder: Don't consider types that are
|
||||
unavailable on the target (PR35174)
|
||||
|
||||
In the PR, Clang ended up in a situation where it tried to mangle the
|
||||
__float128 type, which isn't supported when targetingt MSVC, because
|
||||
Clang instantiated a variable template with that type when searching for
|
||||
a conversion to use in an arithmetic expression.
|
||||
|
||||
Differential revision: https://reviews.llvm.org/D39579
|
||||
|
||||
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@318309 91177308-0d34-0410-b5e6-96231b3b80d8
|
||||
|
||||
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp
|
||||
index f4b8b4e34a8..fa6279800dc 100644
|
||||
--- a/clang/lib/Sema/SemaOverload.cpp
|
||||
+++ b/clang/lib/Sema/SemaOverload.cpp
|
||||
@@ -7615,53 +7615,62 @@ class BuiltinOperatorOverloadBuilder {
|
||||
SmallVectorImpl<BuiltinCandidateTypeSet> &CandidateTypes;
|
||||
OverloadCandidateSet &CandidateSet;
|
||||
|
||||
- // Define some constants used to index and iterate over the arithemetic types
|
||||
- // provided via the getArithmeticType() method below.
|
||||
- // The "promoted arithmetic types" are the arithmetic
|
||||
+ static constexpr int ArithmeticTypesCap = 24;
|
||||
+ SmallVector<CanQualType, ArithmeticTypesCap> ArithmeticTypes;
|
||||
+
|
||||
+ // Define some indices used to iterate over the arithemetic types in
|
||||
+ // ArithmeticTypes. The "promoted arithmetic types" are the arithmetic
|
||||
// types are that preserved by promotion (C++ [over.built]p2).
|
||||
- static const unsigned FirstIntegralType = 4;
|
||||
- static const unsigned LastIntegralType = 21;
|
||||
- static const unsigned FirstPromotedIntegralType = 4,
|
||||
- LastPromotedIntegralType = 12;
|
||||
- static const unsigned FirstPromotedArithmeticType = 0,
|
||||
- LastPromotedArithmeticType = 12;
|
||||
- static const unsigned NumArithmeticTypes = 21;
|
||||
-
|
||||
- /// \brief Get the canonical type for a given arithmetic type index.
|
||||
- CanQualType getArithmeticType(unsigned index) {
|
||||
- assert(index < NumArithmeticTypes);
|
||||
- static CanQualType ASTContext::* const
|
||||
- ArithmeticTypes[NumArithmeticTypes] = {
|
||||
- // Start of promoted types.
|
||||
- &ASTContext::FloatTy,
|
||||
- &ASTContext::DoubleTy,
|
||||
- &ASTContext::LongDoubleTy,
|
||||
- &ASTContext::Float128Ty,
|
||||
-
|
||||
- // Start of integral types.
|
||||
- &ASTContext::IntTy,
|
||||
- &ASTContext::LongTy,
|
||||
- &ASTContext::LongLongTy,
|
||||
- &ASTContext::Int128Ty,
|
||||
- &ASTContext::UnsignedIntTy,
|
||||
- &ASTContext::UnsignedLongTy,
|
||||
- &ASTContext::UnsignedLongLongTy,
|
||||
- &ASTContext::UnsignedInt128Ty,
|
||||
- // End of promoted types.
|
||||
-
|
||||
- &ASTContext::BoolTy,
|
||||
- &ASTContext::CharTy,
|
||||
- &ASTContext::WCharTy,
|
||||
- &ASTContext::Char16Ty,
|
||||
- &ASTContext::Char32Ty,
|
||||
- &ASTContext::SignedCharTy,
|
||||
- &ASTContext::ShortTy,
|
||||
- &ASTContext::UnsignedCharTy,
|
||||
- &ASTContext::UnsignedShortTy,
|
||||
- // End of integral types.
|
||||
- // FIXME: What about complex? What about half?
|
||||
- };
|
||||
- return S.Context.*ArithmeticTypes[index];
|
||||
+ unsigned FirstIntegralType,
|
||||
+ LastIntegralType;
|
||||
+ unsigned FirstPromotedIntegralType,
|
||||
+ LastPromotedIntegralType;
|
||||
+ unsigned FirstPromotedArithmeticType,
|
||||
+ LastPromotedArithmeticType;
|
||||
+ unsigned NumArithmeticTypes;
|
||||
+
|
||||
+ void InitArithmeticTypes() {
|
||||
+ // Start of promoted types.
|
||||
+ FirstPromotedArithmeticType = 0;
|
||||
+ ArithmeticTypes.push_back(S.Context.FloatTy);
|
||||
+ ArithmeticTypes.push_back(S.Context.DoubleTy);
|
||||
+ ArithmeticTypes.push_back(S.Context.LongDoubleTy);
|
||||
+ if (S.Context.getTargetInfo().hasFloat128Type())
|
||||
+ ArithmeticTypes.push_back(S.Context.Float128Ty);
|
||||
+
|
||||
+ // Start of integral types.
|
||||
+ FirstIntegralType = ArithmeticTypes.size();
|
||||
+ FirstPromotedIntegralType = ArithmeticTypes.size();
|
||||
+ ArithmeticTypes.push_back(S.Context.IntTy);
|
||||
+ ArithmeticTypes.push_back(S.Context.LongTy);
|
||||
+ ArithmeticTypes.push_back(S.Context.LongLongTy);
|
||||
+ if (S.Context.getTargetInfo().hasInt128Type())
|
||||
+ ArithmeticTypes.push_back(S.Context.Int128Ty);
|
||||
+ ArithmeticTypes.push_back(S.Context.UnsignedIntTy);
|
||||
+ ArithmeticTypes.push_back(S.Context.UnsignedLongTy);
|
||||
+ ArithmeticTypes.push_back(S.Context.UnsignedLongLongTy);
|
||||
+ if (S.Context.getTargetInfo().hasInt128Type())
|
||||
+ ArithmeticTypes.push_back(S.Context.UnsignedInt128Ty);
|
||||
+ LastPromotedIntegralType = ArithmeticTypes.size();
|
||||
+ LastPromotedArithmeticType = ArithmeticTypes.size();
|
||||
+ // End of promoted types.
|
||||
+
|
||||
+ ArithmeticTypes.push_back(S.Context.BoolTy);
|
||||
+ ArithmeticTypes.push_back(S.Context.CharTy);
|
||||
+ ArithmeticTypes.push_back(S.Context.WCharTy);
|
||||
+ ArithmeticTypes.push_back(S.Context.Char16Ty);
|
||||
+ ArithmeticTypes.push_back(S.Context.Char32Ty);
|
||||
+ ArithmeticTypes.push_back(S.Context.SignedCharTy);
|
||||
+ ArithmeticTypes.push_back(S.Context.ShortTy);
|
||||
+ ArithmeticTypes.push_back(S.Context.UnsignedCharTy);
|
||||
+ ArithmeticTypes.push_back(S.Context.UnsignedShortTy);
|
||||
+ LastIntegralType = ArithmeticTypes.size();
|
||||
+ NumArithmeticTypes = ArithmeticTypes.size();
|
||||
+ // End of integral types.
|
||||
+ // FIXME: What about complex? What about half?
|
||||
+
|
||||
+ assert(ArithmeticTypes.size() <= ArithmeticTypesCap &&
|
||||
+ "Enough inline storage for all arithmetic types.");
|
||||
}
|
||||
|
||||
/// \brief Helper method to factor out the common pattern of adding overloads
|
||||
@@ -7720,18 +7729,8 @@ class BuiltinOperatorOverloadBuilder {
|
||||
HasArithmeticOrEnumeralCandidateType),
|
||||
CandidateTypes(CandidateTypes),
|
||||
CandidateSet(CandidateSet) {
|
||||
- // Validate some of our static helper constants in debug builds.
|
||||
- assert(getArithmeticType(FirstPromotedIntegralType) == S.Context.IntTy &&
|
||||
- "Invalid first promoted integral type");
|
||||
- assert(getArithmeticType(LastPromotedIntegralType - 1)
|
||||
- == S.Context.UnsignedInt128Ty &&
|
||||
- "Invalid last promoted integral type");
|
||||
- assert(getArithmeticType(FirstPromotedArithmeticType)
|
||||
- == S.Context.FloatTy &&
|
||||
- "Invalid first promoted arithmetic type");
|
||||
- assert(getArithmeticType(LastPromotedArithmeticType - 1)
|
||||
- == S.Context.UnsignedInt128Ty &&
|
||||
- "Invalid last promoted arithmetic type");
|
||||
+
|
||||
+ InitArithmeticTypes();
|
||||
}
|
||||
|
||||
// C++ [over.built]p3:
|
||||
@@ -7758,7 +7757,7 @@ class BuiltinOperatorOverloadBuilder {
|
||||
for (unsigned Arith = (Op == OO_PlusPlus? 0 : 1);
|
||||
Arith < NumArithmeticTypes; ++Arith) {
|
||||
addPlusPlusMinusMinusStyleOverloads(
|
||||
- getArithmeticType(Arith),
|
||||
+ ArithmeticTypes[Arith],
|
||||
VisibleTypeConversionsQuals.hasVolatile(),
|
||||
VisibleTypeConversionsQuals.hasRestrict());
|
||||
}
|
||||
@@ -7831,7 +7830,7 @@ class BuiltinOperatorOverloadBuilder {
|
||||
|
||||
for (unsigned Arith = FirstPromotedArithmeticType;
|
||||
Arith < LastPromotedArithmeticType; ++Arith) {
|
||||
- QualType ArithTy = getArithmeticType(Arith);
|
||||
+ QualType ArithTy = ArithmeticTypes[Arith];
|
||||
S.AddBuiltinCandidate(&ArithTy, Args, CandidateSet);
|
||||
}
|
||||
|
||||
@@ -7871,7 +7870,7 @@ class BuiltinOperatorOverloadBuilder {
|
||||
|
||||
for (unsigned Int = FirstPromotedIntegralType;
|
||||
Int < LastPromotedIntegralType; ++Int) {
|
||||
- QualType IntTy = getArithmeticType(Int);
|
||||
+ QualType IntTy = ArithmeticTypes[Int];
|
||||
S.AddBuiltinCandidate(&IntTy, Args, CandidateSet);
|
||||
}
|
||||
|
||||
@@ -8099,8 +8098,8 @@ class BuiltinOperatorOverloadBuilder {
|
||||
Left < LastPromotedArithmeticType; ++Left) {
|
||||
for (unsigned Right = FirstPromotedArithmeticType;
|
||||
Right < LastPromotedArithmeticType; ++Right) {
|
||||
- QualType LandR[2] = { getArithmeticType(Left),
|
||||
- getArithmeticType(Right) };
|
||||
+ QualType LandR[2] = { ArithmeticTypes[Left],
|
||||
+ ArithmeticTypes[Right] };
|
||||
S.AddBuiltinCandidate(LandR, Args, CandidateSet);
|
||||
}
|
||||
}
|
||||
@@ -8143,8 +8142,8 @@ class BuiltinOperatorOverloadBuilder {
|
||||
Left < LastPromotedIntegralType; ++Left) {
|
||||
for (unsigned Right = FirstPromotedIntegralType;
|
||||
Right < LastPromotedIntegralType; ++Right) {
|
||||
- QualType LandR[2] = { getArithmeticType(Left),
|
||||
- getArithmeticType(Right) };
|
||||
+ QualType LandR[2] = { ArithmeticTypes[Left],
|
||||
+ ArithmeticTypes[Right] };
|
||||
S.AddBuiltinCandidate(LandR, Args, CandidateSet);
|
||||
}
|
||||
}
|
||||
@@ -8324,18 +8323,18 @@ class BuiltinOperatorOverloadBuilder {
|
||||
for (unsigned Right = FirstPromotedArithmeticType;
|
||||
Right < LastPromotedArithmeticType; ++Right) {
|
||||
QualType ParamTypes[2];
|
||||
- ParamTypes[1] = getArithmeticType(Right);
|
||||
+ ParamTypes[1] = ArithmeticTypes[Right];
|
||||
|
||||
// Add this built-in operator as a candidate (VQ is empty).
|
||||
ParamTypes[0] =
|
||||
- S.Context.getLValueReferenceType(getArithmeticType(Left));
|
||||
+ S.Context.getLValueReferenceType(ArithmeticTypes[Left]);
|
||||
S.AddBuiltinCandidate(ParamTypes, Args, CandidateSet,
|
||||
/*IsAssigmentOperator=*/isEqualOp);
|
||||
|
||||
// Add this built-in operator as a candidate (VQ is 'volatile').
|
||||
if (VisibleTypeConversionsQuals.hasVolatile()) {
|
||||
ParamTypes[0] =
|
||||
- S.Context.getVolatileType(getArithmeticType(Left));
|
||||
+ S.Context.getVolatileType(ArithmeticTypes[Left]);
|
||||
ParamTypes[0] = S.Context.getLValueReferenceType(ParamTypes[0]);
|
||||
S.AddBuiltinCandidate(ParamTypes, Args, CandidateSet,
|
||||
/*IsAssigmentOperator=*/isEqualOp);
|
||||
@@ -8390,15 +8389,15 @@ class BuiltinOperatorOverloadBuilder {
|
||||
for (unsigned Right = FirstPromotedIntegralType;
|
||||
Right < LastPromotedIntegralType; ++Right) {
|
||||
QualType ParamTypes[2];
|
||||
- ParamTypes[1] = getArithmeticType(Right);
|
||||
+ ParamTypes[1] = ArithmeticTypes[Right];
|
||||
|
||||
// Add this built-in operator as a candidate (VQ is empty).
|
||||
ParamTypes[0] =
|
||||
- S.Context.getLValueReferenceType(getArithmeticType(Left));
|
||||
+ S.Context.getLValueReferenceType(ArithmeticTypes[Left]);
|
||||
S.AddBuiltinCandidate(ParamTypes, Args, CandidateSet);
|
||||
if (VisibleTypeConversionsQuals.hasVolatile()) {
|
||||
// Add this built-in operator as a candidate (VQ is 'volatile').
|
||||
- ParamTypes[0] = getArithmeticType(Left);
|
||||
+ ParamTypes[0] = ArithmeticTypes[Left];
|
||||
ParamTypes[0] = S.Context.getVolatileType(ParamTypes[0]);
|
||||
ParamTypes[0] = S.Context.getLValueReferenceType(ParamTypes[0]);
|
||||
S.AddBuiltinCandidate(ParamTypes, Args, CandidateSet);
|
||||
diff --git a/test/SemaCXX/microsoft-vs-float128.cpp b/test/SemaCXX/microsoft-vs-float128.cpp
|
||||
new file mode 100644
|
||||
index 00000000000..d271e470032
|
||||
--- /dev/null
|
||||
+++ b/test/SemaCXX/microsoft-vs-float128.cpp
|
||||
@@ -0,0 +1,34 @@
|
||||
+// RUN: %clang_cc1 -triple x86_64-linux-gnu -fms-compatibility -fms-extensions -fsyntax-only -verify -std=c++11 %s
|
||||
+// RUN: %clang_cc1 -triple i686-pc-win32 -fms-compatibility -fms-extensions -fsyntax-only -verify -std=c++11 -DMS %s
|
||||
+
|
||||
+template <bool> struct enable_if {};
|
||||
+template<> struct enable_if<true> { typedef void type; };
|
||||
+
|
||||
+template <typename, typename> struct is_same { static constexpr bool value = false; };
|
||||
+template <typename T> struct is_same<T, T> { static constexpr bool value = true; };
|
||||
+
|
||||
+
|
||||
+
|
||||
+
|
||||
+struct S {
|
||||
+ // The only numeric types S can be converted to is __int128 and __float128.
|
||||
+ template <typename T, typename = typename enable_if<
|
||||
+ !((__is_integral(T) && sizeof(T) != 16) ||
|
||||
+ is_same<T, float>::value ||
|
||||
+ is_same<T, double>::value ||
|
||||
+ is_same<T, long double>::value)>::type>
|
||||
+ operator T() { return T(); }
|
||||
+};
|
||||
+
|
||||
+void f() {
|
||||
+#ifdef MS
|
||||
+ // When targeting Win32, __float128 and __int128 do not exist, so the S
|
||||
+ // object cannot be converted to anything usable in the expression.
|
||||
+ // expected-error@+2{{invalid operands to binary expression ('S' and 'double')}}
|
||||
+#endif
|
||||
+ double d = S() + 1.0;
|
||||
+#ifndef MS
|
||||
+ // expected-error@-2{{use of overloaded operator '+' is ambiguous}}
|
||||
+ // expected-note@-3 36{{built-in candidate operator+}}
|
||||
+#endif
|
||||
+}
|
18
build/build-clang/r320462.patch
Normal file
18
build/build-clang/r320462.patch
Normal file
@ -0,0 +1,18 @@
|
||||
https://reviews.llvm.org/D41089
|
||||
|
||||
[COFF] Don't error out on undefined references to __enclave_config
|
||||
|
||||
This is required for linking the CRT from MSVC 2017 15.5.
|
||||
|
||||
diff --git a/lld/COFF/Driver.cpp b/lld/COFF/Driver.cpp
|
||||
--- a/lld/COFF/Driver.cpp
|
||||
+++ b/lld/COFF/Driver.cpp
|
||||
@@ -1167,6 +1167,8 @@ void LinkerDriver::link(ArrayRef<const char *> ArgsArr) {
|
||||
Symtab->addAbsolute(mangle("__guard_iat_table"), 0);
|
||||
Symtab->addAbsolute(mangle("__guard_longjmp_count"), 0);
|
||||
Symtab->addAbsolute(mangle("__guard_longjmp_table"), 0);
|
||||
+ // Needed for MSVC 2017 15.5 CRT.
|
||||
+ Symtab->addAbsolute(mangle("__enclave_config"), 0);
|
||||
|
||||
// This code may add new undefined symbols to the link, which may enqueue more
|
||||
// symbol resolution tasks, so we need to continue executing tasks until we
|
33
build/build-clang/r321543.patch
Normal file
33
build/build-clang/r321543.patch
Normal file
@ -0,0 +1,33 @@
|
||||
From: Yi Kong <yikong@google.com>
|
||||
Date: Thu, 28 Dec 2017 23:06:24 +0000
|
||||
Subject: [PATCH] Ignore the DISPATCH_NOESCAPE if not defined
|
||||
|
||||
This macro is only defined after XCode 8, causing build breakage for
|
||||
build systems with prior versions. Ignore DISPATCH_NOESCAPE if not
|
||||
defined.
|
||||
|
||||
Differential Revision: https://reviews.llvm.org/D41601
|
||||
|
||||
|
||||
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@321543 91177308-0d34-0410-b5e6-96231b3b80d8
|
||||
---
|
||||
lib/tsan/rtl/tsan_libdispatch_mac.cc | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/lib/tsan/rtl/tsan_libdispatch_mac.cc b/lib/tsan/rtl/tsan_libdispatch_mac.cc
|
||||
index eb22e4baa..d6c1ca662 100644
|
||||
--- a/compiler-rt/lib/tsan/rtl/tsan_libdispatch_mac.cc
|
||||
+++ b/compiler-rt/lib/tsan/rtl/tsan_libdispatch_mac.cc
|
||||
@@ -25,6 +25,11 @@
|
||||
#include <dispatch/dispatch.h>
|
||||
#include <pthread.h>
|
||||
|
||||
+// DISPATCH_NOESCAPE is not defined prior to XCode 8.
|
||||
+#ifndef DISPATCH_NOESCAPE
|
||||
+#define DISPATCH_NOESCAPE
|
||||
+#endif
|
||||
+
|
||||
typedef long long_t; // NOLINT
|
||||
|
||||
namespace __tsan {
|
||||
|
@ -546,7 +546,7 @@ linux64-asan/opt:
|
||||
tooltool-downloads: public
|
||||
need-xvfb: true
|
||||
toolchains:
|
||||
- linux64-clang-6
|
||||
- linux64-clang-6-pre
|
||||
- linux64-gcc
|
||||
- linux64-rust
|
||||
- linux64-sccache
|
||||
@ -577,7 +577,7 @@ linux64-asan-fuzzing/opt:
|
||||
tooltool-downloads: public
|
||||
need-xvfb: true
|
||||
toolchains:
|
||||
- linux64-clang-6
|
||||
- linux64-clang-6-pre
|
||||
- linux64-gcc
|
||||
- linux64-rust
|
||||
- linux64-sccache
|
||||
@ -611,7 +611,7 @@ linux64-asan-reporter-nightly/opt:
|
||||
tooltool-downloads: public
|
||||
need-xvfb: true
|
||||
toolchains:
|
||||
- linux64-clang-6
|
||||
- linux64-clang-6-pre
|
||||
- linux64-gcc
|
||||
- linux64-rust
|
||||
- linux64-sccache
|
||||
@ -641,7 +641,7 @@ linux64-asan/debug:
|
||||
tooltool-downloads: public
|
||||
need-xvfb: true
|
||||
toolchains:
|
||||
- linux64-clang-6
|
||||
- linux64-clang-6-pre
|
||||
- linux64-gcc
|
||||
- linux64-rust
|
||||
- linux64-sccache
|
||||
|
@ -89,7 +89,7 @@ macosx64-asan-fuzzing/opt:
|
||||
tooltool-downloads: internal
|
||||
toolchains:
|
||||
- linux64-cctools-port
|
||||
- linux64-clang-6-macosx-cross
|
||||
- linux64-clang-6-pre-macosx-cross
|
||||
- linux64-hfsplus
|
||||
- linux64-libdmg
|
||||
- linux64-llvm-dsymutil
|
||||
|
@ -169,6 +169,6 @@ sm-fuzzing-linux64/opt:
|
||||
run:
|
||||
spidermonkey-variant: fuzzing
|
||||
toolchains:
|
||||
- linux64-clang-6
|
||||
- linux64-clang-6-pre
|
||||
- linux64-gcc
|
||||
- linux64-rust
|
||||
|
@ -70,33 +70,33 @@ linux64-clang-5:
|
||||
toolchains:
|
||||
- linux64-gcc-4.9
|
||||
|
||||
linux64-clang-6:
|
||||
description: "Clang 6 toolchain build"
|
||||
linux64-clang-6-pre:
|
||||
description: "Clang 6 Pre toolchain build"
|
||||
treeherder:
|
||||
kind: build
|
||||
platform: toolchains/opt
|
||||
symbol: TL(clang6)
|
||||
symbol: TL(clang6p)
|
||||
tier: 1
|
||||
worker-type: aws-provisioner-v1/gecko-{level}-b-linux-xlarge
|
||||
worker:
|
||||
max-run-time: 7200
|
||||
run:
|
||||
using: toolchain-script
|
||||
script: build-clang-6-linux.sh
|
||||
script: build-clang-6-pre-linux.sh
|
||||
resources:
|
||||
- 'build/build-clang/build-clang.py'
|
||||
- 'build/build-clang/clang-6-linux64.json'
|
||||
- 'build/build-clang/clang-6-pre-linux64.json'
|
||||
- 'taskcluster/scripts/misc/tooltool-download.sh'
|
||||
toolchain-artifact: public/build/clang.tar.xz
|
||||
toolchains:
|
||||
- linux64-gcc-4.9
|
||||
|
||||
linux64-clang-6-macosx-cross:
|
||||
description: "Clang 6 toolchain build with MacOS Compiler RT libs"
|
||||
linux64-clang-6-pre-macosx-cross:
|
||||
description: "Clang 6 Pre toolchain build with MacOS Compiler RT libs"
|
||||
treeherder:
|
||||
kind: build
|
||||
platform: toolchains/opt
|
||||
symbol: TL(clang6-macosx-cross)
|
||||
symbol: TL(clang6p-macosx-cross)
|
||||
tier: 1
|
||||
worker-type: aws-provisioner-v1/gecko-{level}-b-linux
|
||||
worker:
|
||||
@ -105,16 +105,16 @@ linux64-clang-6-macosx-cross:
|
||||
TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/macosx64/cross-clang.manifest"
|
||||
run:
|
||||
using: toolchain-script
|
||||
script: build-clang-6-linux-macosx-cross.sh
|
||||
script: build-clang-6-pre-linux-macosx-cross.sh
|
||||
resources:
|
||||
- 'build/build-clang/build-clang.py'
|
||||
- 'build/build-clang/clang-6-macosx64.json'
|
||||
- 'build/build-clang/clang-6-pre-macosx64.json'
|
||||
- 'taskcluster/scripts/misc/tooltool-download.sh'
|
||||
toolchain-artifact: public/build/clang.tar.xz
|
||||
tooltool-downloads: internal
|
||||
toolchains:
|
||||
- linux64-cctools-port
|
||||
- linux64-clang-6
|
||||
- linux64-clang-6-pre
|
||||
- linux64-gcc-4.9
|
||||
|
||||
linux64-clang-tidy:
|
||||
|
@ -25,7 +25,7 @@ set +x
|
||||
|
||||
cd build/build-clang
|
||||
# |mach python| sets up a virtualenv for us!
|
||||
../../mach python ./build-clang.py -c clang-6-macosx64.json --skip-tar
|
||||
../../mach python ./build-clang.py -c clang-6-pre-macosx64.json --skip-tar
|
||||
|
||||
# We now have a native macosx64 toolchain.
|
||||
# What we want is a native linux64 toolchain which can target macosx64 and use the sanitizer dylibs.
|
@ -16,7 +16,7 @@ set +x
|
||||
|
||||
cd build/build-clang
|
||||
# |mach python| sets up a virtualenv for us!
|
||||
../../mach python ./build-clang.py -c clang-6-linux64.json
|
||||
../../mach python ./build-clang.py -c clang-6-pre-linux64.json
|
||||
|
||||
set -x
|
||||
|
Loading…
Reference in New Issue
Block a user