Fix targets with generated LLVM IR and Assembly sources

These two are also C-like sources, so don't ignore them in
backends/ninjabackend.py:generate_target() when we call
is_source() on the list of generated sources for that target.

Closes #1318
pull/1320/head
Nirbheek Chauhan 8 years ago
parent 86a0c39f4b
commit 7b3957afbd
  1. 7
      mesonbuild/compilers.py

@ -53,9 +53,10 @@ clike_langs = ('objcpp', 'objc', 'd', 'cpp', 'c', 'fortran',)
clike_suffixes = ()
for l in clike_langs:
clike_suffixes += lang_suffixes[l]
clike_suffixes += ('h',)
clike_suffixes += ('h', 'll', 's')
# All these are only for C-like languages; see `clike_langs` above.
# These are used in backend/backends.py:generated_target()
def is_header(fname):
if hasattr(fname, 'fname'):
fname = fname.fname
@ -65,7 +66,7 @@ def is_header(fname):
def is_source(fname):
if hasattr(fname, 'fname'):
fname = fname.fname
suffix = fname.split('.')[-1]
suffix = fname.split('.')[-1].lower()
return suffix in clike_suffixes
def is_assembly(fname):

Loading…
Cancel
Save