[Lldb-commits] [PATCH] D66327: [dotest] Make it possible to forward CCC_OVERRIDE_OPTIONS to Make
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Aug 15 19:04:30 PDT 2019
JDevlieghere created this revision.
JDevlieghere added reviewers: labath, aprantl, davide.
Herald added a project: LLDB.
Setting `CCC_OVERRIDE_OPTIONS ` is a powerful way to change the behavior of the compiler. It's especially convenient for modifying how we build test inferiors. However, this is currently not possible, because we don't forward the environment variable. This patch adds support for this.
Repository:
rLLDB LLDB
https://reviews.llvm.org/D66327
Files:
lldb/packages/Python/lldbsuite/test/plugins/builder_base.py
Index: lldb/packages/Python/lldbsuite/test/plugins/builder_base.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/plugins/builder_base.py
+++ lldb/packages/Python/lldbsuite/test/plugins/builder_base.py
@@ -36,6 +36,16 @@
return os.path.realpath(compiler)
+def getEnv():
+ """Returns the build environment."""
+ env = dict()
+ whitelist = ['PATH', 'CCC_OVERRIDE_OPTIONS']
+ for v in whitelist:
+ if v in os.environ:
+ env[v] = os.environ[v]
+ return env
+
+
def getArchFlag():
"""Returns the flag required to specify the arch"""
compiler = getCompiler()
@@ -127,7 +137,7 @@
def runBuildCommands(commands, sender):
try:
- lldbtest.system(commands, sender=sender)
+ lldbtest.system(commands, sender=sender, env=os.environ.copy())
except subprocess.CalledProcessError as called_process_error:
# Convert to a build-specific error.
# We don't do that in lldbtest.system() since that
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66327.215523.patch
Type: text/x-patch
Size: 1036 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190816/9258b15b/attachment.bin>
More information about the lldb-commits
mailing list