store compiler flags in conf/bld context object so that we can use them selectively at build time
This commit is contained in:
parent
0d78359d29
commit
751d330dbb
15
wscript
15
wscript
@ -78,6 +78,10 @@ compiler_flags_dictionaries= {
|
|||||||
'c99': '-std=c99',
|
'c99': '-std=c99',
|
||||||
# Flag to enable AT&T assembler syntax
|
# Flag to enable AT&T assembler syntax
|
||||||
'attasm': '-masm=att',
|
'attasm': '-masm=att',
|
||||||
|
# Flags to make AVX instructions/intrinsics available
|
||||||
|
'avx': '-mavx',
|
||||||
|
# Flags to generate position independent code, when needed to build a shared object
|
||||||
|
'pic': '-fPIC',
|
||||||
},
|
},
|
||||||
'msvc' : {
|
'msvc' : {
|
||||||
'debuggable' : ['/DDEBUG', '/Od', '/Zi', '/MDd', '/Gd', '/EHsc'],
|
'debuggable' : ['/DDEBUG', '/Od', '/Zi', '/MDd', '/Gd', '/EHsc'],
|
||||||
@ -105,6 +109,9 @@ compiler_flags_dictionaries= {
|
|||||||
'cxx-strict' : '',
|
'cxx-strict' : '',
|
||||||
'strict' : '',
|
'strict' : '',
|
||||||
'c99': '/TP',
|
'c99': '/TP',
|
||||||
|
'attasm': '',
|
||||||
|
'avx': '',
|
||||||
|
'pic': '',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -296,8 +303,12 @@ int main() { return 0; }''',
|
|||||||
else:
|
else:
|
||||||
compiler_name = 'gcc'
|
compiler_name = 'gcc'
|
||||||
|
|
||||||
flags_dict = compiler_flags_dictionaries[compiler_name]
|
flags_dict = compiler_flags_dictionaries[compiler_name]
|
||||||
|
# Save the compiler flags because we need them at build time
|
||||||
|
# when we need to add compiler specific flags in certain
|
||||||
|
# libraries
|
||||||
|
conf.env['compiler_flags_dict'] = flags_dict;
|
||||||
|
|
||||||
autowaf.set_basic_compiler_flags (conf,flags_dict)
|
autowaf.set_basic_compiler_flags (conf,flags_dict)
|
||||||
|
|
||||||
if conf.options.asan:
|
if conf.options.asan:
|
||||||
|
Loading…
Reference in New Issue
Block a user