From 9e34da0bf7d321a1efeefb916ad241f4b2e2b9c2 Mon Sep 17 00:00:00 2001 From: bunnie Date: Fri, 20 Feb 2026 23:52:16 +0800 Subject: [PATCH] add autogeneration header to output artifacts --- libs/bio-lib/src/c/clang2rustasm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/bio-lib/src/c/clang2rustasm.py b/libs/bio-lib/src/c/clang2rustasm.py index ef6153f44..9d6d194b3 100644 --- a/libs/bio-lib/src/c/clang2rustasm.py +++ b/libs/bio-lib/src/c/clang2rustasm.py @@ -22,7 +22,7 @@ import argparse import re import sys import os - +from datetime import datetime # ============================================================================ # Register translation: x16-x31 ABI names -> raw xN form @@ -1301,6 +1301,7 @@ def format_output(fn_name, start_label, end_label, converted_lines, data_objects # C-routines that are `static`-free could use `bio_code` and save the alignment # overhead, but the cost of confusing new programmers is not worth the savings # of a few kiB of code space. + parts.append(f"// AUTOGENERATED CODE on {datetime.now().isoformat()} - do not edit directly!\n") parts.append("use bao1x_api::bio_code_aligned;\n") parts.append("#[rustfmt::skip]") parts.append(f"bio_code_aligned!({fn_name}, {start_label}, {end_label},")