From: Anatol Belski Date: Mon, 3 Apr 2017 13:29:56 +0000 (+0200) Subject: add existence check for clang lib dir and improve on x86 X-Git-Tag: php-7.2.0alpha1~166 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6ab2c558f1862194c6dd4b1ed7f8ce63474349ae;p=php add existence check for clang lib dir and improve on x86 --- diff --git a/win32/build/confutils.js b/win32/build/confutils.js index 2c603b3541..3724878758 100644 --- a/win32/build/confutils.js +++ b/win32/build/confutils.js @@ -3388,11 +3388,23 @@ function get_clang_lib_dir() ERROR("Faled to determine clang lib path"); } - /* FIXME existence check, etc. */ if (X64) { ret = PROGRAM_FILES + "\\LLVM\\lib\\clang\\" + ver + "\\lib"; + if (!FSO.FolderExists(ret)) { + ret = null; + } } else { ret = PROGRAM_FILESx86 + "\\LLVM\\lib\\clang\\" + ver + "\\lib"; + if (!FSO.FolderExists(ret)) { + ret = PROGRAM_FILES + "\\LLVM\\lib\\clang\\" + ver + "\\lib"; + if (!FSO.FolderExists(ret)) { + ret = null; + } + } + } + + if (null == ret) { + ERROR("Invalid clang lib path encountered"); } return ret;