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(),
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)
if options.gdb:
cmd = ["gdb", "--args"] + cmd
elif options.valgrind:
- cmd = ["valgrind", "--track-origins=yes"] + cmd
+ cmd = ["valgrind", "--track-origins=yes",
+ "--suppressions=%s/tests/glibc.supp" % OVS_SRC,
+ "--suppressions=%s/tests/openssl.supp" % OVS_SRC] + cmd
else:
cmd = ["sudo"] + cmd
opts = opts + ["-vconsole:off", "--detach"]
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()