diff options
-rwxr-xr-x | configure.py | 16 | ||||
-rw-r--r-- | src/build-data/makefile/gmake_fuzzers.in | 2 | ||||
-rw-r--r-- | src/build-data/makefile/header.in | 7 |
3 files changed, 15 insertions, 10 deletions
diff --git a/configure.py b/configure.py index 49d2b2ce2..4040f895c 100755 --- a/configure.py +++ b/configure.py @@ -1206,10 +1206,11 @@ class CompilerInfo(InfoObject): # pylint: disable=too-many-instance-attributes return (' '.join(gen_flags())).strip() + def cc_lang_flags(self, options): + return self.lang_flags + def cc_compile_flags(self, options): def gen_flags(): - yield self.lang_flags - if options.with_debug_info: yield self.debug_info_flags @@ -1628,12 +1629,14 @@ class CmakeGenerator(object): fd.write('option(ENABLED_OPTIONAL_WARINIGS "If enabled more strict warning policy will be used" OFF)\n') fd.write('option(ENABLED_LTO "If enabled link time optimization will be used" OFF)\n\n') - fd.write('set(COMPILER_FEATURES_RELEASE %s %s)\n' - % (self._cc.cc_compile_flags(self._options_release), + fd.write('set(COMPILER_FEATURES_RELEASE %s %s %s)\n' + % (self._cc.cc_lang_flags(self._options_release), + self._cc.cc_compile_flags(self._options_release), self._cc.mach_abi_link_flags(self._options_release))) - fd.write('set(COMPILER_FEATURES_DEBUG %s %s)\n' - % (self._cc.cc_compile_flags(self._options_debug), + fd.write('set(COMPILER_FEATURES_DEBUG %s %s %s)\n' + % (self._cc.cc_lang_flags(self._options_debug), + self._cc.cc_compile_flags(self._options_debug), self._cc.mach_abi_link_flags(self._options_debug))) fd.write('set(COMPILER_FEATURES $<$<NOT:$<CONFIG:DEBUG>>:${COMPILER_FEATURES_RELEASE}>' @@ -2018,6 +2021,7 @@ def create_template_vars(source_paths, build_config, options, modules, cc, arch, 'cxx_abi_flags': cc.mach_abi_link_flags(options), 'linker': cc.linker_name or '$(CXX)', + 'cc_lang_flags': cc.cc_lang_flags(options), 'cc_compile_flags': cc.cc_compile_flags(options), 'cc_warning_flags': cc.cc_warning_flags(options), diff --git a/src/build-data/makefile/gmake_fuzzers.in b/src/build-data/makefile/gmake_fuzzers.in index 62f7cdd29..61acdad4d 100644 --- a/src/build-data/makefile/gmake_fuzzers.in +++ b/src/build-data/makefile/gmake_fuzzers.in @@ -3,7 +3,7 @@ FUZZER_LINK_CMD = %{fuzzer_link_cmd} FUZZER_LINKS_TO = %{link_to_botan} $(LIB_LINKS_TO) %{fuzzer_libs} -FUZZER_FLAGS = $(CXXFLAGS) $(WARN_FLAGS) +FUZZER_FLAGS = $(LANG_FLAGS) $(CXXFLAGS) $(WARN_FLAGS) %{fuzzer_build_cmds} diff --git a/src/build-data/makefile/header.in b/src/build-data/makefile/header.in index 6757abbad..9929bc4ba 100644 --- a/src/build-data/makefile/header.in +++ b/src/build-data/makefile/header.in @@ -4,6 +4,7 @@ LINKER = %{linker} PYTHON_EXE = %{python_exe} +LANG_FLAGS = %{cc_lang_flags} CXXFLAGS = %{cc_compile_flags} WARN_FLAGS = %{cc_warning_flags} SO_OBJ_FLAGS = %{shared_flags} @@ -16,9 +17,9 @@ LIB_LINKS_TO = %{link_to} CLI_LINKS_TO = %{link_to_botan} $(LIB_LINKS_TO) TEST_LINKS_TO = %{link_to_botan} $(LIB_LINKS_TO) -LIB_FLAGS = $(SO_OBJ_FLAGS) $(CXXFLAGS) $(WARN_FLAGS) -CLI_FLAGS = $(CXXFLAGS) $(WARN_FLAGS) -TEST_FLAGS = $(CXXFLAGS) $(WARN_FLAGS) +LIB_FLAGS = $(SO_OBJ_FLAGS) $(LANG_FLAGS) $(CXXFLAGS) $(WARN_FLAGS) +CLI_FLAGS = $(LANG_FLAGS) $(CXXFLAGS) $(WARN_FLAGS) +TEST_FLAGS = $(LANG_FLAGS) $(CXXFLAGS) $(WARN_FLAGS) SCRIPTS_DIR = %{scripts_dir} INSTALLED_LIB_DIR = %{prefix}/%{libdir} |