summaryrefslogtreecommitdiffstats
path: root/lldb/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/scripts')
-rw-r--r--lldb/scripts/Python/finishSwigPythonLLDB.py4
-rw-r--r--lldb/scripts/finishSwigWrapperClasses.py9
-rw-r--r--lldb/scripts/utilsArgsParse.py4
3 files changed, 12 insertions, 5 deletions
diff --git a/lldb/scripts/Python/finishSwigPythonLLDB.py b/lldb/scripts/Python/finishSwigPythonLLDB.py
index 91e3a41f9ed..ff6a1318a19 100644
--- a/lldb/scripts/Python/finishSwigPythonLLDB.py
+++ b/lldb/scripts/Python/finishSwigPythonLLDB.py
@@ -821,7 +821,9 @@ def main(vDictArgs):
bOk, strMsg = create_symlinks(
vDictArgs, strFrameworkPythonDir, strLldbLibDir)
- if bOk:
+ bUseSystemSix = "--useSystemSix" in vDictArgs
+
+ if not bUseSystemSix and bOk:
bOk, strMsg = copy_six(vDictArgs, strFrameworkPythonDir)
if bOk:
diff --git a/lldb/scripts/finishSwigWrapperClasses.py b/lldb/scripts/finishSwigWrapperClasses.py
index 4607624e14b..4d08b86e9e4 100644
--- a/lldb/scripts/finishSwigWrapperClasses.py
+++ b/lldb/scripts/finishSwigWrapperClasses.py
@@ -81,6 +81,7 @@ Args: -h (optional) Print help information on this program.\n\
created for a Windows build.\n\
--argsFile= The args are read from a file instead of the\n\
command line. Other command line args are ignored.\n\
+ --useSystemSix Use system six.py version.\n\
\n\
Usage:\n\
finishSwigWrapperClasses.py --srcRoot=ADirPath --targetDir=ADirPath\n\
@@ -178,7 +179,8 @@ def validate_arguments(vArgv):
"prefix=",
"cmakeBuildConfiguration=",
"lldbLibDir=",
- "argsFile"]
+ "argsFile",
+ "useSystemSix"]
dictArgReq = {"-h": "o", # o = optional, m = mandatory
"-d": "o",
"-m": "o",
@@ -188,7 +190,8 @@ def validate_arguments(vArgv):
"--prefix": "o",
"--cmakeBuildConfiguration": "o",
"--lldbLibDir": "o",
- "--argsFile": "o"}
+ "--argsFile": "o",
+ "--useSystemSix": "o"}
# Check for mandatory parameters
nResult, dictArgs, strMsg = utilsArgsParse.parse(vArgv, strListArgs,
@@ -376,9 +379,11 @@ def main(vArgv):
(optional) "lib" by default.
--argsFile= The args are read from a file instead of the
command line. Other command line args are ignored.
+ --useSystemSix Use system six.py version.
Usage:
finishSwigWrapperClasses.py --srcRoot=ADirPath --targetDir=ADirPath
--cfgBldDir=ADirPath --prefix=ADirPath --lldbLibDir=ADirPath -m -d
+ --useSystemSix
Results: 0 Success
-1 Error - invalid parameters passed.
diff --git a/lldb/scripts/utilsArgsParse.py b/lldb/scripts/utilsArgsParse.py
index 4486661863b..fadf4b49831 100644
--- a/lldb/scripts/utilsArgsParse.py
+++ b/lldb/scripts/utilsArgsParse.py
@@ -113,12 +113,12 @@ def parse(vArgv, vstrListArgs, vListLongArgs, vDictArgReq, vstrHelpInfo):
break
if match == 0:
for arg in vListLongArgs:
- argg = "--" + arg[:arg.__len__() - 1]
+ argg = "--" + arg.rstrip('=')
if opt == argg:
if "m" == vDictArgReq[opt]:
countMandatoryOpts = countMandatoryOpts + 1
dictArgs[opt] = val
- if val.__len__() == 0:
+ if arg[-1:] == '=' and val.__len__() == 0:
bFoundNoInputValue = True
break
OpenPOWER on IntegriCloud