Skip to content

Commit

Permalink
ovs-dev.py: Support additional optimization flags.
Browse files Browse the repository at this point in the history
They may or may not make a difference, but there's no reason not to
support passing them.

Signed-off-by: Ethan Jackson <[email protected]>
Acked-by: Daniele Di Proietto <[email protected]>
  • Loading branch information
ejj committed Sep 17, 2014
1 parent 3245c49 commit 1bcf46c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions utilities/ovs-dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def conf():
if options.optimize is None:
options.optimize = 0

cflags += " -O%d" % options.optimize
cflags += " -O%s" % str(options.optimize)

ENV["CFLAGS"] = cflags

Expand Down Expand Up @@ -362,10 +362,13 @@ def main():
help="configure the man documentation install directory")
group.add_option("--with-dpdk", dest="with_dpdk", metavar="DPDK_BUILD",
help="built with dpdk libraries located at DPDK_BUILD");
parser.add_option_group(group)

for i in range(4):
group.add_option("--O%d" % i, dest="optimize", action="store_const",
const=i, help="compile with -O%d" % i)
group = optparse.OptionGroup(parser, "Optimization Flags")
for i in ["s", "g"] + range(4) + ["fast"]:
group.add_option("--O%s" % str(i), dest="optimize",
action="store_const", const=i,
help="compile with -O%s" % str(i))
parser.add_option_group(group)

group = optparse.OptionGroup(parser, "check")
Expand Down

0 comments on commit 1bcf46c

Please sign in to comment.