Author: flackr Date: Thu Apr 16 04:18:12 2015 New Revision: 235083 URL: http://llvm.org/viewvc/llvm-project?rev=235083&view=rev Log: Append to CFLAGS_EXTRAS and LD_EXTRAS when building cmdline.
When building the command-line for compilations during tests, append to CFLAGS_EXTRAS and LD_EXTRAS to preserve switches set by the environment (i.e. for cross compiling to test on another platform). Test Plan: TestCPP11EnumTypes.py passes testing from macosx -> linux remotely with cross compiling args in CFLAGS_EXTRAS and LD_EXTRAS. Differential Revision: http://reviews.llvm.org/D8942 Modified: lldb/trunk/test/plugins/builder_base.py Modified: lldb/trunk/test/plugins/builder_base.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/plugins/builder_base.py?rev=235083&r1=235082&r2=235083&view=diff ============================================================================== --- lldb/trunk/test/plugins/builder_base.py (original) +++ lldb/trunk/test/plugins/builder_base.py Thu Apr 16 04:18:12 2015 @@ -79,7 +79,13 @@ def getCmdLine(d): if not d: return "" pattern = '%s="%s"' if "win32" in sys.platform else "%s='%s'" - cmdline = " ".join([pattern % (k, v) for k, v in d.items()]) + + def setOrAppendVariable(k, v): + append_vars = ["CFLAGS_EXTRAS", "LD_EXTRAS"] + if k in append_vars and os.environ.has_key(k): + v = os.environ[k] + " " + v + return pattern % (k, v) + cmdline = " ".join([setOrAppendVariable(k, v) for k, v in d.items()]) return cmdline _______________________________________________ lldb-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
