Skip to content

Commit 059ffbd

Browse files
andycallyuanyan
authored andcommitted
fix: fix bridge android so build.
1 parent ccae6de commit 059ffbd

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

bridge/CMakeLists.txt

+2-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ else()
1616
endif()
1717

1818
execute_process(
19-
COMMAND bash "-c" "read dart_sdk < <(type -p dart) && echo $\{dart_sdk%/*\}/cache/dart-sdk | xargs"
19+
COMMAND bash "-c" "read dart_sdk < <(type -p dart) && echo $\{dart_sdk%/*\}/cache/dart-sdk/include | xargs"
2020
OUTPUT_VARIABLE DART_SDK
2121
)
2222
string(REGEX REPLACE "\n$" "" DART_SDK "${DART_SDK}")
@@ -201,10 +201,9 @@ target_include_directories(kraken PRIVATE
201201
target_link_libraries(kraken PRIVATE ${BRIDGE_LINK_LIBS})
202202

203203
if (${CMAKE_BUILD_TYPE} STREQUAL "release" OR ${CMAKE_BUILD_TYPE} STREQUAL "relwithdebinfo")
204-
set(CMAKE_C_FLAGS -flto)
205204
## http://ptspts.blogspot.com/2013/12/how-to-make-smaller-c-and-c-binaries.html
206205
### remove dynamic_cast and exceptions
207-
target_compile_options(kraken PRIVATE -fno-exceptions -fvisibility=hidden -flto)
206+
target_compile_options(kraken PRIVATE -fno-exceptions -fvisibility=hidden)
208207
else()
209208
### remove dynamic_cast and exceptions
210209
target_compile_options(kraken PRIVATE -fno-exceptions)

0 commit comments

Comments
 (0)