chore(cxx_common): update Clang/LLVM to r360148 (#3722)

* chore(cxx_common): update Clang/LLVM to r360148

* fix(cxx_common): allow removing up to prefix in cc_resources
diff --git a/kythe/cxx/indexer/cxx/IndexerASTHooks.cc b/kythe/cxx/indexer/cxx/IndexerASTHooks.cc
index e2feb80..ef12243 100644
--- a/kythe/cxx/indexer/cxx/IndexerASTHooks.cc
+++ b/kythe/cxx/indexer/cxx/IndexerASTHooks.cc
@@ -4568,6 +4568,7 @@
       UNSUPPORTED_CLANG_TYPE(Atomic);
       UNSUPPORTED_CLANG_TYPE(Pipe);
       UNSUPPORTED_CLANG_TYPE(DependentVector);
+      UNSUPPORTED_CLANG_TYPE(MacroQualified);
     }
 #undef UNSUPPORTED_CLANG_TYPE
 #undef DELEGATE_TYPE
diff --git a/tools/build_rules/cc_resources.bzl b/tools/build_rules/cc_resources.bzl
index d66f157..b16d967 100644
--- a/tools/build_rules/cc_resources.bzl
+++ b/tools/build_rules/cc_resources.bzl
@@ -1,8 +1,13 @@
-def cc_resources(name, data):
+def cc_resources(name, data, strip = None):
+    if strip:
+        basename_expr = "$${j##*%s}" % (strip,)
+    else:
+        basename_expr = "$$(basename \"$${j}\")"
     out_inc = name + ".inc"
     cmd = ('echo "static const struct FileToc kPackedFiles[] = {" > $(@); \n' +
-           "for j in $(SRCS); do\n" +
-           '  echo "{\\"$$(basename "$${j}")\\"," >> $(@);\n' +
+           "for j in $(SRCS); do\n" + (
+               '  echo "{\\"%s\\"," >> $(@);\n' % (basename_expr,)
+           ) +
            '  echo "R\\"filecontent($$(< $${j}))filecontent\\"" >> $(@);\n' +
            '  echo "}," >> $(@);\n' +
            "done &&\n" +
diff --git a/tools/build_rules/llvm/generated_cmake_targets.bzl b/tools/build_rules/llvm/generated_cmake_targets.bzl
index 90acafb..d3ab42f 100644
--- a/tools/build_rules/llvm/generated_cmake_targets.bzl
+++ b/tools/build_rules/llvm/generated_cmake_targets.bzl
@@ -39,6 +39,8 @@
     ctx.set(ctx, "FFI_INCLUDE_DIR", "", "CACHE", "PATH", "Additional directory, where CMake should search for ffi.h or ffi/ffi.h")
     ctx.set(ctx, "LLVM_TARGET_ARCH", "host", "CACHE", "STRING", "Set target to use for LLVM JIT or use \\\"host\\\" for automatic detection.")
     ctx.set(ctx, "LLVM_ENABLE_LIBXML2", "ON", "CACHE", "STRING", "Use libxml2 if available. Can be ON, OFF, or FORCE_ON")
+    ctx.set(ctx, "LLVM_Z3_INSTALL_DIR", "", "CACHE", "STRING", "Install directory of the Z3 solver.")
+    ctx.set(ctx, "LLVM_ENABLE_Z3_SOLVER_DEFAULT", "")
     ctx.set(ctx, "LLVM_TARGETS_TO_BUILD", "", "")
     ctx.set(ctx, "LLVM_ABI_BREAKING_CHECKS", "WITH_ASSERTS", "CACHE", "STRING", "Enable abi-breaking checks.  Can be WITH_ASSERTS, FORCE_ON or FORCE_OFF.")
     ctx.set(ctx, "LLVM_CODESIGNING_IDENTITY", "", "CACHE", "STRING", "Sign executables and dylibs with the given identity or skip if empty (Darwin Only)")
@@ -84,7 +86,7 @@
     ctx = ctx.enter_directory(ctx, "lib/Support")
     ctx.set(ctx, "system_libs")
     ctx.set(ctx, "delayload_flags")
-    ctx.add_llvm_library(ctx, "LLVMSupport", "AArch64TargetParser.cpp", "ARMTargetParser.cpp", "AMDGPUMetadata.cpp", "APFloat.cpp", "APInt.cpp", "APSInt.cpp", "ARMBuildAttrs.cpp", "ARMAttributeParser.cpp", "ARMWinEH.cpp", "Allocator.cpp", "BinaryStreamError.cpp", "BinaryStreamReader.cpp", "BinaryStreamRef.cpp", "BinaryStreamWriter.cpp", "BlockFrequency.cpp", "BranchProbability.cpp", "BuryPointer.cpp", "CachePruning.cpp", "circular_raw_ostream.cpp", "Chrono.cpp", "COM.cpp", "CodeGenCoverage.cpp", "CommandLine.cpp", "Compression.cpp", "ConvertUTF.cpp", "ConvertUTFWrapper.cpp", "CrashRecoveryContext.cpp", "DataExtractor.cpp", "Debug.cpp", "DebugCounter.cpp", "DeltaAlgorithm.cpp", "DAGDeltaAlgorithm.cpp", "DJB.cpp", "Error.cpp", "ErrorHandling.cpp", "FileCheck.cpp", "FileUtilities.cpp", "FileOutputBuffer.cpp", "FoldingSet.cpp", "FormattedStream.cpp", "FormatVariadic.cpp", "GlobPattern.cpp", "GraphWriter.cpp", "Hashing.cpp", "InitLLVM.cpp", "IntEqClasses.cpp", "IntervalMap.cpp", "ItaniumManglingCanonicalizer.cpp", "JamCRC.cpp", "JSON.cpp", "KnownBits.cpp", "LEB128.cpp", "LineIterator.cpp", "Locale.cpp", "LockFileManager.cpp", "LowLevelType.cpp", "ManagedStatic.cpp", "MathExtras.cpp", "MemoryBuffer.cpp", "MD5.cpp", "NativeFormatting.cpp", "Optional.cpp", "Options.cpp", "Parallel.cpp", "PluginLoader.cpp", "PrettyStackTrace.cpp", "RandomNumberGenerator.cpp", "Regex.cpp", "ScaledNumber.cpp", "ScopedPrinter.cpp", "SHA1.cpp", "Signposts.cpp", "SmallPtrSet.cpp", "SmallVector.cpp", "SourceMgr.cpp", "SpecialCaseList.cpp", "Statistic.cpp", "StringExtras.cpp", "StringMap.cpp", "StringPool.cpp", "StringSaver.cpp", "StringRef.cpp", "SymbolRemappingReader.cpp", "SystemUtils.cpp", "TarWriter.cpp", "TargetParser.cpp", "ThreadPool.cpp", "Timer.cpp", "ToolOutputFile.cpp", "TrigramIndex.cpp", "Triple.cpp", "Twine.cpp", "Unicode.cpp", "UnicodeCaseFold.cpp", "VersionTuple.cpp", "VirtualFileSystem.cpp", "WithColor.cpp", "YAMLParser.cpp", "YAMLTraits.cpp", "raw_os_ostream.cpp", "raw_ostream.cpp", "regcomp.c", "regerror.c", "regexec.c", "regfree.c", "regstrlcpy.c", "xxhash.cpp", "Atomic.cpp", "DynamicLibrary.cpp", "Errno.cpp", "Host.cpp", "Memory.cpp", "Mutex.cpp", "Path.cpp", "Process.cpp", "Program.cpp", "RWMutex.cpp", "Signals.cpp", "TargetRegistry.cpp", "ThreadLocal.cpp", "Threading.cpp", "Valgrind.cpp", "Watchdog.cpp", "ADDITIONAL_HEADER_DIRS", "Unix", "Windows", "/include/llvm/ADT", "/include/llvm/Support", "", "LINK_LIBS", "", "")
+    ctx.add_llvm_library(ctx, "LLVMSupport", "AArch64TargetParser.cpp", "ARMTargetParser.cpp", "AMDGPUMetadata.cpp", "APFloat.cpp", "APInt.cpp", "APSInt.cpp", "ARMBuildAttrs.cpp", "ARMAttributeParser.cpp", "ARMWinEH.cpp", "Allocator.cpp", "BinaryStreamError.cpp", "BinaryStreamReader.cpp", "BinaryStreamRef.cpp", "BinaryStreamWriter.cpp", "BlockFrequency.cpp", "BranchProbability.cpp", "BuryPointer.cpp", "CachePruning.cpp", "circular_raw_ostream.cpp", "Chrono.cpp", "COM.cpp", "CodeGenCoverage.cpp", "CommandLine.cpp", "Compression.cpp", "CRC.cpp", "ConvertUTF.cpp", "ConvertUTFWrapper.cpp", "CrashRecoveryContext.cpp", "DataExtractor.cpp", "Debug.cpp", "DebugCounter.cpp", "DeltaAlgorithm.cpp", "DAGDeltaAlgorithm.cpp", "DJB.cpp", "Error.cpp", "ErrorHandling.cpp", "FileCheck.cpp", "FileUtilities.cpp", "FileOutputBuffer.cpp", "FoldingSet.cpp", "FormattedStream.cpp", "FormatVariadic.cpp", "GlobPattern.cpp", "GraphWriter.cpp", "Hashing.cpp", "InitLLVM.cpp", "IntEqClasses.cpp", "IntervalMap.cpp", "ItaniumManglingCanonicalizer.cpp", "JamCRC.cpp", "JSON.cpp", "KnownBits.cpp", "LEB128.cpp", "LineIterator.cpp", "Locale.cpp", "LockFileManager.cpp", "LowLevelType.cpp", "ManagedStatic.cpp", "MathExtras.cpp", "MemoryBuffer.cpp", "MD5.cpp", "NativeFormatting.cpp", "Optional.cpp", "Options.cpp", "Parallel.cpp", "PluginLoader.cpp", "PrettyStackTrace.cpp", "RandomNumberGenerator.cpp", "Regex.cpp", "ScaledNumber.cpp", "ScopedPrinter.cpp", "SHA1.cpp", "Signposts.cpp", "SmallPtrSet.cpp", "SmallVector.cpp", "SourceMgr.cpp", "SpecialCaseList.cpp", "Statistic.cpp", "StringExtras.cpp", "StringMap.cpp", "StringPool.cpp", "StringSaver.cpp", "StringRef.cpp", "SymbolRemappingReader.cpp", "SystemUtils.cpp", "TarWriter.cpp", "TargetParser.cpp", "ThreadPool.cpp", "TimeProfiler.cpp", "Timer.cpp", "ToolOutputFile.cpp", "TrigramIndex.cpp", "Triple.cpp", "Twine.cpp", "Unicode.cpp", "UnicodeCaseFold.cpp", "VersionTuple.cpp", "VirtualFileSystem.cpp", "WithColor.cpp", "YAMLParser.cpp", "YAMLTraits.cpp", "raw_os_ostream.cpp", "raw_ostream.cpp", "regcomp.c", "regerror.c", "regexec.c", "regfree.c", "regstrlcpy.c", "xxhash.cpp", "Z3Solver.cpp", "Atomic.cpp", "DynamicLibrary.cpp", "Errno.cpp", "Host.cpp", "Memory.cpp", "Mutex.cpp", "Path.cpp", "Process.cpp", "Program.cpp", "RWMutex.cpp", "Signals.cpp", "TargetRegistry.cpp", "ThreadLocal.cpp", "Threading.cpp", "Valgrind.cpp", "Watchdog.cpp", "ADDITIONAL_HEADER_DIRS", "Unix", "Windows", "/include/llvm/ADT", "/include/llvm/Support", "", "LINK_LIBS", "", "", "")
     ctx = ctx.exit_directory(ctx, "lib/Support")
     ctx = ctx.enter_directory(ctx, "lib/TableGen")
     ctx.add_llvm_library(ctx, "LLVMTableGen", "Error.cpp", "JSONBackend.cpp", "Main.cpp", "Record.cpp", "SetTheory.cpp", "StringMatcher.cpp", "TableGenBackend.cpp", "TGLexer.cpp", "TGParser.cpp", "ADDITIONAL_HEADER_DIRS", "/include/llvm/TableGen")
@@ -136,7 +138,7 @@
     ctx = ctx.exit_directory(ctx, "GlobalISel")
     ctx = ctx.exit_directory(ctx, "CodeGen")
     ctx = ctx.enter_directory(ctx, "BinaryFormat")
-    ctx.add_llvm_library(ctx, "LLVMBinaryFormat", "AMDGPUMetadataVerifier.cpp", "Dwarf.cpp", "Magic.cpp", "MsgPackDocument.cpp", "MsgPackDocumentYAML.cpp", "MsgPackReader.cpp", "MsgPackWriter.cpp", "Wasm.cpp", "ADDITIONAL_HEADER_DIRS", "/include/llvm/BinaryFormat")
+    ctx.add_llvm_library(ctx, "LLVMBinaryFormat", "AMDGPUMetadataVerifier.cpp", "Dwarf.cpp", "Magic.cpp", "Minidump.cpp", "MsgPackDocument.cpp", "MsgPackDocumentYAML.cpp", "MsgPackReader.cpp", "MsgPackWriter.cpp", "Wasm.cpp", "ADDITIONAL_HEADER_DIRS", "/include/llvm/BinaryFormat")
     ctx = ctx.exit_directory(ctx, "BinaryFormat")
     ctx = ctx.enter_directory(ctx, "Bitcode")
     ctx = ctx.enter_directory(ctx, "Reader")
@@ -148,7 +150,7 @@
     ctx = ctx.exit_directory(ctx, "Bitcode")
     ctx = ctx.enter_directory(ctx, "Transforms")
     ctx = ctx.enter_directory(ctx, "Utils")
-    ctx.add_llvm_library(ctx, "LLVMTransformUtils", "ASanStackFrameLayout.cpp", "AddDiscriminators.cpp", "BasicBlockUtils.cpp", "BreakCriticalEdges.cpp", "BuildLibCalls.cpp", "BypassSlowDivision.cpp", "CallPromotionUtils.cpp", "CanonicalizeAliases.cpp", "CloneFunction.cpp", "CloneModule.cpp", "CodeExtractor.cpp", "CtorUtils.cpp", "DemoteRegToStack.cpp", "EntryExitInstrumenter.cpp", "EscapeEnumerator.cpp", "Evaluator.cpp", "FlattenCFG.cpp", "FunctionComparator.cpp", "FunctionImportUtils.cpp", "GlobalStatus.cpp", "GuardUtils.cpp", "InlineFunction.cpp", "ImportedFunctionsInliningStatistics.cpp", "InstructionNamer.cpp", "IntegerDivision.cpp", "LCSSA.cpp", "LibCallsShrinkWrap.cpp", "Local.cpp", "LoopRotationUtils.cpp", "LoopSimplify.cpp", "LoopUnroll.cpp", "LoopUnrollAndJam.cpp", "LoopUnrollPeel.cpp", "LoopUnrollRuntime.cpp", "LoopUtils.cpp", "LoopVersioning.cpp", "LowerInvoke.cpp", "LowerMemIntrinsics.cpp", "LowerSwitch.cpp", "Mem2Reg.cpp", "MetaRenamer.cpp", "ModuleUtils.cpp", "NameAnonGlobals.cpp", "PredicateInfo.cpp", "PromoteMemoryToRegister.cpp", "StripGCRelocates.cpp", "SSAUpdater.cpp", "SSAUpdaterBulk.cpp", "SanitizerStats.cpp", "SimplifyCFG.cpp", "SimplifyIndVar.cpp", "SimplifyLibCalls.cpp", "SplitModule.cpp", "StripNonLineTableDebugInfo.cpp", "SymbolRewriter.cpp", "UnifyFunctionExitNodes.cpp", "Utils.cpp", "ValueMapper.cpp", "VNCoercion.cpp", "ADDITIONAL_HEADER_DIRS", "/include/llvm/Transforms", "/include/llvm/Transforms/Utils", "DEPENDS", "intrinsics_gen")
+    ctx.add_llvm_library(ctx, "LLVMTransformUtils", "ASanStackFrameLayout.cpp", "AddDiscriminators.cpp", "BasicBlockUtils.cpp", "BreakCriticalEdges.cpp", "BuildLibCalls.cpp", "BypassSlowDivision.cpp", "CallPromotionUtils.cpp", "CanonicalizeAliases.cpp", "CloneFunction.cpp", "CloneModule.cpp", "CodeExtractor.cpp", "CtorUtils.cpp", "DemoteRegToStack.cpp", "EntryExitInstrumenter.cpp", "EscapeEnumerator.cpp", "Evaluator.cpp", "FlattenCFG.cpp", "FunctionComparator.cpp", "FunctionImportUtils.cpp", "GlobalStatus.cpp", "GuardUtils.cpp", "InlineFunction.cpp", "ImportedFunctionsInliningStatistics.cpp", "InstructionNamer.cpp", "IntegerDivision.cpp", "LCSSA.cpp", "LibCallsShrinkWrap.cpp", "Local.cpp", "LoopRotationUtils.cpp", "LoopSimplify.cpp", "LoopUnroll.cpp", "LoopUnrollAndJam.cpp", "LoopUnrollPeel.cpp", "LoopUnrollRuntime.cpp", "LoopUtils.cpp", "LoopVersioning.cpp", "LowerInvoke.cpp", "LowerMemIntrinsics.cpp", "LowerSwitch.cpp", "Mem2Reg.cpp", "MetaRenamer.cpp", "ModuleUtils.cpp", "NameAnonGlobals.cpp", "PredicateInfo.cpp", "PromoteMemoryToRegister.cpp", "StripGCRelocates.cpp", "SSAUpdater.cpp", "SSAUpdaterBulk.cpp", "SanitizerStats.cpp", "SimplifyCFG.cpp", "SimplifyIndVar.cpp", "SimplifyLibCalls.cpp", "SizeOpts.cpp", "SplitModule.cpp", "StripNonLineTableDebugInfo.cpp", "SymbolRewriter.cpp", "UnifyFunctionExitNodes.cpp", "Utils.cpp", "ValueMapper.cpp", "VNCoercion.cpp", "ADDITIONAL_HEADER_DIRS", "/include/llvm/Transforms", "/include/llvm/Transforms/Utils", "DEPENDS", "intrinsics_gen")
     ctx = ctx.exit_directory(ctx, "Utils")
     ctx = ctx.enter_directory(ctx, "Instrumentation")
     ctx.add_llvm_library(ctx, "LLVMInstrumentation", "AddressSanitizer.cpp", "BoundsChecking.cpp", "CGProfile.cpp", "ControlHeightReduction.cpp", "DataFlowSanitizer.cpp", "GCOVProfiling.cpp", "MemorySanitizer.cpp", "IndirectCallPromotion.cpp", "Instrumentation.cpp", "InstrOrderFile.cpp", "InstrProfiling.cpp", "PGOInstrumentation.cpp", "PGOMemOPSizeOpt.cpp", "SanitizerCoverage.cpp", "ThreadSanitizer.cpp", "HWAddressSanitizer.cpp", "ADDITIONAL_HEADER_DIRS", "/include/llvm/Transforms", "DEPENDS", "intrinsics_gen")
@@ -163,7 +165,7 @@
     ctx.add_llvm_library(ctx, "LLVMInstCombine", "InstructionCombining.cpp", "InstCombineAddSub.cpp", "InstCombineAtomicRMW.cpp", "InstCombineAndOrXor.cpp", "InstCombineCalls.cpp", "InstCombineCasts.cpp", "InstCombineCompares.cpp", "InstCombineLoadStoreAlloca.cpp", "InstCombineMulDivRem.cpp", "InstCombinePHI.cpp", "InstCombineSelect.cpp", "InstCombineShifts.cpp", "InstCombineSimplifyDemanded.cpp", "InstCombineVectorOps.cpp", "ADDITIONAL_HEADER_DIRS", "/include/llvm/Transforms", "/include/llvm/Transforms/InstCombine", "DEPENDS", "intrinsics_gen")
     ctx = ctx.exit_directory(ctx, "InstCombine")
     ctx = ctx.enter_directory(ctx, "Scalar")
-    ctx.add_llvm_library(ctx, "LLVMScalarOpts", "ADCE.cpp", "AlignmentFromAssumptions.cpp", "BDCE.cpp", "CallSiteSplitting.cpp", "ConstantHoisting.cpp", "ConstantProp.cpp", "CorrelatedValuePropagation.cpp", "DCE.cpp", "DeadStoreElimination.cpp", "DivRemPairs.cpp", "EarlyCSE.cpp", "FlattenCFGPass.cpp", "Float2Int.cpp", "GuardWidening.cpp", "GVN.cpp", "GVNHoist.cpp", "GVNSink.cpp", "IVUsersPrinter.cpp", "InductiveRangeCheckElimination.cpp", "IndVarSimplify.cpp", "InferAddressSpaces.cpp", "InstSimplifyPass.cpp", "JumpThreading.cpp", "LICM.cpp", "LoopAccessAnalysisPrinter.cpp", "LoopSink.cpp", "LoopDeletion.cpp", "LoopDataPrefetch.cpp", "LoopDistribute.cpp", "LoopIdiomRecognize.cpp", "LoopInstSimplify.cpp", "LoopInterchange.cpp", "LoopLoadElimination.cpp", "LoopPassManager.cpp", "LoopPredication.cpp", "LoopRerollPass.cpp", "LoopRotation.cpp", "LoopSimplifyCFG.cpp", "LoopStrengthReduce.cpp", "LoopUnrollPass.cpp", "LoopUnrollAndJamPass.cpp", "LoopUnswitch.cpp", "LoopVersioningLICM.cpp", "LowerAtomic.cpp", "LowerExpectIntrinsic.cpp", "LowerGuardIntrinsic.cpp", "LowerWidenableCondition.cpp", "MakeGuardsExplicit.cpp", "MemCpyOptimizer.cpp", "MergeICmps.cpp", "MergedLoadStoreMotion.cpp", "NaryReassociate.cpp", "NewGVN.cpp", "PartiallyInlineLibCalls.cpp", "PlaceSafepoints.cpp", "Reassociate.cpp", "Reg2Mem.cpp", "RewriteStatepointsForGC.cpp", "SCCP.cpp", "SROA.cpp", "Scalar.cpp", "Scalarizer.cpp", "SeparateConstOffsetFromGEP.cpp", "SimpleLoopUnswitch.cpp", "SimplifyCFGPass.cpp", "Sink.cpp", "SpeculativeExecution.cpp", "SpeculateAroundPHIs.cpp", "StraightLineStrengthReduce.cpp", "StructurizeCFG.cpp", "TailRecursionElimination.cpp", "WarnMissedTransforms.cpp", "ADDITIONAL_HEADER_DIRS", "/include/llvm/Transforms", "/include/llvm/Transforms/Scalar", "DEPENDS", "intrinsics_gen")
+    ctx.add_llvm_library(ctx, "LLVMScalarOpts", "ADCE.cpp", "AlignmentFromAssumptions.cpp", "BDCE.cpp", "CallSiteSplitting.cpp", "ConstantHoisting.cpp", "ConstantProp.cpp", "CorrelatedValuePropagation.cpp", "DCE.cpp", "DeadStoreElimination.cpp", "DivRemPairs.cpp", "EarlyCSE.cpp", "FlattenCFGPass.cpp", "Float2Int.cpp", "GuardWidening.cpp", "GVN.cpp", "GVNHoist.cpp", "GVNSink.cpp", "IVUsersPrinter.cpp", "InductiveRangeCheckElimination.cpp", "IndVarSimplify.cpp", "InferAddressSpaces.cpp", "InstSimplifyPass.cpp", "JumpThreading.cpp", "LICM.cpp", "LoopAccessAnalysisPrinter.cpp", "LoopSink.cpp", "LoopDeletion.cpp", "LoopDataPrefetch.cpp", "LoopDistribute.cpp", "LoopFuse.cpp", "LoopIdiomRecognize.cpp", "LoopInstSimplify.cpp", "LoopInterchange.cpp", "LoopLoadElimination.cpp", "LoopPassManager.cpp", "LoopPredication.cpp", "LoopRerollPass.cpp", "LoopRotation.cpp", "LoopSimplifyCFG.cpp", "LoopStrengthReduce.cpp", "LoopUnrollPass.cpp", "LoopUnrollAndJamPass.cpp", "LoopUnswitch.cpp", "LoopVersioningLICM.cpp", "LowerAtomic.cpp", "LowerExpectIntrinsic.cpp", "LowerGuardIntrinsic.cpp", "LowerWidenableCondition.cpp", "MakeGuardsExplicit.cpp", "MemCpyOptimizer.cpp", "MergeICmps.cpp", "MergedLoadStoreMotion.cpp", "NaryReassociate.cpp", "NewGVN.cpp", "PartiallyInlineLibCalls.cpp", "PlaceSafepoints.cpp", "Reassociate.cpp", "Reg2Mem.cpp", "RewriteStatepointsForGC.cpp", "SCCP.cpp", "SROA.cpp", "Scalar.cpp", "Scalarizer.cpp", "SeparateConstOffsetFromGEP.cpp", "SimpleLoopUnswitch.cpp", "SimplifyCFGPass.cpp", "Sink.cpp", "SpeculativeExecution.cpp", "SpeculateAroundPHIs.cpp", "StraightLineStrengthReduce.cpp", "StructurizeCFG.cpp", "TailRecursionElimination.cpp", "WarnMissedTransforms.cpp", "ADDITIONAL_HEADER_DIRS", "/include/llvm/Transforms", "/include/llvm/Transforms/Scalar", "DEPENDS", "intrinsics_gen")
     ctx = ctx.exit_directory(ctx, "Scalar")
     ctx = ctx.enter_directory(ctx, "IPO")
     ctx.add_llvm_library(ctx, "LLVMipo", "AlwaysInliner.cpp", "ArgumentPromotion.cpp", "BarrierNoopPass.cpp", "BlockExtractor.cpp", "CalledValuePropagation.cpp", "ConstantMerge.cpp", "CrossDSOCFI.cpp", "DeadArgumentElimination.cpp", "ElimAvailExtern.cpp", "ExtractGV.cpp", "ForceFunctionAttrs.cpp", "FunctionAttrs.cpp", "FunctionImport.cpp", "GlobalDCE.cpp", "GlobalOpt.cpp", "GlobalSplit.cpp", "HotColdSplitting.cpp", "IPConstantPropagation.cpp", "IPO.cpp", "InferFunctionAttrs.cpp", "InlineSimple.cpp", "Inliner.cpp", "Internalize.cpp", "LoopExtractor.cpp", "LowerTypeTests.cpp", "MergeFunctions.cpp", "PartialInlining.cpp", "PassManagerBuilder.cpp", "PruneEH.cpp", "SampleProfile.cpp", "SCCP.cpp", "StripDeadPrototypes.cpp", "StripSymbols.cpp", "SyntheticCountsPropagation.cpp", "ThinLTOBitcodeWriter.cpp", "WholeProgramDevirt.cpp", "ADDITIONAL_HEADER_DIRS", "/include/llvm/Transforms", "/include/llvm/Transforms/IPO", "DEPENDS", "intrinsics_gen")
@@ -200,19 +202,19 @@
     ctx = ctx.exit_directory(ctx, "MCDisassembler")
     ctx = ctx.exit_directory(ctx, "MC")
     ctx = ctx.enter_directory(ctx, "MCA")
-    ctx.add_llvm_library(ctx, "LLVMMCA", "Context.cpp", "HWEventListener.cpp", "HardwareUnits/HardwareUnit.cpp", "HardwareUnits/LSUnit.cpp", "HardwareUnits/RegisterFile.cpp", "HardwareUnits/ResourceManager.cpp", "HardwareUnits/RetireControlUnit.cpp", "HardwareUnits/Scheduler.cpp", "InstrBuilder.cpp", "Instruction.cpp", "Pipeline.cpp", "Stages/DispatchStage.cpp", "Stages/EntryStage.cpp", "Stages/ExecuteStage.cpp", "Stages/InstructionTables.cpp", "Stages/RetireStage.cpp", "Stages/Stage.cpp", "Support.cpp", "ADDITIONAL_HEADER_DIRS", "/include/llvm/MCA")
+    ctx.add_llvm_library(ctx, "LLVMMCA", "Context.cpp", "HWEventListener.cpp", "HardwareUnits/HardwareUnit.cpp", "HardwareUnits/LSUnit.cpp", "HardwareUnits/RegisterFile.cpp", "HardwareUnits/ResourceManager.cpp", "HardwareUnits/RetireControlUnit.cpp", "HardwareUnits/Scheduler.cpp", "InstrBuilder.cpp", "Instruction.cpp", "Pipeline.cpp", "Stages/DispatchStage.cpp", "Stages/EntryStage.cpp", "Stages/ExecuteStage.cpp", "Stages/InstructionTables.cpp", "Stages/MicroOpQueueStage.cpp", "Stages/RetireStage.cpp", "Stages/Stage.cpp", "Support.cpp", "ADDITIONAL_HEADER_DIRS", "/include/llvm/MCA")
     ctx = ctx.exit_directory(ctx, "MCA")
     ctx = ctx.enter_directory(ctx, "Object")
-    ctx.add_llvm_library(ctx, "LLVMObject", "Archive.cpp", "ArchiveWriter.cpp", "Binary.cpp", "COFFImportFile.cpp", "COFFModuleDefinition.cpp", "COFFObjectFile.cpp", "Decompressor.cpp", "ELF.cpp", "ELFObjectFile.cpp", "Error.cpp", "IRObjectFile.cpp", "IRSymtab.cpp", "MachOObjectFile.cpp", "MachOUniversal.cpp", "ModuleSymbolTable.cpp", "Object.cpp", "ObjectFile.cpp", "RecordStreamer.cpp", "SymbolicFile.cpp", "SymbolSize.cpp", "WasmObjectFile.cpp", "WindowsResource.cpp", "ADDITIONAL_HEADER_DIRS", "/include/llvm/Object", "DEPENDS", "intrinsics_gen", "llvm_vcsrevision_h")
+    ctx.add_llvm_library(ctx, "LLVMObject", "Archive.cpp", "ArchiveWriter.cpp", "Binary.cpp", "COFFImportFile.cpp", "COFFModuleDefinition.cpp", "COFFObjectFile.cpp", "Decompressor.cpp", "ELF.cpp", "ELFObjectFile.cpp", "Error.cpp", "IRObjectFile.cpp", "IRSymtab.cpp", "MachOObjectFile.cpp", "MachOUniversal.cpp", "Minidump.cpp", "ModuleSymbolTable.cpp", "Object.cpp", "ObjectFile.cpp", "RecordStreamer.cpp", "RelocationResolver.cpp", "SymbolicFile.cpp", "SymbolSize.cpp", "WasmObjectFile.cpp", "WindowsResource.cpp", "XCOFFObjectFile.cpp", "ADDITIONAL_HEADER_DIRS", "/include/llvm/Object", "DEPENDS", "intrinsics_gen", "llvm_vcsrevision_h")
     ctx = ctx.exit_directory(ctx, "Object")
     ctx = ctx.enter_directory(ctx, "ObjectYAML")
-    ctx.add_llvm_library(ctx, "LLVMObjectYAML", "CodeViewYAMLDebugSections.cpp", "CodeViewYAMLSymbols.cpp", "CodeViewYAMLTypeHashing.cpp", "CodeViewYAMLTypes.cpp", "COFFYAML.cpp", "DWARFEmitter.cpp", "DWARFVisitor.cpp", "DWARFYAML.cpp", "ELFYAML.cpp", "MachOYAML.cpp", "ObjectYAML.cpp", "WasmYAML.cpp", "YAML.cpp")
+    ctx.add_llvm_library(ctx, "LLVMObjectYAML", "CodeViewYAMLDebugSections.cpp", "CodeViewYAMLSymbols.cpp", "CodeViewYAMLTypeHashing.cpp", "CodeViewYAMLTypes.cpp", "COFFYAML.cpp", "DWARFEmitter.cpp", "DWARFVisitor.cpp", "DWARFYAML.cpp", "ELFYAML.cpp", "MachOYAML.cpp", "ObjectYAML.cpp", "MinidumpYAML.cpp", "WasmYAML.cpp", "XCOFFYAML.cpp", "YAML.cpp")
     ctx = ctx.exit_directory(ctx, "ObjectYAML")
     ctx = ctx.enter_directory(ctx, "Option")
     ctx.add_llvm_library(ctx, "LLVMOption", "Arg.cpp", "ArgList.cpp", "Option.cpp", "OptTable.cpp", "ADDITIONAL_HEADER_DIRS", "/include/llvm/Option")
     ctx = ctx.exit_directory(ctx, "Option")
     ctx = ctx.enter_directory(ctx, "Remarks")
-    ctx.add_llvm_library(ctx, "LLVMRemarks", "Remark.cpp", "RemarkParser.cpp", "YAMLRemarkParser.cpp")
+    ctx.add_llvm_library(ctx, "LLVMRemarks", "Remark.cpp", "RemarkParser.cpp", "RemarkStringTable.cpp", "YAMLRemarkParser.cpp")
     ctx = ctx.exit_directory(ctx, "Remarks")
     ctx = ctx.enter_directory(ctx, "DebugInfo")
     ctx = ctx.enter_directory(ctx, "DWARF")
@@ -236,11 +238,14 @@
     ctx = ctx.enter_directory(ctx, "Interpreter")
     ctx.add_llvm_library(ctx, "LLVMInterpreter", "Execution.cpp", "ExternalFunctions.cpp", "Interpreter.cpp", "DEPENDS", "intrinsics_gen")
     ctx = ctx.exit_directory(ctx, "Interpreter")
+    ctx = ctx.enter_directory(ctx, "JITLink")
+    ctx.add_llvm_library(ctx, "LLVMJITLink", "JITLink.cpp", "JITLinkGeneric.cpp", "EHFrameSupport.cpp", "MachO.cpp", "MachO_x86_64.cpp", "MachOAtomGraphBuilder.cpp", "DEPENDS", "intrinsics_gen")
+    ctx = ctx.exit_directory(ctx, "JITLink")
     ctx = ctx.enter_directory(ctx, "MCJIT")
     ctx.add_llvm_library(ctx, "LLVMMCJIT", "MCJIT.cpp", "DEPENDS", "intrinsics_gen")
     ctx = ctx.exit_directory(ctx, "MCJIT")
     ctx = ctx.enter_directory(ctx, "Orc")
-    ctx.add_llvm_library(ctx, "LLVMOrcJIT", "CompileOnDemandLayer.cpp", "Core.cpp", "ExecutionUtils.cpp", "IndirectionUtils.cpp", "IRCompileLayer.cpp", "IRTransformLayer.cpp", "JITTargetMachineBuilder.cpp", "LazyReexports.cpp", "Legacy.cpp", "Layer.cpp", "LLJIT.cpp", "NullResolver.cpp", "ObjectTransformLayer.cpp", "OrcABISupport.cpp", "OrcCBindings.cpp", "OrcError.cpp", "OrcMCJITReplacement.cpp", "RPCUtils.cpp", "RTDyldObjectLinkingLayer.cpp", "ThreadSafeModule.cpp", "ADDITIONAL_HEADER_DIRS", "/include/llvm/ExecutionEngine/Orc", "DEPENDS", "intrinsics_gen")
+    ctx.add_llvm_library(ctx, "LLVMOrcJIT", "CompileOnDemandLayer.cpp", "CompileUtils.cpp", "Core.cpp", "ExecutionUtils.cpp", "IndirectionUtils.cpp", "IRCompileLayer.cpp", "IRTransformLayer.cpp", "JITTargetMachineBuilder.cpp", "LazyReexports.cpp", "Legacy.cpp", "Layer.cpp", "LLJIT.cpp", "NullResolver.cpp", "ObjectLinkingLayer.cpp", "ObjectTransformLayer.cpp", "OrcABISupport.cpp", "OrcCBindings.cpp", "OrcError.cpp", "OrcMCJITReplacement.cpp", "RPCUtils.cpp", "RTDyldObjectLinkingLayer.cpp", "ThreadSafeModule.cpp", "ADDITIONAL_HEADER_DIRS", "/include/llvm/ExecutionEngine/Orc", "DEPENDS", "intrinsics_gen")
     ctx = ctx.exit_directory(ctx, "Orc")
     ctx = ctx.enter_directory(ctx, "RuntimeDyld")
     ctx.add_llvm_library(ctx, "LLVMRuntimeDyld", "JITSymbol.cpp", "RTDyldMemoryManager.cpp", "RuntimeDyld.cpp", "RuntimeDyldChecker.cpp", "RuntimeDyldCOFF.cpp", "RuntimeDyldELF.cpp", "RuntimeDyldMachO.cpp", "Targets/RuntimeDyldELFMips.cpp", "DEPENDS", "intrinsics_gen")
@@ -265,7 +270,7 @@
     ctx.add_llvm_library(ctx, "LLVMPasses", "PassBuilder.cpp", "PassPlugin.cpp", "StandardInstrumentations.cpp", "ADDITIONAL_HEADER_DIRS", "/include/llvm/Passes", "DEPENDS", "intrinsics_gen")
     ctx = ctx.exit_directory(ctx, "Passes")
     ctx = ctx.enter_directory(ctx, "TextAPI")
-    ctx.add_llvm_library(ctx, "LLVMTextAPI", "ELF/ELFStub.cpp", "ELF/TBEHandler.cpp", "ADDITIONAL_HEADER_DIRS", "/include/llvm/TextAPI")
+    ctx.add_llvm_library(ctx, "LLVMTextAPI", "ELF/ELFStub.cpp", "ELF/TBEHandler.cpp", "MachO/Architecture.cpp", "MachO/ArchitectureSet.cpp", "MachO/InterfaceFile.cpp", "MachO/PackedVersion.cpp", "MachO/Symbol.cpp", "MachO/TextStub.cpp", "MachO/TextStubCommon.cpp", "ADDITIONAL_HEADER_DIRS", "/include/llvm/TextAPI")
     ctx = ctx.exit_directory(ctx, "TextAPI")
     ctx = ctx.enter_directory(ctx, "ToolDrivers")
     ctx = ctx.enter_directory(ctx, "llvm-dlltool")
@@ -287,7 +292,7 @@
     ctx = ctx.exit_directory(ctx, "XRay")
     ctx = ctx.enter_directory(ctx, "Testing")
     ctx = ctx.enter_directory(ctx, "Support")
-    ctx.add_llvm_library(ctx, "LLVMTestingSupport", "Error.cpp", "SupportHelpers.cpp", "BUILDTREE_ONLY", "ADDITIONAL_HEADER_DIRS", "/include/llvm/Testing/Support", "LINK_COMPONENTS", "Support")
+    ctx.add_llvm_library(ctx, "LLVMTestingSupport", "Annotations.cpp", "Error.cpp", "SupportHelpers.cpp", "BUILDTREE_ONLY", "ADDITIONAL_HEADER_DIRS", "/include/llvm/Testing/Support", "LINK_COMPONENTS", "Support")
     ctx = ctx.exit_directory(ctx, "Support")
     ctx = ctx.exit_directory(ctx, "Testing")
     ctx = ctx.enter_directory(ctx, "WindowsManifest")
@@ -348,7 +353,7 @@
     ctx.tablegen(ctx, "LLVM", "PPCGenSubtargetInfo.inc", "-gen-subtarget")
     ctx.tablegen(ctx, "LLVM", "PPCGenExegesis.inc", "-gen-exegesis")
     ctx.add_public_tablegen_target(ctx, "PowerPCCommonTableGen")
-    ctx.add_llvm_target(ctx, "PowerPCCodeGen", "PPCBoolRetToInt.cpp", "PPCAsmPrinter.cpp", "PPCBranchSelector.cpp", "PPCBranchCoalescing.cpp", "PPCCallingConv.cpp", "PPCCCState.cpp", "PPCCTRLoops.cpp", "PPCHazardRecognizers.cpp", "PPCInstrInfo.cpp", "PPCISelDAGToDAG.cpp", "PPCISelLowering.cpp", "PPCEarlyReturn.cpp", "PPCFastISel.cpp", "PPCFrameLowering.cpp", "PPCLoopPreIncPrep.cpp", "PPCMCInstLower.cpp", "PPCMachineFunctionInfo.cpp", "PPCMIPeephole.cpp", "PPCRegisterInfo.cpp", "PPCQPXLoadSplat.cpp", "PPCSubtarget.cpp", "PPCTargetMachine.cpp", "PPCTargetObjectFile.cpp", "PPCTargetTransformInfo.cpp", "PPCTOCRegDeps.cpp", "PPCTLSDynamicCall.cpp", "PPCVSXCopy.cpp", "PPCReduceCRLogicals.cpp", "PPCVSXFMAMutate.cpp", "PPCVSXSwapRemoval.cpp", "PPCExpandISEL.cpp", "PPCPreEmitPeephole.cpp")
+    ctx.add_llvm_target(ctx, "PowerPCCodeGen", "PPCBoolRetToInt.cpp", "PPCAsmPrinter.cpp", "PPCBranchSelector.cpp", "PPCBranchCoalescing.cpp", "PPCCallingConv.cpp", "PPCCCState.cpp", "PPCCTRLoops.cpp", "PPCHazardRecognizers.cpp", "PPCInstrInfo.cpp", "PPCISelDAGToDAG.cpp", "PPCISelLowering.cpp", "PPCEarlyReturn.cpp", "PPCFastISel.cpp", "PPCFrameLowering.cpp", "PPCLoopPreIncPrep.cpp", "PPCMCInstLower.cpp", "PPCMachineFunctionInfo.cpp", "PPCMachineScheduler.cpp", "PPCMIPeephole.cpp", "PPCRegisterInfo.cpp", "PPCQPXLoadSplat.cpp", "PPCSubtarget.cpp", "PPCTargetMachine.cpp", "PPCTargetObjectFile.cpp", "PPCTargetTransformInfo.cpp", "PPCTOCRegDeps.cpp", "PPCTLSDynamicCall.cpp", "PPCVSXCopy.cpp", "PPCReduceCRLogicals.cpp", "PPCVSXFMAMutate.cpp", "PPCVSXSwapRemoval.cpp", "PPCExpandISEL.cpp", "PPCPreEmitPeephole.cpp")
     ctx = ctx.enter_directory(ctx, "AsmParser")
     ctx.add_llvm_library(ctx, "LLVMPowerPCAsmParser", "PPCAsmParser.cpp")
     ctx = ctx.exit_directory(ctx, "AsmParser")
@@ -502,8 +507,6 @@
     ctx.configure_file(ctx, "/tools/clang/include/clang/Basic/Version.inc.in", "/tools/clang/include/clang/Basic/Version.inc")
     ctx.set(ctx, "HOST_LINK_VERSION")
     ctx.set(ctx, "CMAKE_INCLUDE_CURRENT_DIR", "ON")
-    ctx.set(ctx, "CLANG_ANALYZER_Z3_INSTALL_DIR", "", "CACHE", "STRING", "Install directory of the Z3 solver.")
-    ctx.set(ctx, "CLANG_ANALYZER_ENABLE_Z3_SOLVER_DEFAULT", "")
     ctx.set(ctx, "CLANG_EXECUTABLE_VERSION", "", "CACHE", "STRING", "Major version number that will be appended to the clang executable name")
     ctx.set(ctx, "LIBCLANG_LIBRARY_VERSION", "", "CACHE", "STRING", "Major version number that will be appended to the libclang library")
     ctx = ctx.enter_directory(ctx, "utils/TableGen")
@@ -576,11 +579,13 @@
     ctx = ctx.exit_directory(ctx, "include")
     ctx = ctx.enter_directory(ctx, "lib")
     ctx = ctx.enter_directory(ctx, "Headers")
-    ctx.set(ctx, "files", "adxintrin.h", "altivec.h", "ammintrin.h", "arm_acle.h", "armintr.h", "arm64intr.h", "avx2intrin.h", "avx512bwintrin.h", "avx512bitalgintrin.h", "avx512vlbitalgintrin.h", "avx512cdintrin.h", "avx512vpopcntdqintrin.h", "avx512dqintrin.h", "avx512erintrin.h", "avx512fintrin.h", "avx512ifmaintrin.h", "avx512ifmavlintrin.h", "avx512pfintrin.h", "avx512vbmiintrin.h", "avx512vbmivlintrin.h", "avx512vbmi2intrin.h", "avx512vlvbmi2intrin.h", "avx512vlbwintrin.h", "avx512vlcdintrin.h", "avx512vldqintrin.h", "avx512vlintrin.h", "avx512vpopcntdqvlintrin.h", "avx512vnniintrin.h", "avx512vlvnniintrin.h", "avxintrin.h", "bmi2intrin.h", "bmiintrin.h", "__clang_cuda_builtin_vars.h", "__clang_cuda_cmath.h", "__clang_cuda_complex_builtins.h", "__clang_cuda_device_functions.h", "__clang_cuda_intrinsics.h", "__clang_cuda_libdevice_declares.h", "__clang_cuda_math_forward_declares.h", "__clang_cuda_runtime_wrapper.h", "cetintrin.h", "cldemoteintrin.h", "clzerointrin.h", "cpuid.h", "clflushoptintrin.h", "clwbintrin.h", "emmintrin.h", "f16cintrin.h", "float.h", "fma4intrin.h", "fmaintrin.h", "fxsrintrin.h", "gfniintrin.h", "htmintrin.h", "htmxlintrin.h", "ia32intrin.h", "immintrin.h", "intrin.h", "inttypes.h", "invpcidintrin.h", "iso646.h", "limits.h", "lwpintrin.h", "lzcntintrin.h", "mm3dnow.h", "mmintrin.h", "mm_malloc.h", "module.modulemap", "movdirintrin.h", "msa.h", "mwaitxintrin.h", "nmmintrin.h", "opencl-c.h", "pkuintrin.h", "pmmintrin.h", "pconfigintrin.h", "popcntintrin.h", "prfchwintrin.h", "ptwriteintrin.h", "rdseedintrin.h", "rtmintrin.h", "sgxintrin.h", "s390intrin.h", "shaintrin.h", "smmintrin.h", "stdalign.h", "stdarg.h", "stdatomic.h", "stdbool.h", "stddef.h", "__stddef_max_align_t.h", "stdint.h", "stdnoreturn.h", "tbmintrin.h", "tgmath.h", "tmmintrin.h", "unwind.h", "vadefs.h", "vaesintrin.h", "varargs.h", "vecintrin.h", "vpclmulqdqintrin.h", "waitpkgintrin.h", "wbnoinvdintrin.h", "wmmintrin.h", "__wmmintrin_aes.h", "__wmmintrin_pclmul.h", "x86intrin.h", "xmmintrin.h", "xopintrin.h", "xsavecintrin.h", "xsaveintrin.h", "xsaveoptintrin.h", "xsavesintrin.h", "xtestintrin.h")
+    ctx.set(ctx, "files", "adxintrin.h", "altivec.h", "ammintrin.h", "arm_acle.h", "armintr.h", "arm64intr.h", "avx2intrin.h", "avx512bf16intrin.h", "avx512bwintrin.h", "avx512bitalgintrin.h", "avx512vlbitalgintrin.h", "avx512cdintrin.h", "avx512vpopcntdqintrin.h", "avx512dqintrin.h", "avx512erintrin.h", "avx512fintrin.h", "avx512ifmaintrin.h", "avx512ifmavlintrin.h", "avx512pfintrin.h", "avx512vbmiintrin.h", "avx512vbmivlintrin.h", "avx512vbmi2intrin.h", "avx512vlvbmi2intrin.h", "avx512vlbf16intrin.h", "avx512vlbwintrin.h", "avx512vlcdintrin.h", "avx512vldqintrin.h", "avx512vlintrin.h", "avx512vpopcntdqvlintrin.h", "avx512vnniintrin.h", "avx512vlvnniintrin.h", "avxintrin.h", "bmi2intrin.h", "bmiintrin.h", "openmp_wrappers/math.h", "openmp_wrappers/cmath", "openmp_wrappers/__clang_openmp_math.h", "__clang_cuda_builtin_vars.h", "__clang_cuda_cmath.h", "__clang_cuda_complex_builtins.h", "__clang_cuda_device_functions.h", "__clang_cuda_intrinsics.h", "__clang_cuda_libdevice_declares.h", "__clang_cuda_math_forward_declares.h", "__clang_cuda_runtime_wrapper.h", "cetintrin.h", "cldemoteintrin.h", "clzerointrin.h", "cpuid.h", "clflushoptintrin.h", "clwbintrin.h", "emmintrin.h", "f16cintrin.h", "float.h", "fma4intrin.h", "fmaintrin.h", "fxsrintrin.h", "gfniintrin.h", "htmintrin.h", "htmxlintrin.h", "ia32intrin.h", "immintrin.h", "intrin.h", "inttypes.h", "invpcidintrin.h", "iso646.h", "limits.h", "lwpintrin.h", "lzcntintrin.h", "mm3dnow.h", "mmintrin.h", "mm_malloc.h", "module.modulemap", "movdirintrin.h", "msa.h", "mwaitxintrin.h", "nmmintrin.h", "opencl-c.h", "pkuintrin.h", "pmmintrin.h", "pconfigintrin.h", "popcntintrin.h", "prfchwintrin.h", "ptwriteintrin.h", "rdseedintrin.h", "rtmintrin.h", "sgxintrin.h", "s390intrin.h", "shaintrin.h", "smmintrin.h", "stdalign.h", "stdarg.h", "stdatomic.h", "stdbool.h", "stddef.h", "__stddef_max_align_t.h", "stdint.h", "stdnoreturn.h", "tbmintrin.h", "tgmath.h", "tmmintrin.h", "unwind.h", "vadefs.h", "vaesintrin.h", "varargs.h", "vecintrin.h", "vpclmulqdqintrin.h", "waitpkgintrin.h", "wbnoinvdintrin.h", "wmmintrin.h", "__wmmintrin_aes.h", "__wmmintrin_pclmul.h", "x86intrin.h", "xmmintrin.h", "xopintrin.h", "xsavecintrin.h", "xsaveintrin.h", "xsaveoptintrin.h", "xsavesintrin.h", "xtestintrin.h")
     ctx.set(ctx, "cuda_wrapper_files", "cuda_wrappers/algorithm", "cuda_wrappers/complex", "cuda_wrappers/new")
+    ctx.set(ctx, "ppc_wrapper_files", "ppc_wrappers/mmintrin.h")
     ctx.set(ctx, "output_dir", "/clang//include")
     ctx.set(ctx, "out_files")
-    ctx.set(ctx, "header_install_dir", "lib/clang/")
+    ctx.set(ctx, "generated_files")
+    ctx.set(ctx, "header_install_dir", "lib/clang//include")
     ctx = ctx.exit_directory(ctx, "Headers")
     ctx = ctx.enter_directory(ctx, "Basic")
     ctx.set(ctx, "LLVM_LINK_COMPONENTS", "Core", "MC", "Support")
@@ -614,12 +619,12 @@
     ctx = ctx.exit_directory(ctx, "CrossTU")
     ctx = ctx.enter_directory(ctx, "Sema")
     ctx.set(ctx, "LLVM_LINK_COMPONENTS", "Support")
-    ctx.add_clang_library(ctx, "clangSema", "AnalysisBasedWarnings.cpp", "CodeCompleteConsumer.cpp", "DeclSpec.cpp", "DelayedDiagnostic.cpp", "IdentifierResolver.cpp", "JumpDiagnostics.cpp", "MultiplexExternalSemaSource.cpp", "ParsedAttr.cpp", "Scope.cpp", "ScopeInfo.cpp", "Sema.cpp", "SemaAccess.cpp", "SemaAttr.cpp", "SemaCXXScopeSpec.cpp", "SemaCast.cpp", "SemaChecking.cpp", "SemaCodeComplete.cpp", "SemaConsumer.cpp", "SemaCoroutine.cpp", "SemaCUDA.cpp", "SemaDecl.cpp", "SemaDeclAttr.cpp", "SemaDeclCXX.cpp", "SemaDeclObjC.cpp", "SemaExceptionSpec.cpp", "SemaExpr.cpp", "SemaExprCXX.cpp", "SemaExprMember.cpp", "SemaExprObjC.cpp", "SemaFixItUtils.cpp", "SemaInit.cpp", "SemaLambda.cpp", "SemaLookup.cpp", "SemaObjCProperty.cpp", "SemaOpenMP.cpp", "SemaOverload.cpp", "SemaPseudoObject.cpp", "SemaStmt.cpp", "SemaStmtAsm.cpp", "SemaStmtAttr.cpp", "SemaTemplate.cpp", "SemaTemplateDeduction.cpp", "SemaTemplateInstantiate.cpp", "SemaTemplateInstantiateDecl.cpp", "SemaTemplateVariadic.cpp", "SemaType.cpp", "TypeLocBuilder.cpp", "LINK_LIBS", "clangAST", "clangAnalysis", "clangBasic", "clangEdit", "clangLex")
+    ctx.add_clang_library(ctx, "clangSema", "AnalysisBasedWarnings.cpp", "CodeCompleteConsumer.cpp", "DeclSpec.cpp", "DelayedDiagnostic.cpp", "IdentifierResolver.cpp", "JumpDiagnostics.cpp", "MultiplexExternalSemaSource.cpp", "ParsedAttr.cpp", "Scope.cpp", "ScopeInfo.cpp", "Sema.cpp", "SemaAccess.cpp", "SemaAttr.cpp", "SemaCXXScopeSpec.cpp", "SemaCast.cpp", "SemaChecking.cpp", "SemaCodeComplete.cpp", "SemaConsumer.cpp", "SemaCoroutine.cpp", "SemaCUDA.cpp", "SemaDecl.cpp", "SemaDeclAttr.cpp", "SemaDeclCXX.cpp", "SemaDeclObjC.cpp", "SemaExceptionSpec.cpp", "SemaExpr.cpp", "SemaExprCXX.cpp", "SemaExprMember.cpp", "SemaExprObjC.cpp", "SemaFixItUtils.cpp", "SemaInit.cpp", "SemaLambda.cpp", "SemaLookup.cpp", "SemaModule.cpp", "SemaObjCProperty.cpp", "SemaOpenMP.cpp", "SemaOverload.cpp", "SemaPseudoObject.cpp", "SemaStmt.cpp", "SemaStmtAsm.cpp", "SemaStmtAttr.cpp", "SemaTemplate.cpp", "SemaTemplateDeduction.cpp", "SemaTemplateInstantiate.cpp", "SemaTemplateInstantiateDecl.cpp", "SemaTemplateVariadic.cpp", "SemaType.cpp", "TypeLocBuilder.cpp", "LINK_LIBS", "clangAST", "clangAnalysis", "clangBasic", "clangEdit", "clangLex")
     ctx = ctx.exit_directory(ctx, "Sema")
     ctx = ctx.enter_directory(ctx, "CodeGen")
     ctx.set(ctx, "LLVM_LINK_COMPONENTS", "Analysis", "BitReader", "BitWriter", "Core", "Coroutines", "Coverage", "IPO", "IRReader", "AggressiveInstCombine", "InstCombine", "Instrumentation", "LTO", "Linker", "MC", "ObjCARCOpts", "Object", "Passes", "ProfileData", "ScalarOpts", "Support", "Target", "TransformUtils")
     ctx.set(ctx, "codegen_deps", "intrinsics_gen")
-    ctx.add_clang_library(ctx, "clangCodeGen", "BackendUtil.cpp", "CGAtomic.cpp", "CGBlocks.cpp", "CGBuiltin.cpp", "CGCUDANV.cpp", "CGCUDARuntime.cpp", "CGCXX.cpp", "CGCXXABI.cpp", "CGCall.cpp", "CGClass.cpp", "CGCleanup.cpp", "CGCoroutine.cpp", "CGDebugInfo.cpp", "CGDecl.cpp", "CGDeclCXX.cpp", "CGException.cpp", "CGExpr.cpp", "CGExprAgg.cpp", "CGExprCXX.cpp", "CGExprComplex.cpp", "CGExprConstant.cpp", "CGExprScalar.cpp", "CGGPUBuiltin.cpp", "CGLoopInfo.cpp", "CGNonTrivialStruct.cpp", "CGObjC.cpp", "CGObjCGNU.cpp", "CGObjCMac.cpp", "CGObjCRuntime.cpp", "CGOpenCLRuntime.cpp", "CGOpenMPRuntime.cpp", "CGOpenMPRuntimeNVPTX.cpp", "CGRecordLayoutBuilder.cpp", "CGStmt.cpp", "CGStmtOpenMP.cpp", "CGVTT.cpp", "CGVTables.cpp", "CodeGenABITypes.cpp", "CodeGenAction.cpp", "CodeGenFunction.cpp", "CodeGenModule.cpp", "CodeGenPGO.cpp", "CodeGenTBAA.cpp", "CodeGenTypes.cpp", "ConstantInitBuilder.cpp", "CoverageMappingGen.cpp", "ItaniumCXXABI.cpp", "MacroPPCallbacks.cpp", "MicrosoftCXXABI.cpp", "ModuleBuilder.cpp", "ObjectFilePCHContainerOperations.cpp", "SanitizerMetadata.cpp", "SwiftCallingConv.cpp", "TargetInfo.cpp", "VarBypassDetector.cpp", "DEPENDS", "", "LINK_LIBS", "clangAnalysis", "clangAST", "clangBasic", "clangFrontend", "clangLex", "clangSerialization")
+    ctx.add_clang_library(ctx, "clangCodeGen", "BackendUtil.cpp", "CGAtomic.cpp", "CGBlocks.cpp", "CGBuiltin.cpp", "CGCUDANV.cpp", "CGCUDARuntime.cpp", "CGCXX.cpp", "CGCXXABI.cpp", "CGCall.cpp", "CGClass.cpp", "CGCleanup.cpp", "CGCoroutine.cpp", "CGDebugInfo.cpp", "CGDecl.cpp", "CGDeclCXX.cpp", "CGException.cpp", "CGExpr.cpp", "CGExprAgg.cpp", "CGExprCXX.cpp", "CGExprComplex.cpp", "CGExprConstant.cpp", "CGExprScalar.cpp", "CGGPUBuiltin.cpp", "CGLoopInfo.cpp", "CGNonTrivialStruct.cpp", "CGObjC.cpp", "CGObjCGNU.cpp", "CGObjCMac.cpp", "CGObjCRuntime.cpp", "CGOpenCLRuntime.cpp", "CGOpenMPRuntime.cpp", "CGOpenMPRuntimeNVPTX.cpp", "CGRecordLayoutBuilder.cpp", "CGStmt.cpp", "CGStmtOpenMP.cpp", "CGVTT.cpp", "CGVTables.cpp", "CodeGenABITypes.cpp", "CodeGenAction.cpp", "CodeGenFunction.cpp", "CodeGenModule.cpp", "CodeGenPGO.cpp", "CodeGenTBAA.cpp", "CodeGenTypes.cpp", "ConstantInitBuilder.cpp", "CoverageMappingGen.cpp", "ItaniumCXXABI.cpp", "MacroPPCallbacks.cpp", "MicrosoftCXXABI.cpp", "ModuleBuilder.cpp", "ObjectFilePCHContainerOperations.cpp", "PatternInit.cpp", "SanitizerMetadata.cpp", "SwiftCallingConv.cpp", "TargetInfo.cpp", "VarBypassDetector.cpp", "DEPENDS", "", "LINK_LIBS", "clangAnalysis", "clangAST", "clangBasic", "clangFrontend", "clangLex", "clangSerialization")
     ctx = ctx.exit_directory(ctx, "CodeGen")
     ctx = ctx.enter_directory(ctx, "Analysis")
     ctx.set(ctx, "LLVM_LINK_COMPONENTS", "Support")
@@ -635,7 +640,7 @@
     ctx = ctx.exit_directory(ctx, "Rewrite")
     ctx = ctx.enter_directory(ctx, "Driver")
     ctx.set(ctx, "LLVM_LINK_COMPONENTS", "BinaryFormat", "Option", "Support")
-    ctx.add_clang_library(ctx, "clangDriver", "Action.cpp", "Compilation.cpp", "DarwinSDKInfo.cpp", "Distro.cpp", "Driver.cpp", "DriverOptions.cpp", "Job.cpp", "Multilib.cpp", "Phases.cpp", "SanitizerArgs.cpp", "Tool.cpp", "ToolChain.cpp", "ToolChains/Arch/AArch64.cpp", "ToolChains/Arch/ARM.cpp", "ToolChains/Arch/Mips.cpp", "ToolChains/Arch/PPC.cpp", "ToolChains/Arch/RISCV.cpp", "ToolChains/Arch/Sparc.cpp", "ToolChains/Arch/SystemZ.cpp", "ToolChains/Arch/X86.cpp", "ToolChains/Ananas.cpp", "ToolChains/AMDGPU.cpp", "ToolChains/AVR.cpp", "ToolChains/BareMetal.cpp", "ToolChains/Clang.cpp", "ToolChains/CloudABI.cpp", "ToolChains/CommonArgs.cpp", "ToolChains/Contiki.cpp", "ToolChains/CrossWindows.cpp", "ToolChains/Cuda.cpp", "ToolChains/Darwin.cpp", "ToolChains/DragonFly.cpp", "ToolChains/FreeBSD.cpp", "ToolChains/Fuchsia.cpp", "ToolChains/Gnu.cpp", "ToolChains/Haiku.cpp", "ToolChains/HIP.cpp", "ToolChains/Hexagon.cpp", "ToolChains/Hurd.cpp", "ToolChains/Linux.cpp", "ToolChains/MipsLinux.cpp", "ToolChains/MinGW.cpp", "ToolChains/Minix.cpp", "ToolChains/MSP430.cpp", "ToolChains/MSVC.cpp", "ToolChains/Myriad.cpp", "ToolChains/NaCl.cpp", "ToolChains/NetBSD.cpp", "ToolChains/OpenBSD.cpp", "ToolChains/PS4CPU.cpp", "ToolChains/RISCVToolchain.cpp", "ToolChains/Solaris.cpp", "ToolChains/TCE.cpp", "ToolChains/WebAssembly.cpp", "ToolChains/XCore.cpp", "Types.cpp", "XRayArgs.cpp", "DEPENDS", "ClangDriverOptions", "LINK_LIBS", "clangBasic", "")
+    ctx.add_clang_library(ctx, "clangDriver", "Action.cpp", "Compilation.cpp", "DarwinSDKInfo.cpp", "Distro.cpp", "Driver.cpp", "DriverOptions.cpp", "Job.cpp", "Multilib.cpp", "Phases.cpp", "SanitizerArgs.cpp", "Tool.cpp", "ToolChain.cpp", "ToolChains/Arch/AArch64.cpp", "ToolChains/Arch/ARM.cpp", "ToolChains/Arch/Mips.cpp", "ToolChains/Arch/PPC.cpp", "ToolChains/Arch/RISCV.cpp", "ToolChains/Arch/Sparc.cpp", "ToolChains/Arch/SystemZ.cpp", "ToolChains/Arch/X86.cpp", "ToolChains/Ananas.cpp", "ToolChains/AMDGPU.cpp", "ToolChains/AVR.cpp", "ToolChains/BareMetal.cpp", "ToolChains/Clang.cpp", "ToolChains/CloudABI.cpp", "ToolChains/CommonArgs.cpp", "ToolChains/Contiki.cpp", "ToolChains/CrossWindows.cpp", "ToolChains/Cuda.cpp", "ToolChains/Darwin.cpp", "ToolChains/DragonFly.cpp", "ToolChains/FreeBSD.cpp", "ToolChains/Fuchsia.cpp", "ToolChains/Gnu.cpp", "ToolChains/Haiku.cpp", "ToolChains/HIP.cpp", "ToolChains/Hexagon.cpp", "ToolChains/Hurd.cpp", "ToolChains/Linux.cpp", "ToolChains/MipsLinux.cpp", "ToolChains/MinGW.cpp", "ToolChains/Minix.cpp", "ToolChains/MSP430.cpp", "ToolChains/MSVC.cpp", "ToolChains/Myriad.cpp", "ToolChains/NaCl.cpp", "ToolChains/NetBSD.cpp", "ToolChains/OpenBSD.cpp", "ToolChains/PS4CPU.cpp", "ToolChains/RISCVToolchain.cpp", "ToolChains/Solaris.cpp", "ToolChains/TCE.cpp", "ToolChains/WebAssembly.cpp", "ToolChains/XCore.cpp", "ToolChains/PPCLinux.cpp", "Types.cpp", "XRayArgs.cpp", "DEPENDS", "ClangDriverOptions", "LINK_LIBS", "clangBasic", "")
     ctx = ctx.exit_directory(ctx, "Driver")
     ctx = ctx.enter_directory(ctx, "Serialization")
     ctx.set(ctx, "LLVM_LINK_COMPONENTS", "BitReader", "Support")
@@ -667,7 +672,7 @@
     ctx = ctx.exit_directory(ctx, "Inclusions")
     ctx = ctx.enter_directory(ctx, "Refactoring")
     ctx.set(ctx, "LLVM_LINK_COMPONENTS", "Support")
-    ctx.add_clang_library(ctx, "clangToolingRefactor", "ASTSelection.cpp", "ASTSelectionRequirements.cpp", "AtomicChange.cpp", "Extract/Extract.cpp", "Extract/SourceExtraction.cpp", "RefactoringActions.cpp", "Rename/RenamingAction.cpp", "Rename/SymbolOccurrences.cpp", "Rename/USRFinder.cpp", "Rename/USRFindingAction.cpp", "Rename/USRLocFinder.cpp", "LINK_LIBS", "clangAST", "clangASTMatchers", "clangBasic", "clangFormat", "clangIndex", "clangLex", "clangRewrite", "clangToolingCore")
+    ctx.add_clang_library(ctx, "clangToolingRefactor", "ASTSelection.cpp", "ASTSelectionRequirements.cpp", "AtomicChange.cpp", "Extract/Extract.cpp", "Extract/SourceExtraction.cpp", "RefactoringActions.cpp", "Rename/RenamingAction.cpp", "Rename/SymbolOccurrences.cpp", "Rename/USRFinder.cpp", "Rename/USRFindingAction.cpp", "Rename/USRLocFinder.cpp", "SourceCode.cpp", "Stencil.cpp", "Transformer.cpp", "LINK_LIBS", "clangAST", "clangASTMatchers", "clangBasic", "clangFormat", "clangIndex", "clangLex", "clangRewrite", "clangToolingCore")
     ctx = ctx.exit_directory(ctx, "Refactoring")
     ctx = ctx.enter_directory(ctx, "ASTDiff")
     ctx.set(ctx, "LLVM_LINK_COMPONENTS", "Support")
diff --git a/tools/build_rules/llvm/generated_llvm_build_deps.bzl b/tools/build_rules/llvm/generated_llvm_build_deps.bzl
index 7d77f11..c8cb4b8 100644
--- a/tools/build_rules/llvm/generated_llvm_build_deps.bzl
+++ b/tools/build_rules/llvm/generated_llvm_build_deps.bzl
@@ -63,6 +63,7 @@
         "Vectorize",
         "GlobalISel",
         "BinaryFormat",
+        "MIRParser",
     ],
     "AMDGPUDesc": [
         "Core",
@@ -82,7 +83,7 @@
         "Support",
     ],
     "AMDGPUInfo": ["Support"],
-    "AMDGPUUtils": ["Core", "MC", "Support"],
+    "AMDGPUUtils": ["Core", "MC", "BinaryFormat", "Support"],
     "ARCAsmPrinter": ["MC", "Support"],
     "ARCCodeGen": [
         "Analysis",
@@ -168,6 +169,7 @@
         "DebugInfoMSF",
         "MC",
         "MCParser",
+        "Remarks",
         "Support",
         "Target",
     ],
@@ -211,7 +213,7 @@
         "Target",
         "TransformUtils",
     ],
-    "Core": ["BinaryFormat", "Support"],
+    "Core": ["BinaryFormat", "Remarks", "Support"],
     "Coroutines": [
         "Analysis",
         "Core",
@@ -325,6 +327,7 @@
         "ProfileData",
     ],
     "Interpreter": ["CodeGen", "Core", "ExecutionEngine", "Support"],
+    "JITLink": ["BinaryFormat", "Object", "Support"],
     "LTO": [
         "AggressiveInstCombine",
         "Analysis",
@@ -456,30 +459,14 @@
     ],
     "NVPTXDesc": ["MC", "NVPTXAsmPrinter", "NVPTXInfo", "Support"],
     "NVPTXInfo": ["Support"],
-    "Nios2AsmPrinter": ["MC", "Support"],
-    "Nios2CodeGen": [
-        "AsmPrinter",
-        "CodeGen",
-        "Core",
-        "GlobalISel",
-        "MC",
-        "Nios2AsmPrinter",
-        "Nios2Desc",
-        "Nios2Info",
-        "SelectionDAG",
-        "Support",
-        "Target",
-    ],
-    "Nios2Desc": ["MC", "Nios2AsmPrinter", "Nios2Info", "Support"],
-    "Nios2Info": ["Support"],
     "ObjCARC": ["Analysis", "Core", "Support", "TransformUtils"],
     "Object": ["BitReader", "Core", "MC", "BinaryFormat", "MCParser", "Support"],
-    "ObjectYAML": ["Support", "DebugInfoCodeView"],
-    "OptRemarks": ["Support"],
+    "ObjectYAML": ["Object", "Support", "DebugInfoCodeView"],
     "Option": ["Support"],
     "OrcJIT": [
         "Core",
         "ExecutionEngine",
+        "JITLink",
         "Object",
         "MC",
         "RuntimeDyld",
@@ -550,10 +537,11 @@
         "Support",
         "Target",
     ],
-    "RISCVDesc": ["MC", "RISCVAsmPrinter", "RISCVInfo", "Support"],
+    "RISCVDesc": ["MC", "RISCVAsmPrinter", "RISCVInfo", "RISCVUtils", "Support"],
     "RISCVDisassembler": ["MCDisassembler", "RISCVInfo", "Support"],
     "RISCVInfo": ["Support"],
     "RISCVUtils": ["Support"],
+    "Remarks": ["Support"],
     "RuntimeDyld": ["MC", "Object", "Support"],
     "Scalar": [
         "AggressiveInstCombine",
@@ -640,6 +628,7 @@
     "WebAssemblyCodeGen": [
         "Analysis",
         "AsmPrinter",
+        "BinaryFormat",
         "CodeGen",
         "Core",
         "MC",
@@ -658,7 +647,12 @@
         "WebAssemblyAsmPrinter",
         "WebAssemblyInfo",
     ],
-    "WebAssemblyDisassembler": ["MCDisassembler", "WebAssemblyInfo", "Support"],
+    "WebAssemblyDisassembler": [
+        "MCDisassembler",
+        "WebAssemblyInfo",
+        "WebAssemblyAsmPrinter",
+        "Support",
+    ],
     "WebAssemblyInfo": ["Support"],
     "WindowsManifest": ["Support"],
     "X86AsmParser": [
diff --git a/tools/build_rules/llvm/llvm.BUILD b/tools/build_rules/llvm/llvm.BUILD
index df2f551..8edc4f5 100644
--- a/tools/build_rules/llvm/llvm.BUILD
+++ b/tools/build_rules/llvm/llvm.BUILD
@@ -152,6 +152,7 @@
       OUTS=($(OUTS))
       for i in "$${!SRCS[@]}"; do
         cp $${SRCS[$$i]} $${OUTS[$$i]}
+        echo cp $${SRCS[$$i]} $${OUTS[$$i]}
       done""",
     output_to_bindir = True,
 )
@@ -159,6 +160,7 @@
 cc_resources(
     name = "clang_builtin_headers_resources",
     data = [":builtin_headers_gen"],
+    strip = "staging/include/",
 )
 
 load("@io_kythe//tools/build_rules/llvm:cmake_defines.bzl", "cmake_defines", "LLVM_TARGETS")
diff --git a/tools/build_rules/llvm/repo.bzl b/tools/build_rules/llvm/repo.bzl
index 1992cca..4a90f1a 100644
--- a/tools/build_rules/llvm/repo.bzl
+++ b/tools/build_rules/llvm/repo.bzl
@@ -39,12 +39,12 @@
     implementation = _git,
     attrs = {
         "_commit": attr.string(
-            default = "ce3d67009718c7d124bdf540ac830c17d689645b",
+            default = "25f64629761f583324c716aab319cf6298aed45b",
         ),
         "_sha256": attr.string(
             # Make sure to update this along with the commit as its presence will cache the download,
             # even if the rules or commit change.
-            default = "129bf656daabf6f2faf700857cf7f3b5d5b0bd19ede3054972e792eaf909b7a3",
+            default = "070bdb150f524f81485b1ada7991f842a161c0fbf8dc302851921ac7ffc2947c",
         ),
     },
 )