env2mfile: Not all compilers have env for flags

pull/11561/head
Xavier Claessens 2 years ago committed by Eli Schwartz
parent 82d0d1755d
commit 1ab7d3b28e
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
  1. 4
      mesonbuild/scripts/env2mfile.py

@ -264,7 +264,9 @@ def write_machine_file(infos: MachineInfo, ofilename: str, write_system_info: bo
def detect_language_args_from_envvars(langname: str, envvar_suffix: str = '') -> T.Tuple[T.List[str], T.List[str]]:
ldflags = tuple(shlex.split(os.environ.get('LDFLAGS' + envvar_suffix, '')))
compile_args = shlex.split(os.environ.get(compilers.CFLAGS_MAPPING[langname] + envvar_suffix, ''))
compile_args = []
if langname in compilers.CFLAGS_MAPPING:
compile_args = shlex.split(os.environ.get(compilers.CFLAGS_MAPPING[langname] + envvar_suffix, ''))
if langname in compilers.LANGUAGES_USING_CPPFLAGS:
cppflags = tuple(shlex.split(os.environ.get('CPPFLAGS' + envvar_suffix, '')))
lang_compile_args = list(cppflags) + compile_args

Loading…
Cancel
Save