Enable IPO only for Release build. (#1261)
This commit is contained in:
@@ -149,7 +149,7 @@ if(BUILD_SHARED_LIBS)
|
|||||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||||
endif()
|
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
|
# Don't use LTO for iOS since it causes the following error
|
||||||
# error: unable to find any architecture information in the binary
|
# error: unable to find any architecture information in the binary
|
||||||
# at '/Users/fangjun/open-source/sherpa-onnx/build-ios/build/os64/sherpa-onnx.a':
|
# at '/Users/fangjun/open-source/sherpa-onnx/build-ios/build/os64/sherpa-onnx.a':
|
||||||
|
|||||||
Reference in New Issue
Block a user