index 6448bf428b..d95d6f8c40 100644
|
--- a/site_scons/site_tools/ninja.py
|
+++ b/site_scons/site_tools/ninja.py
|
@@ -102,6 +102,17 @@ def _lib_symlink_action_function(_env, node):
|
"implicit": get_dependencies(node),
|
}
|
|
+def _copy_action_function(env, node):
|
+ output_node = get_outputs(node)[0]
|
+ input_node = get_inputs(node)[0]
|
+ return {
|
+ "outputs": [output_node],
|
+ "inputs": [input_node],
|
+ "rule": "CMD",
|
+ "variables": {
|
+ "cmd": f"$COPY {input_node} {output_node}",
|
+ },
|
+ }
|
|
def is_valid_dependent_node(node):
|
"""
|
@@ -254,6 +265,7 @@ class SConsToNinjaTranslator:
|
"installFunc": _install_action_function,
|
"MkdirFunc": _mkdir_action_function,
|
"LibSymlinksActionFunction": _lib_symlink_action_function,
|
+ "Copy": _copy_action_function
|
}
|
|
self.loaded_custom = False
|
@@ -322,6 +334,11 @@ class SConsToNinjaTranslator:
|
handler = self.func_handlers.get(name, None)
|
if handler is not None:
|
return handler(node.env if node.env else self.env, node)
|
+ elif name == "ActionCaller":
|
+ action_to_call = str(action).split('(')[0].strip()
|
+ handler = self.func_handlers.get(action_to_call, None)
|
+ if handler is not None:
|
+ return handler(node.env if node.env else self.env, node)
|
|
raise Exception(
|
"Found unhandled function action {}, "
|