Committed by
GitHub
Enable IPO only for Release build. (#1261)
正在显示
1 个修改的文件
包含
1 行增加
和
1 行删除
| @@ -149,7 +149,7 @@ if(BUILD_SHARED_LIBS) | @@ -149,7 +149,7 @@ if(BUILD_SHARED_LIBS) | ||
| 149 | set(CMAKE_POSITION_INDEPENDENT_CODE ON) | 149 | set(CMAKE_POSITION_INDEPENDENT_CODE ON) |
| 150 | endif() | 150 | endif() |
| 151 | 151 | ||
| 152 | -if(BUILD_SHARED_LIBS AND NOT CMAKE_SYSTEM_NAME STREQUAL iOS) | 152 | +if(BUILD_SHARED_LIBS AND NOT CMAKE_SYSTEM_NAME STREQUAL iOS AND CMAKE_BUILD_TYPE STREQUAL Release) |
| 153 | # Don't use LTO for iOS since it causes the following error | 153 | # Don't use LTO for iOS since it causes the following error |
| 154 | # error: unable to find any architecture information in the binary | 154 | # error: unable to find any architecture information in the binary |
| 155 | # at '/Users/fangjun/open-source/sherpa-onnx/build-ios/build/os64/sherpa-onnx.a': | 155 | # at '/Users/fangjun/open-source/sherpa-onnx/build-ios/build/os64/sherpa-onnx.a': |
-
请 注册 或 登录 后发表评论