mirror of https://gitlab.com/ita1024/waf.git
Detect of assembly features in bld.program()/bld.shlib()
This commit is contained in:
parent
05252b85df
commit
770910fcda
|
@ -18,6 +18,7 @@ def build(bld):
|
|||
source = 'main.c test.S',
|
||||
target = 'asmtest',
|
||||
defines = 'foo=12',
|
||||
asflags = '-Os',
|
||||
includes = '.')
|
||||
|
||||
def disp(ctx):
|
||||
|
|
|
@ -47,10 +47,12 @@ def sniff_features(**kw):
|
|||
if x in exts:
|
||||
feats.append('cxx')
|
||||
break
|
||||
|
||||
if 'c' in exts or 'vala' in exts or 'gs' in exts:
|
||||
feats.append('c')
|
||||
|
||||
if 's' in exts or 'S' in exts:
|
||||
feats.append('asm')
|
||||
|
||||
for x in 'f f90 F F90 for FOR'.split():
|
||||
if x in exts:
|
||||
feats.append('fc')
|
||||
|
@ -66,7 +68,7 @@ def sniff_features(**kw):
|
|||
if typ in ('program', 'shlib', 'stlib'):
|
||||
will_link = False
|
||||
for x in feats:
|
||||
if x in ('cxx', 'd', 'fc', 'c'):
|
||||
if x in ('cxx', 'd', 'fc', 'c', 'asm'):
|
||||
feats.append(x + typ)
|
||||
will_link = True
|
||||
if not will_link and not kw.get('features', []):
|
||||
|
|
Loading…
Reference in New Issue