Merged clang color.
This commit is contained in:
commit
c8042b5574
|
@ -64,3 +64,4 @@ Philipp Geier
|
||||||
Mike Sinkovsky
|
Mike Sinkovsky
|
||||||
Dima Krasner
|
Dima Krasner
|
||||||
Fabio Porcedda
|
Fabio Porcedda
|
||||||
|
Rodrigo Lourenço
|
||||||
|
|
|
@ -188,6 +188,11 @@ gnu_color_args = {'auto': ['-fdiagnostics-color=auto'],
|
||||||
'never': ['-fdiagnostics-color=never'],
|
'never': ['-fdiagnostics-color=never'],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
clang_color_args = {'auto': ['-Xclang', '-fcolor-diagnostics'],
|
||||||
|
'always': ['-Xclang', '-fcolor-diagnostics'],
|
||||||
|
'never': ['-Xclang', '-fno-color-diagnostics'],
|
||||||
|
}
|
||||||
|
|
||||||
base_options = {'b_pch': coredata.UserBooleanOption('b_pch', 'Use precompiled headers', True),
|
base_options = {'b_pch': coredata.UserBooleanOption('b_pch', 'Use precompiled headers', True),
|
||||||
'b_lto': coredata.UserBooleanOption('b_lto', 'Use link time optimization', False),
|
'b_lto': coredata.UserBooleanOption('b_lto', 'Use link time optimization', False),
|
||||||
'b_sanitize': coredata.UserComboOption('b_sanitize',
|
'b_sanitize': coredata.UserComboOption('b_sanitize',
|
||||||
|
@ -2427,7 +2432,7 @@ class ClangCompiler:
|
||||||
self.id = 'clang'
|
self.id = 'clang'
|
||||||
self.clang_type = clang_type
|
self.clang_type = clang_type
|
||||||
self.base_options = ['b_pch', 'b_lto', 'b_pgo', 'b_sanitize', 'b_coverage',
|
self.base_options = ['b_pch', 'b_lto', 'b_pgo', 'b_sanitize', 'b_coverage',
|
||||||
'b_ndebug', 'b_staticpic']
|
'b_ndebug', 'b_staticpic', 'b_colorout']
|
||||||
if self.clang_type != CLANG_OSX:
|
if self.clang_type != CLANG_OSX:
|
||||||
self.base_options.append('b_lundef')
|
self.base_options.append('b_lundef')
|
||||||
self.base_options.append('b_asneeded')
|
self.base_options.append('b_asneeded')
|
||||||
|
@ -2439,6 +2444,9 @@ class ClangCompiler:
|
||||||
return [] # On Window and OS X, pic is always on.
|
return [] # On Window and OS X, pic is always on.
|
||||||
return ['-fPIC']
|
return ['-fPIC']
|
||||||
|
|
||||||
|
def get_colorout_args(self, colortype):
|
||||||
|
return clang_color_args[colortype][:]
|
||||||
|
|
||||||
def get_buildtype_args(self, buildtype):
|
def get_buildtype_args(self, buildtype):
|
||||||
return gnulike_buildtype_args[buildtype]
|
return gnulike_buildtype_args[buildtype]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue