[NFC][Py Reformat] Reformat python files in llvm
[llvm-project.git] / llvm / utils / gn / secondary / compiler-rt / gen_version_script.gni
blobe981c8bdf4a5d7e2466e950c6350f5dd49c1e4b9
1 import("//compiler-rt/target.gni")
3 template("gen_version_script") {
4   if (current_os != "mac" && current_os != "win") {
5     action(target_name) {
6       script = "//compiler-rt/lib/sanitizer_common/scripts/gen_dynamic_list.py"
7       sources = [ invoker.extra ]
8       deps = invoker.libs
9       outputs = [ invoker.output ]
10       args = [
11         "--version-list",
12         "--extra",
13         rebase_path(invoker.extra, root_build_dir),
14       ]
15       foreach(lib_name, invoker.lib_names) {
16         args += [ rebase_path(
17                 "$crt_current_out_dir/libclang_rt.$lib_name$crt_current_target_suffix.a",
18                 root_build_dir) ]
19       }
20       args += [
21         "--nm-executable",
22         "nm",
23         "-o",
24         rebase_path(invoker.output, root_build_dir),
25       ]
26     }
27   } else {
28     source_set(target_name) {
29     }
30     not_needed(invoker,
31                [
32                  "extra",
33                  "lib_names",
34                  "libs",
35                  "output",
36                ])
37   }