diff options
author | Gurucharan Shetty <gshetty@nicira.com> | 2014-08-28 09:25:56 -0700 |
---|---|---|
committer | Gurucharan Shetty <gshetty@nicira.com> | 2014-09-04 18:38:26 -0700 |
commit | b0e1bce5d6528d71605f0d75e47f5f14d4b04f0d (patch) | |
tree | 5e6054141bc2e479d1d46229dce022e2228f3fba /build-aux/cccl | |
parent | 6b846da95a802d4187e3a0ea0b697c196dcc749f (diff) | |
download | openvswitch-b0e1bce5d6528d71605f0d75e47f5f14d4b04f0d.tar.gz |
cccl: Ability to enable compiler optimization.
MSVC has a '-O2' compiler optimization flag which makes code run
fast and is the recommended option for released code. For e.g.,
running "./tests/ovstest.exe test-cmap benchmark 1000000 3 1"
shows a 3x improvement for some cmap micro-benchmarks.
In the Visual Studio world, there is a concept of "release" build
(fast code, harder to debug) and a "debug" build (easier to debug).
The IDE provides this option and the IDE users expect something similar
for command line build.
So this commit, introduces a "--with-debug" configure option for Windows
and does not use '-O2' as a compiler option when specified. This can
be extended further if there are more compiler options that distinguish
a "release" build vs "debug" build.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Saurabh Shah <ssaurabh@vmware.com>
Diffstat (limited to 'build-aux/cccl')
-rw-r--r-- | build-aux/cccl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/build-aux/cccl b/build-aux/cccl index c18629af6..1a06e3878 100644 --- a/build-aux/cccl +++ b/build-aux/cccl @@ -89,6 +89,14 @@ EOF linkopt="$linkopt ${slash}DEBUG" ;; + -O0) + clopt="$clopt ${slash}Ot" + ;; + + -O2) + clopt="$clopt ${slash}O2" + ;; + -L*) path=`echo "$1" | sed 's/-L//'` linkopt="$linkopt ${slash}LIBPATH:$path" |