diff options
| author | Zachary Turner <zturner@google.com> | 2018-11-19 16:47:06 +0000 |
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2018-11-19 16:47:06 +0000 |
| commit | 47066bd5f711b04328ffef45d9db38c51b0c9705 (patch) | |
| tree | 2e3419fc932e0c8eab489d6c8ed950e9fbb35a05 | |
| parent | cba522d62b97ab4c1d9114f3d00eeb38443e60cf (diff) | |
| download | bcm5719-llvm-47066bd5f711b04328ffef45d9db38c51b0c9705.tar.gz bcm5719-llvm-47066bd5f711b04328ffef45d9db38c51b0c9705.zip | |
[lit] On Windows, don't error if MSVC is not in PATH.
We had some logic backwards, and as a result if MSVC was not found
in PATH we would throw a string concatenation exception.
llvm-svn: 347224
| -rw-r--r-- | lldb/lit/helper/toolchain.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lldb/lit/helper/toolchain.py b/lldb/lit/helper/toolchain.py index 7aa5d0e8a9b..ce22c25180e 100644 --- a/lldb/lit/helper/toolchain.py +++ b/lldb/lit/helper/toolchain.py @@ -42,12 +42,14 @@ def _use_msvc_substitutions(config): # If running from a Visual Studio Command prompt (e.g. vcvars), this will # detect the include and lib paths, and find cl.exe and link.exe and create # substitutions for each of them that explicitly specify /I and /L paths - cl = '"' + lit.util.which('cl') + '"' - link = '"' + lit.util.which('link') + '"' + cl = lit.util.which('cl') + link = lit.util.which('link') if not cl or not link: return + cl = '"' + cl + '"' + link = '"' + link + '"' includes = os.getenv('INCLUDE', '').split(';') libs = os.getenv('LIB', '').split(';') |

