Add cpu-target-features binary
This is a very small executable which is used to determine what CPU
target features are enabled for a given compiler toolchain. These
features are only provided through internal compiler defines, and thus
we have to do a lot of macro shenaningans to get them to display
correctly.
Bug: 354747380
Test: Built for x86_64 cuttlefish, not tested installation
Change-Id: Ic68cd365c41ddd278a856a21796e1645a82fd760
diff --git a/cpu_target_features/Android.bp b/cpu_target_features/Android.bp
new file mode 100644
index 0000000..25f37d1
--- /dev/null
+++ b/cpu_target_features/Android.bp
@@ -0,0 +1,18 @@
+package {
+ default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
+cc_binary {
+ name: "cpu-target-features",
+ srcs: [
+ "main.cpp",
+ ],
+ generated_headers: ["print_target_features.inc"],
+}
+
+genrule {
+ name: "print_target_features.inc",
+ out: ["print_target_features.inc"],
+ tool_files: ["generate_printer.py"],
+ cmd: "$(location generate_printer.py) $(out)",
+}