gnome: Don't assume that a C compiler is being used
This commit is contained in:
parent
d38f3deaed
commit
1e42241ef3
|
@ -443,12 +443,18 @@ class GnomeModule(ExtensionModule):
|
||||||
'Gir includes must be str, GirTarget, or list of them')
|
'Gir includes must be str, GirTarget, or list of them')
|
||||||
|
|
||||||
cflags = []
|
cflags = []
|
||||||
if state.global_args.get('c'):
|
for lang, compiler in girtarget.compilers.items():
|
||||||
cflags += state.global_args['c']
|
# XXX: Can you use g-i with any other language?
|
||||||
if state.project_args.get('c'):
|
if lang in ('c', 'cpp', 'objc', 'objcpp', 'd'):
|
||||||
cflags += state.project_args['c']
|
break
|
||||||
if 'c' in state.compilers:
|
else:
|
||||||
compiler = state.compilers['c']
|
lang = None
|
||||||
|
compiler = None
|
||||||
|
if lang and compiler:
|
||||||
|
if state.global_args.get(lang):
|
||||||
|
cflags += state.global_args[lang]
|
||||||
|
if state.project_args.get(lang):
|
||||||
|
cflags += state.project_args[lang]
|
||||||
sanitize = compiler.get_options().get('b_sanitize')
|
sanitize = compiler.get_options().get('b_sanitize')
|
||||||
if sanitize:
|
if sanitize:
|
||||||
cflags += compilers.sanitizer_compile_args(sanitize)
|
cflags += compilers.sanitizer_compile_args(sanitize)
|
||||||
|
|
Loading…
Reference in New Issue