aboutsummaryrefslogtreecommitdiff
path: root/utilities
diff options
context:
space:
mode:
authorEthan Jackson <ethan@nicira.com>2013-07-26 17:06:15 -0700
committerEthan Jackson <ethan@nicira.com>2013-07-29 14:13:07 -0700
commit47e501e1721a8fd4a54a172eb210d4cd04f257a5 (patch)
tree3e164946f147d41348e853084b8f5ff224865a32 /utilities
parentedfe54d09eec09dfa0323b96eabac31f0a16cd9a (diff)
ovs-dev.py: Add support for clang builds.
Signed-off-by: Ethan Jackson <ethan@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'utilities')
-rwxr-xr-xutilities/ovs-dev.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/utilities/ovs-dev.py b/utilities/ovs-dev.py
index f3a1ba9c..c10ca7db 100755
--- a/utilities/ovs-dev.py
+++ b/utilities/ovs-dev.py
@@ -52,6 +52,9 @@ def uname():
def conf():
tag()
+ if options.clang:
+ ENV["CC"] = "clang"
+
configure = ["./configure", "--prefix=" + ROOT, "--localstatedir=" + ROOT,
"--with-logdir=%s/log" % ROOT, "--with-rundir=%s/run" % ROOT,
"--with-linux=/lib/modules/%s/build" % uname(),
@@ -75,7 +78,11 @@ def make(args=""):
make = "make -s -j 8 " + args
try:
_sh("cgcc", "--version", capture=True)
- make += " C=1"
+ # XXX: For some reason the clang build doesn't place nicely with
+ # sparse. At some point this needs to be figured out and this check
+ # removed.
+ if not options.clang:
+ make += " C=1"
except OSError:
pass
_sh(make)
@@ -275,6 +282,8 @@ def main():
help="run ovs-vswitchd under gdb")
group.add_option("--valgrind", dest="valgrind", action="store_true",
help="run ovs-vswitchd under valgrind")
+ group.add_option("--clang", dest="clang", action="store_true",
+ help="build ovs-vswitchd with clang")
parser.add_option_group(group)
options, args = parser.parse_args()