diff options
author | Chih-Hung Hsieh <chh@google.com> | 2020-10-21 01:51:27 -0700 |
---|---|---|
committer | Chih-Hung Hsieh <chh@google.com> | 2020-10-25 18:17:19 -0700 |
commit | b3b422d2500290b6459af803c74754dee9355c3a (patch) | |
tree | d08e5f45af0d406ffc08c1e43e5b29ec97d2056a | |
parent | fcfc9e618c6ba5265a91c242fb68343218fd5b61 (diff) | |
download | const_fn-b3b422d2500290b6459af803c74754dee9355c3a.tar.gz |
Add Android.bp with --copy-out flag.
Bug: 169611678
Bug: 171659849
Test: make
Test: tools/external_updater/updater.sh update --refresh --keep-date rust/crates/const_fn
Change-Id: I20c22072515a3b2fcd9f1e6e71ac99d5cf6e8e6a
-rw-r--r-- | Android.bp | 21 | ||||
-rw-r--r-- | out/version.rs | 5 |
2 files changed, 26 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp new file mode 100644 index 0000000..ebe674b --- /dev/null +++ b/Android.bp @@ -0,0 +1,21 @@ +// This file is generated by cargo2android.py --run --copy-out --dependencies. + +genrule { + name: "copy_const_fn_build_out", + srcs: ["out/*"], + cmd: "cp $(in) $(genDir)", + out: ["version.rs"], +} + +rust_proc_macro { + name: "libconst_fn", + crate_name: "const_fn", + srcs: [ + "src/lib.rs", + ":copy_const_fn_build_out", + ], + edition: "2018", + flags: [ + "--cfg const_fn_has_build_script", + ], +} diff --git a/out/version.rs b/out/version.rs new file mode 100644 index 0000000..a24fecb --- /dev/null +++ b/out/version.rs @@ -0,0 +1,5 @@ +Version { + minor: 46, + patch: 0, + nightly: true, +} |