llvm.org GIT mirror llvm / 5ed5506
LLVMBuild: Add explicit information on whether targets define an assembly printer, assembly parser, or disassembler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144344 91177308-0d34-0410-b5e6-96231b3b80d8 Daniel Dunbar 7 years ago
12 changed file(s) with 44 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
291291

Components with this type use the LibraryGroup properties in addition

292292 to:

293293
294
  • has_asmparser [optional] [boolean]
  • 295

    Whether this target defines an assembly parser.

    296
  • has_asmprinter [optional] [boolean]
  • 297

    Whether this target defines an assembly printer.

    298
  • has_disassembler [optional] [boolean]
  • 299

    Whether this target defines a disassembler.

    294300
  • has_jit [optional] [boolean]
  • 295301

    Whether this target supports JIT compilation.

    296302
    1818 type = TargetGroup
    1919 name = ARM
    2020 parent = Target
    21 has_asmparser = 1
    22 has_asmprinter = 1
    23 has_disassembler = 1
    2124 has_jit = 1
    2225
    2326 [component_1]
    1818 type = TargetGroup
    1919 name = CellSPU
    2020 parent = Target
    21 has_asmprinter = 1
    2122
    2223 [component_1]
    2324 type = Library
    1818 type = TargetGroup
    1919 name = MBlaze
    2020 parent = Target
    21 has_asmparser = 1
    22 has_asmprinter = 1
    23 has_disassembler = 1
    2124
    2225 [component_1]
    2326 type = Library
    1818 type = TargetGroup
    1919 name = MSP430
    2020 parent = Target
    21 has_asmprinter = 1
    2122
    2223 [component_1]
    2324 type = Library
    1818 type = TargetGroup
    1919 name = Mips
    2020 parent = Target
    21 has_asmprinter = 1
    2122 has_jit = 1
    2223
    2324 [component_1]
    1818 type = TargetGroup
    1919 name = PTX
    2020 parent = Target
    21 has_asmprinter = 1
    2122
    2223 [component_1]
    2324 type = Library
    1818 type = TargetGroup
    1919 name = PowerPC
    2020 parent = Target
    21 has_asmprinter = 1
    2122 has_jit = 1
    2223
    2324 [component_1]
    1818 type = TargetGroup
    1919 name = Sparc
    2020 parent = Target
    21 has_asmprinter = 1
    2122
    2223 [component_1]
    2324 type = Library
    1818 type = TargetGroup
    1919 name = X86
    2020 parent = Target
    21 has_asmparser = 1
    22 has_asmprinter = 1
    23 has_disassembler = 1
    2124 has_jit = 1
    2225
    2326 [component_1]
    1818 type = TargetGroup
    1919 name = XCore
    2020 parent = Target
    21 has_asmprinter = 1
    2122
    2223 [component_1]
    2324 type = Library
    197197 kwargs['add_to_library_groups'] = items.get_list(
    198198 'add_to_library_groups')
    199199 kwargs['has_jit'] = items.get_optional_bool('has_jit', False)
    200 kwargs['has_asmprinter'] = items.get_optional_bool('has_asmprinter',
    201 False)
    202 kwargs['has_asmparser'] = items.get_optional_bool('has_asmparser',
    203 False)
    204 kwargs['has_disassembler'] = items.get_optional_bool('has_disassembler',
    205 False)
    200206 return TargetGroupComponentInfo(subpath, **kwargs)
    201207
    202208 def __init__(self, subpath, name, parent, required_libraries = [],
    203 add_to_library_groups = [], has_jit = False):
    209 add_to_library_groups = [], has_jit = False,
    210 has_asmprinter = False, has_asmparser = False,
    211 has_disassembler = False):
    204212 ComponentInfo.__init__(self, subpath, name, [], parent)
    205213
    206214 # The names of the library components which are required when linking
    213221
    214222 # Whether or not this target supports the JIT.
    215223 self.has_jit = bool(has_jit)
    224
    225 # Whether or not this target defines an assembly printer.
    226 self.has_asmprinter = bool(has_asmprinter)
    227
    228 # Whether or not this target defines an assembly parser.
    229 self.has_asmparser = bool(has_asmparser)
    230
    231 # Whether or not this target defines an disassembler.
    232 self.has_disassembler = bool(has_disassembler)
    216233
    217234 # Whether or not this target is enabled. This is set in response to
    218235 # configuration parameters.
    237254 if self.add_to_library_groups:
    238255 print >>result, 'add_to_library_groups = %s' % ' '.join(
    239256 self.add_to_library_groups)
    240 if self.has_jit:
    241 print >>result, 'has_jit = %s' % ' '.join(
    242 int(self.has_jit))
    257 for bool_key in ('has_asmparser', 'has_asmprinter', 'has_disassembler',
    258 'has_jit'):
    259 if getattr(self, bool_key):
    260 print >>result, '%s = 1' % (bool_key,)
    243261 return result.getvalue()
    244262
    245263 def get_llvmconfig_component_name(self):