From 3bd51b0bb11e4e3ff0c3b8b8c97e9c30093e1de5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bence=20Sz=C3=A9pk=C3=BAti?= Date: Fri, 7 May 2021 15:10:39 +0200 Subject: [PATCH] Improve MSVC detection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Bence Szépkúti --- scripts/mbedtls_dev/c_build_helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/mbedtls_dev/c_build_helper.py b/scripts/mbedtls_dev/c_build_helper.py index ddef10fbe..e9e65c30a 100644 --- a/scripts/mbedtls_dev/c_build_helper.py +++ b/scripts/mbedtls_dev/c_build_helper.py @@ -128,7 +128,7 @@ def get_c_expression_values( ) c_file.close() cc = os.getenv('CC', 'cc') - cc_is_msvc = ('\\' + cc).lower().endswith('\\cl.exe') + cc_is_msvc = os.path.split(cc)[1].lower() in ('cl', 'cl.exe') cmd = [cc] cmd += ['-I' + dir for dir in include_path] # MSVC has deprecated using -o to specify the output file.