compilers: Don't use CompilerArgs() for sanity checks

It's only useful to use those when you have to override include dirs
or library paths by appending them from various sources according to
the priority order, or if the compiler args need to be converted from
Unix/GCC-style to native (MSVC, for instance) style.

Sanity checks match neither of these.

Closes https://github.com/mesonbuild/meson/issues/1351
pull/1357/head
Nirbheek Chauhan 8 years ago committed by Jussi Pakkanen
parent e42f366e0b
commit ad8048aac3
  1. 4
      mesonbuild/compilers.py

@ -601,7 +601,7 @@ class Compiler:
self.language)) self.language))
def get_cross_extra_flags(self, environment, *, compile, link): def get_cross_extra_flags(self, environment, *, compile, link):
extra_flags = CompilerArgs(self) extra_flags = []
if self.is_cross and environment: if self.is_cross and environment:
if 'properties' in environment.cross_info.config: if 'properties' in environment.cross_info.config:
lang_args_key = self.language + '_args' lang_args_key = self.language + '_args'
@ -831,7 +831,7 @@ class CCompiler(Compiler):
mlog.debug('Sanity testing ' + self.language + ' compiler:', ' '.join(self.exelist)) mlog.debug('Sanity testing ' + self.language + ' compiler:', ' '.join(self.exelist))
mlog.debug('Is cross compiler: %s.' % str(self.is_cross)) mlog.debug('Is cross compiler: %s.' % str(self.is_cross))
extra_flags = CompilerArgs(self) extra_flags = []
source_name = os.path.join(work_dir, sname) source_name = os.path.join(work_dir, sname)
binname = sname.rsplit('.', 1)[0] binname = sname.rsplit('.', 1)[0]
if self.is_cross: if self.is_cross:

Loading…
Cancel
Save