aboutsummaryrefslogtreecommitdiffstats
path: root/build/plugins/linker_script.py
diff options
context:
space:
mode:
authoralexv-smirnov <alex@ydb.tech>2023-06-13 11:05:01 +0300
committeralexv-smirnov <alex@ydb.tech>2023-06-13 11:05:01 +0300
commitbf0f13dd39ee3e65092ba3572bb5b1fcd125dcd0 (patch)
tree1d1df72c0541a59a81439842f46d95396d3e7189 /build/plugins/linker_script.py
parent8bfdfa9a9bd19bddbc58d888e180fbd1218681be (diff)
downloadydb-bf0f13dd39ee3e65092ba3572bb5b1fcd125dcd0.tar.gz
add ymake export to ydb
Diffstat (limited to 'build/plugins/linker_script.py')
-rw-r--r--build/plugins/linker_script.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/build/plugins/linker_script.py b/build/plugins/linker_script.py
new file mode 100644
index 0000000000..a5432884c1
--- /dev/null
+++ b/build/plugins/linker_script.py
@@ -0,0 +1,12 @@
+def onlinker_script(unit, *args):
+ """
+ @usage: LINKER_SCRIPT(Files...)
+
+ Specify files to be used as a linker script
+ """
+ for arg in args:
+ if not arg.endswith(".ld") and not arg.endswith(".ld.in"):
+ unit.message(['error', "Invalid linker script extension: {}".format(arg)])
+ return
+
+ unit.onglobal_srcs(list(args))