aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfigure.py31
-rw-r--r--src/build-data/cc/clang.txt11
-rw-r--r--src/build-data/cc/ekopath.txt7
-rw-r--r--src/build-data/cc/gcc.txt10
-rw-r--r--src/build-data/cc/hpcc.txt9
-rw-r--r--src/build-data/cc/icc.txt9
-rw-r--r--src/build-data/cc/msvc.txt8
-rw-r--r--src/build-data/cc/pgi.txt4
-rw-r--r--src/build-data/cc/sunstudio.txt9
-rw-r--r--src/build-data/cc/xlc.txt9
10 files changed, 65 insertions, 42 deletions
diff --git a/configure.py b/configure.py
index 2e5accfd3..279bd0e56 100755
--- a/configure.py
+++ b/configure.py
@@ -783,10 +783,12 @@ class CompilerInfo(object):
'add_include_dir_option': '-I',
'add_lib_dir_option': '-L',
'add_lib_option': '-l',
- 'lib_opt_flags': '',
- 'app_opt_flags': '',
- 'debug_flags': '',
- 'no_debug_flags': '',
+ 'compile_flags_release': '',
+ 'compile_flags_debug': '',
+ 'lib_opt_flags_release': '',
+ 'lib_opt_flags_debug': '',
+ 'app_opt_flags_release': '',
+ 'app_opt_flags_debug': '',
'coverage_flags': '',
'sanitizer_flags': '',
'shared_flags': '',
@@ -886,18 +888,27 @@ class CompilerInfo(object):
def opt_flags(self, who, options):
def gen_flags():
if options.build_mode in ['debug', 'coverage']:
- yield self.debug_flags
+ yield self.compile_flags_debug
else:
- yield self.no_debug_flags
+ yield self.compile_flags_release
if options.no_optimizations or options.build_mode == 'coverage':
return
- if who != 'lib':
- yield self.app_opt_flags
+ if who == 'app':
+ if options.build_mode == 'release':
+ yield self.app_opt_flags_release
+ else:
+ yield self.app_opt_flags_debug
return
-
- yield self.lib_opt_flags
+ elif who == 'lib':
+ if options.build_mode == 'release':
+ yield self.lib_opt_flags_release
+ else:
+ yield self.lib_opt_flags_debug
+ return
+ else:
+ raise Exception("Invalid value of parameter 'who'.")
def submodel_fixup(flags, tup):
return tup[0].replace('SUBMODEL', flags.replace(tup[1], ''))
diff --git a/src/build-data/cc/clang.txt b/src/build-data/cc/clang.txt
index 195318291..5921f634c 100644
--- a/src/build-data/cc/clang.txt
+++ b/src/build-data/cc/clang.txt
@@ -13,18 +13,19 @@ lang_flags "-std=c++11 -D_REENTRANT -fstack-protector"
warning_flags "-Wall -Wextra -Wstrict-aliasing -Wstrict-overflow=5 -Wcast-align -Wmissing-declarations -Wpointer-arith -Wcast-qual -Wunreachable-code"
maintainer_warning_flags "-Qunused-arguments -Werror -Wno-error=unused-parameter -Wno-error=unused-variable -Wno-error=unreachable-code"
-makefile_style gmake
+compile_flags_release ""
+compile_flags_debug "-g"
+lib_opt_flags_release "-O3"
+app_opt_flags_release "-O2"
-lib_opt_flags "-O3"
-app_opt_flags "-O2"
shared_flags "-fPIC"
-debug_flags "-g"
-no_debug_flags ""
coverage_flags "--coverage"
visibility_build_flags "-fvisibility=hidden"
visibility_attribute '__attribute__((visibility("default")))'
+makefile_style gmake
+
<so_link_flags>
# The default works for GNU ld and several other Unix linkers
default -> "$(CXX) -shared -fPIC -Wl,-soname,$(SONAME)"
diff --git a/src/build-data/cc/ekopath.txt b/src/build-data/cc/ekopath.txt
index b93a67171..d306d5b11 100644
--- a/src/build-data/cc/ekopath.txt
+++ b/src/build-data/cc/ekopath.txt
@@ -8,15 +8,16 @@ add_include_dir_option -I
add_lib_dir_option -L
add_lib_option -l
-lib_opt_flags "-O3 -OPT:Ofast:alias=disjoint"
-app_opt_flags "-O2"
+compile_flags_debug "-g"
+lib_opt_flags_release "-O3 -OPT:Ofast:alias=disjoint"
+app_opt_flags_release "-O2"
+
lang_flags "-D_REENTRANT -ansi -Wno-long-long"
warning_flags "-W -Wall"
ar_command "pathCC -ar -o"
shared_flags "-fPIC"
-debug_flags -g
makefile_style gmake
diff --git a/src/build-data/cc/gcc.txt b/src/build-data/cc/gcc.txt
index 69d370b26..ef29f7fa4 100644
--- a/src/build-data/cc/gcc.txt
+++ b/src/build-data/cc/gcc.txt
@@ -12,10 +12,14 @@ lang_flags "-std=c++11 -D_REENTRANT"
maintainer_warning_flags "-Wold-style-cast -Werror -Wno-error=old-style-cast -Wno-error=zero-as-null-pointer-constant -Wno-error=unused-parameter -Wno-error=unused-variable -Wno-error=strict-overflow"
warning_flags "-Wall -Wextra -Wstrict-aliasing -Wstrict-overflow=5 -Wcast-align -Wmissing-declarations -Wpointer-arith -Wcast-qual -Wzero-as-null-pointer-constant"
-lib_opt_flags "-O2"
-app_opt_flags "-O2"
+compile_flags_release ""
+compile_flags_debug "-g"
+lib_opt_flags_release "-O2"
+lib_opt_flags_debug "-O2"
+app_opt_flags_release "-O2"
+app_opt_flags_debug "-O2"
+
shared_flags "-fPIC"
-debug_flags "-g"
coverage_flags "--coverage"
#sanitizer_flags "-D_GLIBCXX_DEBUG -fsanitize=address -fsanitize=undefined"
sanitizer_flags "-D_GLIBCXX_DEBUG -fsanitize=address"
diff --git a/src/build-data/cc/hpcc.txt b/src/build-data/cc/hpcc.txt
index e6008abad..518a39346 100644
--- a/src/build-data/cc/hpcc.txt
+++ b/src/build-data/cc/hpcc.txt
@@ -8,10 +8,11 @@ add_include_dir_option -I
add_lib_dir_option -L
add_lib_option -l
-lib_opt_flags "+O2"
-app_opt_flags "+O2"
-debug_flags -g
-no_debug_flags ""
+compile_flags_release ""
+compile_flags_debug "-g"
+lib_opt_flags_release "+O2"
+app_opt_flags_release "+O2"
+
lang_flags "-AA -ext +eh -z"
warning_flags "" # +w
shared_flags "+Z"
diff --git a/src/build-data/cc/icc.txt b/src/build-data/cc/icc.txt
index df447967c..debe25362 100644
--- a/src/build-data/cc/icc.txt
+++ b/src/build-data/cc/icc.txt
@@ -8,10 +8,11 @@ add_include_dir_option -I
add_lib_dir_option -L
add_lib_option -l
-lib_opt_flags "-O2 -ip -unroll"
-app_opt_flags "-O2"
-debug_flags -g
-no_debug_flags "-fomit-frame-pointer"
+compile_flags_release "-fomit-frame-pointer"
+compile_flags_debug "-g"
+lib_opt_flags_release "-O2 -ip -unroll"
+app_opt_flags_release "-O2"
+
lang_flags "-std=c++0x"
warning_flags "-w1"
shared_flags "-fPIC"
diff --git a/src/build-data/cc/msvc.txt b/src/build-data/cc/msvc.txt
index 4529893ac..123c593e6 100644
--- a/src/build-data/cc/msvc.txt
+++ b/src/build-data/cc/msvc.txt
@@ -8,9 +8,11 @@ add_include_dir_option "/I"
add_lib_dir_option -L
add_lib_option ""
-no_debug_flags "/O2"
-debug_flags "/Od /Zi /DDEBUG"
-app_opt_flags "/D_CONSOLE"
+compile_flags_release "/O2"
+compile_flags_debug "/Od /Zi /DDEBUG"
+app_opt_flags_release "/D_CONSOLE"
+app_opt_flags_debug "/D_CONSOLE"
+
lang_flags "/EHs /GR"
warning_flags "/W3 /wd4275 /wd4267"
diff --git a/src/build-data/cc/pgi.txt b/src/build-data/cc/pgi.txt
index 032bbe72f..6b41974e5 100644
--- a/src/build-data/cc/pgi.txt
+++ b/src/build-data/cc/pgi.txt
@@ -8,8 +8,8 @@ add_include_dir_option -I
add_lib_dir_option -L
add_lib_option -l
-lib_opt_flags "-fast -Minline"
-app_opt_flags "-fast"
+lib_opt_flags_release "-fast -Minline"
+app_opt_flags_release "-fast"
shared_flags "-fPIC"
makefile_style gmake
diff --git a/src/build-data/cc/sunstudio.txt b/src/build-data/cc/sunstudio.txt
index cf29b9687..e98e15363 100644
--- a/src/build-data/cc/sunstudio.txt
+++ b/src/build-data/cc/sunstudio.txt
@@ -8,10 +8,11 @@ add_include_dir_option -I
add_lib_dir_option -L
add_lib_option -l
-lib_opt_flags "-xO5"
-app_opt_flags "-xO2"
-debug_flags -g
-no_debug_flags ""
+compile_flags_release ""
+compile_flags_debug "-g"
+lib_opt_flags_release "-xO5"
+app_opt_flags_release "-xO2"
+
shared_flags "-KPIC"
warning_flags "+w -erroff=truncwarn,wnoretvalue"
lang_flags "+p -features=extensions -D__FUNCTION__=__func__"
diff --git a/src/build-data/cc/xlc.txt b/src/build-data/cc/xlc.txt
index bfa67f40f..e1eded5fa 100644
--- a/src/build-data/cc/xlc.txt
+++ b/src/build-data/cc/xlc.txt
@@ -8,11 +8,12 @@ add_include_dir_option -I
add_lib_dir_option -L
add_lib_option -l
-lib_opt_flags "-O2"
-app_opt_flags "-O2"
+compile_flags_release ""
+compile_flags_debug "-g"
+lib_opt_flags_release "-O2"
+app_opt_flags_release "-O2"
+
lang_flags ""
-debug_flags -g
-no_debug_flags ""
makefile_style gmake