Skip to content

Commit

Permalink
fix: fix bridge android so build.
Browse files Browse the repository at this point in the history
  • Loading branch information
andycall authored and yuanyan committed Apr 30, 2021
1 parent ccae6de commit 059ffbd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bridge/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ else()
endif()

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

if (${CMAKE_BUILD_TYPE} STREQUAL "release" OR ${CMAKE_BUILD_TYPE} STREQUAL "relwithdebinfo")
set(CMAKE_C_FLAGS -flto)
## http://ptspts.blogspot.com/2013/12/how-to-make-smaller-c-and-c-binaries.html
### remove dynamic_cast and exceptions
target_compile_options(kraken PRIVATE -fno-exceptions -fvisibility=hidden -flto)
target_compile_options(kraken PRIVATE -fno-exceptions -fvisibility=hidden)
else()
### remove dynamic_cast and exceptions
target_compile_options(kraken PRIVATE -fno-exceptions)
Expand Down

0 comments on commit 059ffbd

Please sign in to comment.