File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -149,19 +149,19 @@ endif()
149
149
# they can be properly gc'd. -s: strip symbol. -fno-exceptions -fno-rtti:
150
150
# disables exceptions and runtime type.
151
151
set (CMAKE_CXX_FLAGS_RELEASE
152
- "-ffunction-sections -fdata-sections -fno-exceptions -fno-rtti"
152
+ "-ffunction-sections -fdata-sections -fno-exceptions -fno-rtti ${CMAKE_CXX_FLAGS_RELEASE} "
153
153
)
154
154
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" )
155
155
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s" )
156
156
endif ()
157
157
158
158
option (OPTIMIZE_SIZE "Build executorch runtime optimizing for binary size" OFF )
159
159
if (OPTIMIZE_SIZE)
160
- # -Os: Optimize for size
161
- set (CMAKE_CXX_FLAGS_RELEASE "-Os ${CMAKE_CXX_FLAGS_RELEASE} " )
160
+ # -Os: Optimize for size.
161
+ set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Os " )
162
162
else ()
163
163
# -O2: Moderate opt.
164
- set (CMAKE_CXX_FLAGS_RELEASE "-O2 ${CMAKE_CXX_FLAGS_RELEASE} " )
164
+ set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 " )
165
165
endif ()
166
166
167
167
set (CMAKE_CXX_FLAGS_DEBUG "-O0 -g" )
You can’t perform that action at this time.
0 commit comments