未验证 提交 412ca9eb 编写于 作者: O openharmony_ci 提交者: Gitee

!279 修复libc.a中free未定义的问题

Merge pull request !279 from maweiye/master
......@@ -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",
]
......
......@@ -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
cmake_minimum_required(VERSION 3.16)
project(FREE_STATIC)
add_executable(free free-static.cpp)
target_link_options(free PUBLIC "-static")
#include <stdlib.h>
int main() {
int *buf;
buf = (int*)malloc(100*sizeof(int));
free(buf);
return 0;
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册