[Service][VD] Enable file extension resolver for ESM type
[platform/framework/web/wrtjs.git] / BUILD.gn
1 toolchain("gcc") {
2   lib_switch = "-l"
3   lib_dir_switch = "-L"
4
5   tool("cc") {
6     depfile = "{{output}}.d"
7     command = "gcc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} -c {{source}} -o {{output}}"
8     depsformat = "gcc"
9     outputs = [ "{{target_out_dir}}/{{source_name_part}}.o" ]
10   }
11   tool("cxx") {
12     depfile = "{{output}}.d"
13     command = "c++ -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} -c {{source}} -o {{output}}"
14     depsformat = "gcc"
15     description = "CXX {{output}}"
16     outputs = [ "{{target_out_dir}}/{{source_name_part}}.o" ]
17   }
18   tool("link") {
19     exename = "{{target_output_name}}{{output_extension}}"
20     outfile = "{{output_dir}}/$exename"
21     default_output_dir = "{{root_out_dir}}"
22     command = "g++ {{ldflags}} -o \"$outfile\" {{inputs}} {{libs}}"
23     description = "LINK $outfile"
24     outputs = [ outfile ]
25   }
26   tool("stamp") {
27     command = "touch {{output}}"
28     description = "STAMP {{output}}"
29   }
30   tool("solink") {
31     soname = "{{target_output_name}}{{output_extension}}"
32     rpath = "-Wl,-soname,$soname"
33     command = "g++ -shared {{ldflags}} {{inputs}} {{solibs}} {{libs}} $rpath -o {{output}}"
34     outputs = [
35       "{{root_out_dir}}/$soname",
36     ]
37     output_prefix = "lib"
38     default_output_extension = ".so"
39     description = "link {{output}}"
40   }
41 }
42
43 group("wrt_group") {
44   deps = [
45     "//loader:wrt-loader",
46     "//wrt_feature/nmt_service:nmt",
47     "//wrt_feature/category_service:category",
48   ]
49 }