• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1import("//build/test.gni")
2
3ohos_static_library("libtest") {
4  include_dirs = [ "." ]
5
6  sources = [
7    "fdfill.c",
8    "memfill.c",
9    "mtest.c",
10    "path.c",
11    "print.c",
12    "rand.c",
13    "runtest.c",
14    "setrlim.c",
15    "utf8.c",
16    "vmfill.c",
17  ]
18
19  cflags_c = [
20    "-pipe",
21    "-std=c99",
22    "-D_POSIX_C_SOURCE=200809L",
23    "-Wall",
24    "-Wno-unused",
25    "-Wno-unused-function",
26    "-Wno-missing-braces",
27    "-Wno-overflow",
28    "-Wno-unknown-pragmas",
29    "-Wno-unsupported-floating-point-opt",
30    "-fno-builtin",
31    "-frounding-math",
32    "-Werror=implicit-function-declaration",
33    "-Werror=implicit-int",
34    "-Werror=pointer-sign",
35    "-Werror=pointer-arith",
36    "-g",
37    "-D_FILE_OFFSET_BITS=64",
38  ]
39
40  output_name = "libtest"
41}
42
43ohos_executable("runtest") {
44  sources = [ "runtest.c" ]
45
46  configs = [ ":config_runtest" ]
47  deps = [ ":libtest" ]
48  subsystem_name = "musl"
49  part_name = "libc-test"
50}
51
52config("config_runtest") {
53  include_dirs = [ "." ]
54
55  cflags_c = [
56    "-pipe",
57    "-std=c99",
58    "-D_POSIX_C_SOURCE=200809L",
59    "-Wall",
60    "-Wno-unused",
61    "-Wno-unused-function",
62    "-Wno-missing-braces",
63    "-Wno-overflow",
64    "-Wno-unknown-pragmas",
65    "-Wno-unsupported-floating-point-opt",
66    "-fno-builtin",
67    "-frounding-math",
68    "-Werror=implicit-function-declaration",
69    "-Werror=implicit-int",
70    "-Werror=pointer-sign",
71    "-Werror=pointer-arith",
72    "-Wno-error=unused-function",
73    "-g",
74    "-D_FILE_OFFSET_BITS=64",
75  ]
76
77  ldflags = [ "-nostdlib" ]
78
79  libs = [ "//${target_out_dir}/libtest.a" ]
80}
81