File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ function(set_compiler_flags target)
2222 if (NOT MSVC )
2323 set_gcc_flags()
2424 target_compile_options (${target} PRIVATE "${AWS_COMPILER_FLAGS} " )
25- string (REPLACE ";" " " _TMP "${AWS_COMPILER_FLAGS } " )
25+ string (REPLACE ";" " " _TMP "${AWS_PUBLIC_COMPILER_FLAGS } " )
2626 set (PKG_CONFIG_CFLAGS "${_TMP} " CACHE INTERNAL "C++ compiler flags which affect the ABI" )
2727 endif ()
2828endfunction ()
@@ -36,17 +36,26 @@ endfunction()
3636
3737
3838macro (set_gcc_flags)
39- list (APPEND AWS_COMPILER_FLAGS "-fno-exceptions" "-std=c++${CPP_STANDARD} " )
39+ # Internal flags - only for SDK compilation
40+ list (APPEND AWS_COMPILER_FLAGS "-std=c++${CPP_STANDARD} " )
41+
42+ # Public flags - needed by downstream projects for ABI compatibility
43+ list (APPEND AWS_COMPILER_FLAGS "-fno-exceptions" )
44+ list (APPEND AWS_PUBLIC_COMPILER_FLAGS "-fno-exceptions" )
45+
4046 if (COMPILER_IS_MINGW)
4147 list (APPEND AWS_COMPILER_FLAGS -D__USE_MINGW_ANSI_STDIO=1)
48+ list (APPEND AWS_PUBLIC_COMPILER_FLAGS -D__USE_MINGW_ANSI_STDIO=1)
4249 endif ()
4350
4451 if (NOT BUILD_SHARED_LIBS )
4552 list (APPEND AWS_COMPILER_FLAGS "-fPIC" )
53+ list (APPEND AWS_PUBLIC_COMPILER_FLAGS "-fPIC" )
4654 endif ()
4755
4856 if (NOT ENABLE_RTTI)
4957 list (APPEND AWS_COMPILER_FLAGS "-fno-rtti" )
58+ list (APPEND AWS_PUBLIC_COMPILER_FLAGS "-fno-rtti" )
5059 endif ()
5160
5261 if (MINIMIZE_SIZE AND COMPILER_GCC)
You can’t perform that action at this time.
0 commit comments