diff --git a/musl_template.gni b/musl_template.gni index 68a90f4b8ebfadfdc02737e73fedb2d25a124afa..bbed76b8e6811d564cb94d87d0883fe12dcd02aa 100644 --- a/musl_template.gni +++ b/musl_template.gni @@ -376,6 +376,7 @@ template("musl_libs") { output_dir = "${target_out_dir}/${_libs_out_dir}" deps = [ + ":${abi_prefix}_musl_hook", ":${abi_prefix}_musl_src", ":${abi_prefix}_musl_src_nossp", ] diff --git a/ndk-test/ndk-test/CMakeLists.txt b/ndk-test/ndk-test/CMakeLists.txt index e384e6c985eead335a6aa60c88ab5fc6036deb87..ee52cc5492824f153be17ba9ef3783ec1ca8b2c7 100644 --- a/ndk-test/ndk-test/CMakeLists.txt +++ b/ndk-test/ndk-test/CMakeLists.txt @@ -7,4 +7,5 @@ ADD_SUBDIRECTORY(src/cpphello) ADD_SUBDIRECTORY(src/headers) ADD_SUBDIRECTORY(src/installing) ADD_SUBDIRECTORY(src/shared-library) -ADD_SUBDIRECTORY(src/static-library) \ No newline at end of file +ADD_SUBDIRECTORY(src/static-library) +ADD_SUBDIRECTORY(src/static-free) \ No newline at end of file diff --git a/ndk-test/ndk-test/src/static-free/CMakeLists.txt b/ndk-test/ndk-test/src/static-free/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..81f52d0099f1d3a2cc2be7bc648d626a3781451a --- /dev/null +++ b/ndk-test/ndk-test/src/static-free/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 3.16) + +project(FREE_STATIC) + +add_executable(free free-static.cpp) +target_link_options(free PUBLIC "-static") diff --git a/ndk-test/ndk-test/src/static-free/free-static.cpp b/ndk-test/ndk-test/src/static-free/free-static.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3be0169496e82ff0bc6d12c0a4573c4571a703d0 --- /dev/null +++ b/ndk-test/ndk-test/src/static-free/free-static.cpp @@ -0,0 +1,8 @@ +#include + +int main() { + int *buf; + buf = (int*)malloc(100*sizeof(int)); + free(buf); + return 0; +} \ No newline at end of file