diff --git a/scripts/cargo2android.py b/scripts/cargo2android.py index 62bd38d64..38a816ee3 100755 --- a/scripts/cargo2android.py +++ b/scripts/cargo2android.py @@ -59,6 +59,7 @@ import argparse import os import os.path import re +import sys RENAME_MAP = { # This map includes all changes to the default rust library module @@ -71,7 +72,7 @@ RENAME_MAP = { } # Header added to all generated Android.bp files. -ANDROID_BP_HEADER = '// This file is generated by cargo2android.py.\n' +ANDROID_BP_HEADER = '// This file is generated by cargo2android.py {args}.\n' CARGO_OUT = 'cargo.out' # Name of file to keep cargo build -v output. @@ -882,7 +883,7 @@ class Runner(object): if name not in self.bp_files: self.bp_files.add(name) with open(name, 'w') as outf: - outf.write(ANDROID_BP_HEADER) + outf.write(ANDROID_BP_HEADER.format(args=' '.join(sys.argv[1:]))) def claim_module_name(self, prefix, owner, counter): """Return prefix if not owned yet, otherwise, prefix+str(counter)."""