mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
LLVMBuild: Introduce a common section which currently has a list of the
subdirectories to traverse into. - Originally I wanted to avoid this and just autoscan, but this has one key flaw in that new subdirectories can not automatically trigger a rerun of the llvm-build tool. This is particularly a pain when switching back and forth between trees where one has added a subdirectory, as the dependencies will tend to be wrong. This will also eliminates FIXME implicitly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146436 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
54d8c7fc03
commit
b0c594fd42
@ -15,6 +15,9 @@
|
|||||||
;
|
;
|
||||||
;===------------------------------------------------------------------------===;
|
;===------------------------------------------------------------------------===;
|
||||||
|
|
||||||
|
[common]
|
||||||
|
subdirectories = bindings docs examples lib projects runtime tools utils
|
||||||
|
|
||||||
[component_0]
|
[component_0]
|
||||||
type = Group
|
type = Group
|
||||||
name = Miscellaneous
|
name = Miscellaneous
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
;
|
;
|
||||||
;===------------------------------------------------------------------------===;
|
;===------------------------------------------------------------------------===;
|
||||||
|
|
||||||
|
[common]
|
||||||
|
subdirectories = IPA
|
||||||
|
|
||||||
[component_0]
|
[component_0]
|
||||||
type = Library
|
type = Library
|
||||||
name = Analysis
|
name = Analysis
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
;
|
;
|
||||||
;===------------------------------------------------------------------------===;
|
;===------------------------------------------------------------------------===;
|
||||||
|
|
||||||
|
[common]
|
||||||
|
subdirectories = Reader Writer
|
||||||
|
|
||||||
[component_0]
|
[component_0]
|
||||||
type = Group
|
type = Group
|
||||||
name = Bitcode
|
name = Bitcode
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
;
|
;
|
||||||
;===------------------------------------------------------------------------===;
|
;===------------------------------------------------------------------------===;
|
||||||
|
|
||||||
|
[common]
|
||||||
|
subdirectories = AsmPrinter SelectionDAG
|
||||||
|
|
||||||
[component_0]
|
[component_0]
|
||||||
type = Library
|
type = Library
|
||||||
name = CodeGen
|
name = CodeGen
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
;
|
;
|
||||||
;===------------------------------------------------------------------------===;
|
;===------------------------------------------------------------------------===;
|
||||||
|
|
||||||
|
[common]
|
||||||
|
subdirectories = Interpreter JIT MCJIT RuntimeDyld
|
||||||
|
|
||||||
[component_0]
|
[component_0]
|
||||||
type = Library
|
type = Library
|
||||||
name = ExecutionEngine
|
name = ExecutionEngine
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
;
|
;
|
||||||
;===------------------------------------------------------------------------===;
|
;===------------------------------------------------------------------------===;
|
||||||
|
|
||||||
|
[common]
|
||||||
|
subdirectories = Analysis Archive AsmParser Bitcode CodeGen DebugInfo ExecutionEngine Linker MC Object Support TableGen Target Transforms VMCore
|
||||||
|
|
||||||
[component_0]
|
[component_0]
|
||||||
type = Group
|
type = Group
|
||||||
name = Libraries
|
name = Libraries
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
;
|
;
|
||||||
;===------------------------------------------------------------------------===;
|
;===------------------------------------------------------------------------===;
|
||||||
|
|
||||||
|
[common]
|
||||||
|
subdirectories = MCDisassembler MCParser
|
||||||
|
|
||||||
[component_0]
|
[component_0]
|
||||||
type = Library
|
type = Library
|
||||||
name = MC
|
name = MC
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
;
|
;
|
||||||
;===------------------------------------------------------------------------===;
|
;===------------------------------------------------------------------------===;
|
||||||
|
|
||||||
|
[common]
|
||||||
|
subdirectories = AsmParser Disassembler InstPrinter MCTargetDesc TargetInfo
|
||||||
|
|
||||||
[component_0]
|
[component_0]
|
||||||
type = TargetGroup
|
type = TargetGroup
|
||||||
name = ARM
|
name = ARM
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
;
|
;
|
||||||
;===------------------------------------------------------------------------===;
|
;===------------------------------------------------------------------------===;
|
||||||
|
|
||||||
|
[common]
|
||||||
|
subdirectories = TargetInfo
|
||||||
|
|
||||||
[component_0]
|
[component_0]
|
||||||
type = TargetGroup
|
type = TargetGroup
|
||||||
name = CBackend
|
name = CBackend
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
;
|
;
|
||||||
;===------------------------------------------------------------------------===;
|
;===------------------------------------------------------------------------===;
|
||||||
|
|
||||||
|
[common]
|
||||||
|
subdirectories = MCTargetDesc TargetInfo
|
||||||
|
|
||||||
[component_0]
|
[component_0]
|
||||||
type = TargetGroup
|
type = TargetGroup
|
||||||
name = CellSPU
|
name = CellSPU
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
;
|
;
|
||||||
;===------------------------------------------------------------------------===;
|
;===------------------------------------------------------------------------===;
|
||||||
|
|
||||||
|
[common]
|
||||||
|
subdirectories = TargetInfo
|
||||||
|
|
||||||
[component_0]
|
[component_0]
|
||||||
type = TargetGroup
|
type = TargetGroup
|
||||||
name = CppBackend
|
name = CppBackend
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
;===- ./lib/Target/Hexagon/LLVMBuild.txt ----------------------*- Conf -*--===;
|
;===- ./lib/Target/Hexagon/LLVMBuild.txt -----------------------*- Conf -*--===;
|
||||||
;
|
;
|
||||||
; The LLVM Compiler Infrastructure
|
; The LLVM Compiler Infrastructure
|
||||||
;
|
;
|
||||||
@ -15,6 +15,9 @@
|
|||||||
;
|
;
|
||||||
;===------------------------------------------------------------------------===;
|
;===------------------------------------------------------------------------===;
|
||||||
|
|
||||||
|
[common]
|
||||||
|
subdirectories = TargetInfo
|
||||||
|
|
||||||
[component_0]
|
[component_0]
|
||||||
type = TargetGroup
|
type = TargetGroup
|
||||||
name = Hexagon
|
name = Hexagon
|
||||||
@ -27,4 +30,3 @@ name = HexagonCodeGen
|
|||||||
parent = Hexagon
|
parent = Hexagon
|
||||||
required_libraries = AsmPrinter CodeGen Core HexagonInfo SelectionDAG Support Target MC
|
required_libraries = AsmPrinter CodeGen Core HexagonInfo SelectionDAG Support Target MC
|
||||||
add_to_library_groups = Hexagon
|
add_to_library_groups = Hexagon
|
||||||
|
|
||||||
|
@ -21,4 +21,3 @@ name = HexagonInfo
|
|||||||
parent = Hexagon
|
parent = Hexagon
|
||||||
required_libraries = MC Support
|
required_libraries = MC Support
|
||||||
add_to_library_groups = Hexagon
|
add_to_library_groups = Hexagon
|
||||||
|
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
;
|
;
|
||||||
;===------------------------------------------------------------------------===;
|
;===------------------------------------------------------------------------===;
|
||||||
|
|
||||||
|
[common]
|
||||||
|
subdirectories = ARM CBackend CellSPU CppBackend Hexagon MBlaze MSP430 Mips PTX PowerPC Sparc X86 XCore
|
||||||
|
|
||||||
; This is a special group whose required libraries are extended (by llvm-build)
|
; This is a special group whose required libraries are extended (by llvm-build)
|
||||||
; with the best execution engine (the native JIT, if available, or the
|
; with the best execution engine (the native JIT, if available, or the
|
||||||
; interpreter).
|
; interpreter).
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
;
|
;
|
||||||
;===------------------------------------------------------------------------===;
|
;===------------------------------------------------------------------------===;
|
||||||
|
|
||||||
|
[common]
|
||||||
|
subdirectories = AsmParser Disassembler InstPrinter MCTargetDesc TargetInfo
|
||||||
|
|
||||||
[component_0]
|
[component_0]
|
||||||
type = TargetGroup
|
type = TargetGroup
|
||||||
name = MBlaze
|
name = MBlaze
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
;
|
;
|
||||||
;===------------------------------------------------------------------------===;
|
;===------------------------------------------------------------------------===;
|
||||||
|
|
||||||
|
[common]
|
||||||
|
subdirectories = InstPrinter MCTargetDesc TargetInfo
|
||||||
|
|
||||||
[component_0]
|
[component_0]
|
||||||
type = TargetGroup
|
type = TargetGroup
|
||||||
name = MSP430
|
name = MSP430
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
;
|
;
|
||||||
;===------------------------------------------------------------------------===;
|
;===------------------------------------------------------------------------===;
|
||||||
|
|
||||||
|
[common]
|
||||||
|
subdirectories = InstPrinter MCTargetDesc TargetInfo
|
||||||
|
|
||||||
[component_0]
|
[component_0]
|
||||||
type = TargetGroup
|
type = TargetGroup
|
||||||
name = Mips
|
name = Mips
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
;
|
;
|
||||||
;===------------------------------------------------------------------------===;
|
;===------------------------------------------------------------------------===;
|
||||||
|
|
||||||
|
[common]
|
||||||
|
subdirectories = InstPrinter MCTargetDesc TargetInfo
|
||||||
|
|
||||||
[component_0]
|
[component_0]
|
||||||
type = TargetGroup
|
type = TargetGroup
|
||||||
name = PTX
|
name = PTX
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
;
|
;
|
||||||
;===------------------------------------------------------------------------===;
|
;===------------------------------------------------------------------------===;
|
||||||
|
|
||||||
|
[common]
|
||||||
|
subdirectories = InstPrinter MCTargetDesc TargetInfo
|
||||||
|
|
||||||
[component_0]
|
[component_0]
|
||||||
type = TargetGroup
|
type = TargetGroup
|
||||||
name = PowerPC
|
name = PowerPC
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
;
|
;
|
||||||
;===------------------------------------------------------------------------===;
|
;===------------------------------------------------------------------------===;
|
||||||
|
|
||||||
|
[common]
|
||||||
|
subdirectories = MCTargetDesc TargetInfo
|
||||||
|
|
||||||
[component_0]
|
[component_0]
|
||||||
type = TargetGroup
|
type = TargetGroup
|
||||||
name = Sparc
|
name = Sparc
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
;
|
;
|
||||||
;===------------------------------------------------------------------------===;
|
;===------------------------------------------------------------------------===;
|
||||||
|
|
||||||
|
[common]
|
||||||
|
subdirectories = AsmParser Disassembler InstPrinter MCTargetDesc TargetInfo Utils
|
||||||
|
|
||||||
[component_0]
|
[component_0]
|
||||||
type = TargetGroup
|
type = TargetGroup
|
||||||
name = X86
|
name = X86
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
;
|
;
|
||||||
;===------------------------------------------------------------------------===;
|
;===------------------------------------------------------------------------===;
|
||||||
|
|
||||||
|
[common]
|
||||||
|
subdirectories = MCTargetDesc TargetInfo
|
||||||
|
|
||||||
[component_0]
|
[component_0]
|
||||||
type = TargetGroup
|
type = TargetGroup
|
||||||
name = XCore
|
name = XCore
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
;
|
;
|
||||||
;===------------------------------------------------------------------------===;
|
;===------------------------------------------------------------------------===;
|
||||||
|
|
||||||
|
[common]
|
||||||
|
subdirectories = IPO InstCombine Instrumentation Scalar Utils
|
||||||
|
|
||||||
[component_0]
|
[component_0]
|
||||||
type = Group
|
type = Group
|
||||||
name = Transforms
|
name = Transforms
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
;
|
;
|
||||||
;===------------------------------------------------------------------------===;
|
;===------------------------------------------------------------------------===;
|
||||||
|
|
||||||
|
[common]
|
||||||
|
subdirectories = bugpoint llc lli llvm-ar llvm-as llvm-bcanalyzer llvm-cov llvm-diff llvm-dis llvm-dwarfdump llvm-extract llvm-ld llvm-link llvm-mc llvm-nm llvm-objdump llvm-prof llvm-ranlib llvm-rtdyld llvm-size llvm-stub macho-dump opt
|
||||||
|
|
||||||
[component_0]
|
[component_0]
|
||||||
type = Group
|
type = Group
|
||||||
name = Tools
|
name = Tools
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
;
|
;
|
||||||
;===------------------------------------------------------------------------===;
|
;===------------------------------------------------------------------------===;
|
||||||
|
|
||||||
|
[common]
|
||||||
|
subdirectories = TableGen unittest
|
||||||
|
|
||||||
[component_0]
|
[component_0]
|
||||||
type = Group
|
type = Group
|
||||||
name = BuildTools
|
name = BuildTools
|
||||||
|
@ -214,14 +214,45 @@ class LLVMProjectInfo(object):
|
|||||||
|
|
||||||
info_basedir[ci.subpath] = info_basedir.get(ci.subpath, []) + [ci]
|
info_basedir[ci.subpath] = info_basedir.get(ci.subpath, []) + [ci]
|
||||||
|
|
||||||
|
# Compute the list of subdirectories to scan.
|
||||||
|
subpath_subdirs = {}
|
||||||
|
for ci in self.component_infos:
|
||||||
|
# Ignore root components.
|
||||||
|
if ci.subpath == '/':
|
||||||
|
continue
|
||||||
|
|
||||||
|
# Otherwise, append this subpath to the parent list.
|
||||||
|
parent_path = os.path.dirname(ci.subpath)
|
||||||
|
subpath_subdirs[parent_path] = parent_list = subpath_subdirs.get(
|
||||||
|
parent_path, set())
|
||||||
|
parent_list.add(os.path.basename(ci.subpath))
|
||||||
|
|
||||||
# Generate the build files.
|
# Generate the build files.
|
||||||
for subpath, infos in info_basedir.items():
|
for subpath, infos in info_basedir.items():
|
||||||
# Order the components by name to have a canonical ordering.
|
# Order the components by name to have a canonical ordering.
|
||||||
infos.sort(key = lambda ci: ci.name)
|
infos.sort(key = lambda ci: ci.name)
|
||||||
|
|
||||||
# Format the components into llvmbuild fragments.
|
# Format the components into llvmbuild fragments.
|
||||||
fragments = filter(None, [ci.get_llvmbuild_fragment()
|
fragments = []
|
||||||
for ci in infos])
|
|
||||||
|
# Add the common fragments.
|
||||||
|
subdirectories = subpath_subdirs.get(subpath)
|
||||||
|
if subdirectories:
|
||||||
|
fragment = """\
|
||||||
|
subdirectories = %s
|
||||||
|
""" % (" ".join(sorted(subdirectories)),)
|
||||||
|
fragments.append(("common", fragment))
|
||||||
|
|
||||||
|
# Add the component fragments.
|
||||||
|
num_common_fragments = len(fragments)
|
||||||
|
for ci in infos:
|
||||||
|
fragment = ci.get_llvmbuild_fragment()
|
||||||
|
if fragment is None:
|
||||||
|
continue
|
||||||
|
|
||||||
|
name = "component_%d" % (len(fragments) - num_common_fragments)
|
||||||
|
fragments.append((name, fragment))
|
||||||
|
|
||||||
if not fragments:
|
if not fragments:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
@ -242,7 +273,7 @@ class LLVMProjectInfo(object):
|
|||||||
if ln.startswith(';'):
|
if ln.startswith(';'):
|
||||||
comment_block += ln
|
comment_block += ln
|
||||||
elif ln.startswith('[') and ln.endswith(']\n'):
|
elif ln.startswith('[') and ln.endswith(']\n'):
|
||||||
comments_map[ln[:-1]] = comment_block
|
comments_map[ln[1:-2]] = comment_block
|
||||||
else:
|
else:
|
||||||
comment_block = ""
|
comment_block = ""
|
||||||
f.close()
|
f.close()
|
||||||
@ -275,15 +306,16 @@ class LLVMProjectInfo(object):
|
|||||||
;===------------------------------------------------------------------------===;
|
;===------------------------------------------------------------------------===;
|
||||||
""" % header_string
|
""" % header_string
|
||||||
|
|
||||||
for i,fragment in enumerate(fragments):
|
# Write out each fragment.each component fragment.
|
||||||
name = '[component_%d]' % i
|
for name,fragment in fragments:
|
||||||
comment = comments_map.get(name)
|
comment = comments_map.get(name)
|
||||||
if comment is not None:
|
if comment is not None:
|
||||||
f.write(comment)
|
f.write(comment)
|
||||||
print >>f, name
|
print >>f, "[%s]" % name
|
||||||
f.write(fragment)
|
f.write(fragment)
|
||||||
if fragment is not fragments[-1]:
|
if fragment is not fragments[-1][1]:
|
||||||
print >>f
|
print >>f
|
||||||
|
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
def write_library_table(self, output_path):
|
def write_library_table(self, output_path):
|
||||||
|
Loading…
Reference in New Issue
Block a user