Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2017-07-25 17:37:55 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2017-08-07 18:46:06 +0300
commite7c6b244c9db0892b4214f0795bec8c60d7ab4f0 (patch)
treea1b07678ab8d7bc7bccde8348598c6ac7fd7f366 /build_files/build_environment/patches/clang.diff
parent8b73c9a437ffe5b5d44bd670a4129b5850d15b04 (diff)
Build: add scripts to build dependencies for Windows and macOS.
Note these are intended for platform maintainers, we do not intend to support users making their own builds with these. For that precompiled libraries from lib/ should be used. Implemented by Martijn Berger, Ray Molenkamp and Brecht Van Lommel. Differential Revision: https://developer.blender.org/D2753
Diffstat (limited to 'build_files/build_environment/patches/clang.diff')
-rw-r--r--build_files/build_environment/patches/clang.diff127
1 files changed, 127 insertions, 0 deletions
diff --git a/build_files/build_environment/patches/clang.diff b/build_files/build_environment/patches/clang.diff
new file mode 100644
index 00000000000..724e92f8163
--- /dev/null
+++ b/build_files/build_environment/patches/clang.diff
@@ -0,0 +1,127 @@
+--- cfe/trunk/lib/Serialization/ASTWriter.cpp
++++ cfe/trunk/lib/Serialization/ASTWriter.cpp
+@@ -56,14 +56,14 @@
+ using namespace clang::serialization;
+
+ template <typename T, typename Allocator>
+-static StringRef bytes(const std::vector<T, Allocator> &v) {
++static StringRef data(const std::vector<T, Allocator> &v) {
+ if (v.empty()) return StringRef();
+ return StringRef(reinterpret_cast<const char*>(&v[0]),
+ sizeof(T) * v.size());
+ }
+
+ template <typename T>
+-static StringRef bytes(const SmallVectorImpl<T> &v) {
++static StringRef data(const SmallVectorImpl<T> &v) {
+ return StringRef(reinterpret_cast<const char*>(v.data()),
+ sizeof(T) * v.size());
+ }
+@@ -1385,7 +1385,7 @@
+ Record.push_back(INPUT_FILE_OFFSETS);
+ Record.push_back(InputFileOffsets.size());
+ Record.push_back(UserFilesNum);
+- Stream.EmitRecordWithBlob(OffsetsAbbrevCode, Record, bytes(InputFileOffsets));
++ Stream.EmitRecordWithBlob(OffsetsAbbrevCode, Record, data(InputFileOffsets));
+ }
+
+ //===----------------------------------------------------------------------===//
+@@ -1771,7 +1771,7 @@
+ Record.push_back(SOURCE_LOCATION_OFFSETS);
+ Record.push_back(SLocEntryOffsets.size());
+ Record.push_back(SourceMgr.getNextLocalOffset() - 1); // skip dummy
+- Stream.EmitRecordWithBlob(SLocOffsetsAbbrev, Record, bytes(SLocEntryOffsets));
++ Stream.EmitRecordWithBlob(SLocOffsetsAbbrev, Record, data(SLocEntryOffsets));
+
+ // Write the source location entry preloads array, telling the AST
+ // reader which source locations entries it should load eagerly.
+@@ -2087,7 +2087,7 @@
+ Record.push_back(MacroOffsets.size());
+ Record.push_back(FirstMacroID - NUM_PREDEF_MACRO_IDS);
+ Stream.EmitRecordWithBlob(MacroOffsetAbbrev, Record,
+- bytes(MacroOffsets));
++ data(MacroOffsets));
+ }
+
+ void ASTWriter::WritePreprocessorDetail(PreprocessingRecord &PPRec) {
+@@ -2185,7 +2185,7 @@
+ Record.push_back(PPD_ENTITIES_OFFSETS);
+ Record.push_back(FirstPreprocessorEntityID - NUM_PREDEF_PP_ENTITY_IDS);
+ Stream.EmitRecordWithBlob(PPEOffsetAbbrev, Record,
+- bytes(PreprocessedEntityOffsets));
++ data(PreprocessedEntityOffsets));
+ }
+ }
+
+@@ -2548,7 +2548,7 @@
+ Record.push_back(CXX_BASE_SPECIFIER_OFFSETS);
+ Record.push_back(CXXBaseSpecifiersOffsets.size());
+ Stream.EmitRecordWithBlob(BaseSpecifierOffsetAbbrev, Record,
+- bytes(CXXBaseSpecifiersOffsets));
++ data(CXXBaseSpecifiersOffsets));
+ }
+
+ //===----------------------------------------------------------------------===//
+@@ -2623,7 +2623,7 @@
+ Decls.push_back(std::make_pair((*D)->getKind(), GetDeclRef(*D)));
+
+ ++NumLexicalDeclContexts;
+- Stream.EmitRecordWithBlob(DeclContextLexicalAbbrev, Record, bytes(Decls));
++ Stream.EmitRecordWithBlob(DeclContextLexicalAbbrev, Record, data(Decls));
+ return Offset;
+ }
+
+@@ -2642,7 +2642,7 @@
+ Record.push_back(TYPE_OFFSET);
+ Record.push_back(TypeOffsets.size());
+ Record.push_back(FirstTypeID - NUM_PREDEF_TYPE_IDS);
+- Stream.EmitRecordWithBlob(TypeOffsetAbbrev, Record, bytes(TypeOffsets));
++ Stream.EmitRecordWithBlob(TypeOffsetAbbrev, Record, data(TypeOffsets));
+
+ // Write the declaration offsets array
+ Abbrev = new BitCodeAbbrev();
+@@ -2655,7 +2655,7 @@
+ Record.push_back(DECL_OFFSET);
+ Record.push_back(DeclOffsets.size());
+ Record.push_back(FirstDeclID - NUM_PREDEF_DECL_IDS);
+- Stream.EmitRecordWithBlob(DeclOffsetAbbrev, Record, bytes(DeclOffsets));
++ Stream.EmitRecordWithBlob(DeclOffsetAbbrev, Record, data(DeclOffsets));
+ }
+
+ void ASTWriter::WriteFileDeclIDsMap() {
+@@ -2680,7 +2680,7 @@
+ unsigned AbbrevCode = Stream.EmitAbbrev(Abbrev);
+ Record.push_back(FILE_SORTED_DECLS);
+ Record.push_back(FileSortedIDs.size());
+- Stream.EmitRecordWithBlob(AbbrevCode, Record, bytes(FileSortedIDs));
++ Stream.EmitRecordWithBlob(AbbrevCode, Record, data(FileSortedIDs));
+ }
+
+ void ASTWriter::WriteComments() {
+@@ -2893,7 +2893,7 @@
+ Record.push_back(SelectorOffsets.size());
+ Record.push_back(FirstSelectorID - NUM_PREDEF_SELECTOR_IDS);
+ Stream.EmitRecordWithBlob(SelectorOffsetAbbrev, Record,
+- bytes(SelectorOffsets));
++ data(SelectorOffsets));
+ }
+ }
+
+@@ -3253,7 +3253,7 @@
+ Record.push_back(IdentifierOffsets.size());
+ Record.push_back(FirstIdentID - NUM_PREDEF_IDENT_IDS);
+ Stream.EmitRecordWithBlob(IdentifierOffsetAbbrev, Record,
+- bytes(IdentifierOffsets));
++ data(IdentifierOffsets));
+ }
+
+ //===----------------------------------------------------------------------===//
+@@ -4046,7 +4046,7 @@
+ Record.clear();
+ Record.push_back(TU_UPDATE_LEXICAL);
+ Stream.EmitRecordWithBlob(TuUpdateLexicalAbbrev, Record,
+- bytes(NewGlobalDecls));
++ data(NewGlobalDecls));
+
+ // And a visible updates block for the translation unit.
+ Abv = new llvm::BitCodeAbbrev();