Signed-off-by: Ethan Jackson <et...@nicira.com> --- utilities/ovs-dev.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/utilities/ovs-dev.py b/utilities/ovs-dev.py index f3a1ba9..c10ca7d 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() -- 1.7.9.5 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev