From 8388359b36391b418658a2a637e075b2753ed717 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 2 Mar 2016 00:25:36 +0200 Subject: [PATCH] Fix invalid detecting of compiler type // Resolve #550 --- HISTORY.rst | 2 ++ platformio/builder/tools/piomisc.py | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 8490f6e615..2842404406 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -27,6 +27,8 @@ PlatformIO 2.0 * Fixed issue with Project Generator when optional build flags were passed using system environment variables: `PLATFORMIO_BUILD_FLAGS `__ or `PLATFORMIO_BUILD_SRC_FLAGS `__ +* Fixed invalid detecting of compiler type + (`issue #550 `_) 2.8.4 (2016-02-17) diff --git a/platformio/builder/tools/piomisc.py b/platformio/builder/tools/piomisc.py index dad73d1606..e080a2e0c2 100644 --- a/platformio/builder/tools/piomisc.py +++ b/platformio/builder/tools/piomisc.py @@ -256,9 +256,10 @@ def GetCompilerType(env): if result['returncode'] != 0: return None output = "".join([result['out'], result['err']]).lower() - for type_ in ("clang", "gcc"): - if type_ in output: - return type_ + if "clang" in output and "LLVM" in output: + return "clang" + elif "gcc" in output: + return "gcc" return None