Ignore implicit -c before -E
Soong is passing an implicit -c when it tries to compile the .mm
file, but we're overriding that with -E. The new clang-r547379
diagnoses the unused -c argument, so suppress the diagnostic.
clang++: error: argument unused during compilation: '-c' [-Werror,-Wunused-command-line-argument]
Bug: http://b/379133546
Test: m MODULES-IN-packages-modules-Virtualization-guest-vmbase_example
Change-Id: I8584247437bf5213fca25eba9d8881b06a0e2cfb
diff --git a/guest/vmbase_example/Android.bp b/guest/vmbase_example/Android.bp
index e5dfc2a..30d72bd 100644
--- a/guest/vmbase_example/Android.bp
+++ b/guest/vmbase_example/Android.bp
@@ -40,6 +40,9 @@
"-E",
"-P",
"-xassembler-with-cpp", // allow C preprocessor directives
+ // Soong passes an implicit -c before -E. Suppress the warning about -c
+ // being unused.
+ "-Wno-unused-command-line-argument",
],
srcs: [":vmbase_image.ld.S.mm"],
visibility: ["//visibility:private"],