about summary refs log tree commit diff stats
path: root/build2
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2018-03-22 21:52:35 -0700
committerKartik K. Agaram <vc@akkartik.com>2018-03-22 21:52:35 -0700
commit34514ae8a6635915143e0a7fd1e523eb51b4a91d (patch)
tree1ba0bc4629b2c211967858eee019c8c2d8ac265c /build2
parent6b1bd1ffadac8e6250600501ab9f872530d1da1e (diff)
downloadmu-34514ae8a6635915143e0a7fd1e523eb51b4a91d.tar.gz
4233 - no real difference between -O2 or -O3
Neither in compile time, nor in the performance of the generated code.

(Triggered by https://developers.redhat.com/blog/2018/03/21/compiler-and-linker-flags-gcc)
Diffstat (limited to 'build2')
-rwxr-xr-xbuild24
1 files changed, 2 insertions, 2 deletions
diff --git a/build2 b/build2
index beb536df..2d4703df 100755
--- a/build2
+++ b/build2
@@ -12,7 +12,7 @@ set -e  # stop immediately on error
 #   $ CFLAGS=-g ./build2
 test "$CXX" || export CXX=c++
 test "$CC" || export CC=cc
-test "$CFLAGS" || export CFLAGS="-g -O3"
+test "$CFLAGS" || export CFLAGS="-g -O2"
 export CFLAGS="$CFLAGS -Wall -Wextra -ftrapv -fno-strict-aliasing"
 
 # Outline:
@@ -113,7 +113,7 @@ older_than mu.cc $LAYERS enumerate/enumerate tangle/tangle && {
 }
 
 older_than cleave/cleave cleave/cleave.cc && {
-  $CXX -O3 -Wall -Wextra -fno-strict-aliasing cleave/cleave.cc -o cleave/cleave
+  $CXX $CFLAGS cleave/cleave.cc -o cleave/cleave
   rm -rf .build
 }