env: Do not return empty tool env vars

A compiler or other tool with an empty string as name does not make
sense as it anyway can not be used and causes a failure later in
parse_entry.

Fix #5451
pull/5607/head
Marvin Scholz 6 years ago committed by Jussi Pakkanen
parent 968aee4f18
commit 0bf5c27b64
  1. 4
      mesonbuild/envconfig.py

@ -340,6 +340,10 @@ This is probably wrong, it should always point to the native compiler.''' % evar
command = os.environ.get(evar)
if command is not None:
command = shlex.split(command)
# Do not return empty string entries
if command is not None and len(command) == 0:
return None
return command
class Directories:

Loading…
Cancel
Save