mirror of https://gitlab.com/ita1024/waf.git
Enable gccdeps for clang too
This commit is contained in:
parent
bbf26e0e12
commit
e8ae9c1a59
|
@ -17,23 +17,24 @@ lock = threading.Lock()
|
||||||
preprocessor_flag = '-MD'
|
preprocessor_flag = '-MD'
|
||||||
|
|
||||||
# Third-party tools are allowed to add extra names in here with append()
|
# Third-party tools are allowed to add extra names in here with append()
|
||||||
supported_compilers = ['gcc', 'icc']
|
supported_compilers = ['gcc', 'icc', 'clang']
|
||||||
|
|
||||||
@feature('c')
|
@feature('c')
|
||||||
@before_method('process_source')
|
@before_method('process_source')
|
||||||
def add_mmd_cc(self):
|
def add_mmd_cc(self):
|
||||||
if self.env.CC_NAME in supported_compilers and self.env.get_flat('CFLAGS').find(preprocessor_flag) < 0:
|
if self.env.CC_NAME in supported_compilers and self.env.get_flat('CFLAGS').find(preprocessor_flag) < 0:
|
||||||
self.env.append_value('CFLAGS', [preprocessor_flag])
|
self.env.append_value('CFLAGS', [preprocessor_flag])
|
||||||
|
self.env.HAS_GCCDEPS = 1
|
||||||
|
|
||||||
@feature('cxx')
|
@feature('cxx')
|
||||||
@before_method('process_source')
|
@before_method('process_source')
|
||||||
def add_mmd_cxx(self):
|
def add_mmd_cxx(self):
|
||||||
if self.env.CXX_NAME in supported_compilers and self.env.get_flat('CXXFLAGS').find(preprocessor_flag) < 0:
|
if self.env.CXX_NAME in supported_compilers and self.env.get_flat('CXXFLAGS').find(preprocessor_flag) < 0:
|
||||||
self.env.append_value('CXXFLAGS', [preprocessor_flag])
|
self.env.append_value('CXXFLAGS', [preprocessor_flag])
|
||||||
|
self.env.HAS_GCCDEPS = 1
|
||||||
|
|
||||||
def scan(self):
|
def scan(self):
|
||||||
"the scanner does not do anything initially"
|
if not self.env.HAS_GCCDEPS:
|
||||||
if self.env.CC_NAME not in supported_compilers:
|
|
||||||
return self.no_gccdeps_scan()
|
return self.no_gccdeps_scan()
|
||||||
nodes = self.generator.bld.node_deps.get(self.uid(), [])
|
nodes = self.generator.bld.node_deps.get(self.uid(), [])
|
||||||
names = []
|
names = []
|
||||||
|
|
Loading…
Reference in New Issue