[Lldb-commits] [PATCH] D61713: [lldb] build.py: fix behavior when passing --compiler=/path/to/compiler
Jorge Gorbe Moya via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed May 8 19:25:24 PDT 2019
jgorbe created this revision.
jgorbe added reviewers: labath, zturner.
Herald added a subscriber: teemperor.
Herald added a project: LLDB.
All the other paths in the find_toolchain function return a tuple (detected_toolchain_type, compiler_path), but when the parameter to `--compiler` is not one of the predefined names it only returns the detected toolchain type, which causes an error when trying to unpack the result.
This patch changes it to return also the compiler path passed as a parameter.
Repository:
rLLDB LLDB
https://reviews.llvm.org/D61713
Files:
lldb/lit/helper/build.py
Index: lldb/lit/helper/build.py
===================================================================
--- lldb/lit/helper/build.py
+++ lldb/lit/helper/build.py
@@ -207,16 +207,16 @@
file = os.path.basename(compiler)
name, ext = os.path.splitext(file)
if file.lower() == 'cl.exe':
- return 'msvc'
+ return ('msvc', compiler)
if name == 'clang-cl':
- return 'clang-cl'
+ return ('clang-cl', compiler)
if name.startswith('clang'):
- return 'clang'
+ return ('clang', compiler)
if name.startswith('gcc') or name.startswith('g++'):
- return 'gcc'
+ return ('gcc', compiler)
if name == 'cc' or name == 'c++':
- return 'generic'
- return 'unknown'
+ return ('generic', compiler)
+ return ('unknown', compiler)
class Builder(object):
def __init__(self, toolchain_type, args, obj_ext):
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61713.198756.patch
Type: text/x-patch
Size: 894 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190509/cbea3d01/attachment.bin>
More information about the lldb-commits
mailing list