Skip to content

Commit

Permalink
Enable IPO only for Release build. (#1261)
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj authored Aug 15, 2024
1 parent ca729fa commit 97a6a2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ if(BUILD_SHARED_LIBS)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()

if(BUILD_SHARED_LIBS AND NOT CMAKE_SYSTEM_NAME STREQUAL iOS)
if(BUILD_SHARED_LIBS AND NOT CMAKE_SYSTEM_NAME STREQUAL iOS AND CMAKE_BUILD_TYPE STREQUAL Release)
# Don't use LTO for iOS since it causes the following error
# error: unable to find any architecture information in the binary
# at '/Users/fangjun/open-source/sherpa-onnx/build-ios/build/os64/sherpa-onnx.a':
Expand Down

0 comments on commit 97a6a2a

Please sign in to comment.