[PATCH] D17351: [zorg] Addition of extraLitArgs variable to ClangAndLLDBuilder.py
Mike Edwards via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 19 11:51:17 PST 2016
sqlbyme updated this revision to Diff 48539.
http://reviews.llvm.org/D17351
Files:
zorg/buildbot/builders/ClangAndLLDBuilder.py
Index: zorg/buildbot/builders/ClangAndLLDBuilder.py
===================================================================
--- zorg/buildbot/builders/ClangAndLLDBuilder.py
+++ zorg/buildbot/builders/ClangAndLLDBuilder.py
@@ -18,7 +18,8 @@
buildWithSanitizerOptions=None,
triple=None,
isMSVC=False,
- prefixCommand=["nice", "-n", "10"] # For backward compatibility.
+ prefixCommand=["nice", "-n", "10"], # For backward compatibility.
+ extraLitArgs=None
):
llvm_srcdir = "llvm.src"
@@ -100,44 +101,38 @@
if isMSVC:
options = []
if extraCompilerOptions:
+ assert extraCompilerOptions not in ["-DLLVM_LIT_ARGS="], "%s is not allowed to be defined here. PLease use extraLitArgs to pass Lit arguments instead."
options += extraCompilerOptions
-
if buildWithSanitizerOptions:
options += buildWithSanitizerOptions
- # FIXME: This is a temporary workaround till all the slaves will
- # be configured to have C_COMPILER and CXX_COMPILER set locally.
- # Will be rolled back later.
- # cmakeCommand = [
- # "cmake",
- # "-DCMAKE_BUILD_TYPE=Release",
- # "-DLLVM_ENABLE_ASSERTIONS=ON",
- # "-DCMAKE_CXX_FLAGS=\"%s\"" % (" ".join(options)),
- # "-DLLVM_LIT_ARGS=\"-v\"",
- # "-G", "Ninja",
- # "../%s" % llvm_srcdir]
+ lit_args = ["-v"]
+ if extraLitArgs:
+ lit_args += extraLitArgs
+ lit_args_str = "-DLLVM_LIT_ARGS=\"%s\"" % (" ".join(lit_args))
cmakeCommand = [
"cmake",
"-DCMAKE_BUILD_TYPE=Release",
- "-DLLVM_ENABLE_ASSERTIONS=ON"]
+ "-DLLVM_ENABLE_ASSERTIONS=ON"
+ ]
if buildWithSanitizerOptions:
cmakeCommand += [
"-DCMAKE_C_COMPILER=clang",
- "-DCMAKE_CXX_COMPILER=clang++"]
+ "-DCMAKE_CXX_COMPILER=clang++"
+ ]
if triple:
cmakeCommand += [
- "-DLLVM_DEFAULT_TARGET_TRIPLE=%s" % triple]
-
+ "-DLLVM_DEFAULT_TARGET_TRIPLE=%s" % triple
+ ]
if extraCmakeOptions:
cmakeCommand += extraCmakeOptions
-
if not isMSVC:
cmakeCommand += [
"-DCMAKE_C_FLAGS=\"%s\"" % (" ".join(options)),
"-DCMAKE_CXX_FLAGS=\"-std=c++11 %s\"" % (" ".join(options)),
- "-DLLVM_LIT_ARGS=\"-v\"",
]
+ cmakeCommand += lit_args_str
cmakeCommand += [
"-G", "Ninja",
"../%s" % llvm_srcdir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17351.48539.patch
Type: text/x-patch
Size: 2494 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160219/85d75bdb/attachment.bin>
More information about the llvm-commits
mailing list