提交 09576cf1 authored 作者: Mark Elliot's avatar Mark Elliot 提交者: Ricardo Vieira

Only invoke config.cxx if non-empty

上级 4e5570d6
...@@ -1437,12 +1437,16 @@ add_vm_configvars() ...@@ -1437,12 +1437,16 @@ add_vm_configvars()
add_numba_configvars() add_numba_configvars()
# TODO: `gcc_version_str` is used by other modules.. Should it become an immutable config var? # TODO: `gcc_version_str` is used by other modules.. Should it become an immutable config var?
try: if config.cxx != "":
p_out = output_subprocess_Popen([config.cxx, "-dumpversion"]) try:
gcc_version_str = p_out[0].strip().decode() p_out = output_subprocess_Popen([config.cxx, "-dumpversion"])
except OSError: gcc_version_str = p_out[0].strip().decode()
# Typically means gcc cannot be found. except OSError:
# Typically means gcc cannot be found.
gcc_version_str = "GCC_NOT_FOUND"
else:
gcc_version_str = "GCC_NOT_FOUND" gcc_version_str = "GCC_NOT_FOUND"
# TODO: The caching dir resolution is a procedural mess of helper functions, local variables # TODO: The caching dir resolution is a procedural mess of helper functions, local variables
# and config definitions. And the result is also not particularly pretty.. # and config definitions. And the result is also not particularly pretty..
add_caching_dir_configvars() add_caching_dir_configvars()
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论