[Coverage] MCDC: Move findIndependencePairs deferred into MCDCRecord (#121188)
[llvm-project.git] / llvm / utils / gn / build / symlink_or_copy.gni
blob308b570de67445df6a1faa3bec0c99abafcb145e
1 # Creates a symlink (or, on Windows, copies).
2 # Args:
3 #   source: Path to link to.
4 #   output: Where to create the symlink.
5 template("symlink_or_copy") {
6   action(target_name) {
7     forward_variables_from(invoker, [ "deps" ])
9     # Make a stamp file the output to work around
10     # https://github.com/ninja-build/ninja/issues/1186
11     stamp =
12         "$target_gen_dir/" + get_path_info(invoker.output, "file") + ".stamp"
13     outputs = [ stamp ]
14     script = "//llvm/utils/gn/build/symlink_or_copy.py"
15     args = [
16       "--stamp",
17       rebase_path(stamp, root_build_dir),
18       invoker.source,
19       rebase_path(invoker.output, root_build_dir),
20     ]
21   }