[PATCH] [zorg] Adding isMSVC parameter to ClangAndLLDBuilder.py
Mike Edwards via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 5 15:19:09 PST 2016
Hi Galina,
Would you please review and commit the following please:
Added an isMSVC parameter to the ClangAndLLDBuilder.py file to deal with a
new MSVC based bot.
This file was originally written with a Linux builder in mind. The
addition of this option and the
minor refactoring will allow MSVC based bots to use this builder script as
well.
Thanks,
Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160205/50ea1afd/attachment.html>
-------------- next part --------------
Index: buildbot/osuosl/master/config/builders.py
===================================================================
--- buildbot/osuosl/master/config/builders.py (revision 259940)
+++ buildbot/osuosl/master/config/builders.py (working copy)
@@ -151,6 +151,7 @@
"-DCLANG_BUILD_EXAMPLES:BOOL=ON",
"-DLLVM_TARGETS_TO_BUILD=X86"],
triple="x86_64-scei-ps4",
+ isMSVC=True,
prefixCommand=None)}, # This is a designated builder, so no need to be nice.
]
Index: zorg/buildbot/builders/ClangAndLLDBuilder.py
===================================================================
--- zorg/buildbot/builders/ClangAndLLDBuilder.py (revision 259940)
+++ zorg/buildbot/builders/ClangAndLLDBuilder.py (working copy)
@@ -17,6 +17,7 @@
extraCompilerOptions=None,
buildWithSanitizerOptions=None,
triple=None,
+ isMSVC=False,
prefixCommand=["nice", "-n", "10"] # For backward compatibility.
):
@@ -82,15 +83,19 @@
env=merged_env))
# Create configuration files with cmake.
+ shellCommand = ["mkdir", "-p", llvm_objdir]
+ if isMSVC:
+ shellCommand = ["mkdir", llvm_objdir]
f.addStep(ShellCommand(name="create-build-dir",
- command=["mkdir", "-p", llvm_objdir],
+ command=shellCommand,
haltOnFailure=True,
description=["create build dir"],
workdir=".",
env=merged_env))
options = ["-Wdocumentation", "-Wno-documentation-deprecated-sync"]
-
+ if isMSVC:
+ options = []
if extraCompilerOptions:
options += extraCompilerOptions
@@ -124,12 +129,16 @@
if extraCmakeOptions:
cmakeCommand += extraCmakeOptions
+ if not isMSVC:
+ cmakeCommand += [
+ "-DCMAKE_C_FLAGS=\"%s\"" % (" ".join(options)),
+ "-DCMAKE_CXX_FLAGS=\"-std=c++11 %s\"" % (" ".join(options)),
+ ]
cmakeCommand += [
- "-DCMAKE_C_FLAGS=\"%s\"" % (" ".join(options)),
- "-DCMAKE_CXX_FLAGS=\"-std=c++11 %s\"" % (" ".join(options)),
"-DLLVM_LIT_ARGS=\"-v\"",
"-G", "Ninja",
- "../%s" % llvm_srcdir]
+ "../%s" % llvm_srcdir
+ ]
# Note: ShellCommand does not pass the params with special symbols right.
# The " ".join is a workaround for this bug.
More information about the llvm-commits
mailing list