Make RenderLib, Renderer APIs compatible with AEMU.
Bug: 224794781
Test: presubmit
Change-Id: I56d0eb7f424ba1e80bd1e2fad9b941abe0fecb0d
diff --git a/Android.bp b/Android.bp
index c0c7830..7c81606 100644
--- a/Android.bp
+++ b/Android.bp
@@ -75,20 +75,25 @@
cc_defaults {
name: "gfxstream_defaults",
- cflags: ["-D_FILE_OFFSET_BITS=64",
- "-DVIRGL_RENDERER_UNSTABLE_APIS",
- "-Wno-unreachable-code-loop-increment",
- "-Wno-unused-parameter",
- "-Wno-unused-function",
- "-Wno-unused-variable",
- "-Wno-ignored-qualifiers",
- "-Wno-reorder-ctor",
- "-Wno-mismatched-tags",
- "-Wno-missing-field-initializers",
- "-Wno-implicit-fallthrough",
- "-Wno-unused-private-field",
- "-Wno-macro-redefined",
- ],
+ cflags: [
+ // Android build system has some global cflags that we cannot override (e.g.
+ // -Werror=return-type), so -Wno-return-type and -Wno-return-type-c-linkage will not work.
+ // See build/soong/cc/config/global.go
+ "-DUSING_ANDROID_BP",
+ "-D_FILE_OFFSET_BITS=64",
+ "-DVIRGL_RENDERER_UNSTABLE_APIS",
+ "-Wno-unreachable-code-loop-increment",
+ "-Wno-unused-parameter",
+ "-Wno-unused-function",
+ "-Wno-unused-variable",
+ "-Wno-ignored-qualifiers",
+ "-Wno-reorder-ctor",
+ "-Wno-mismatched-tags",
+ "-Wno-missing-field-initializers",
+ "-Wno-implicit-fallthrough",
+ "-Wno-unused-private-field",
+ "-Wno-macro-redefined",
+ ],
header_libs: [
"gfxstream_headers",
"gfxstream_x11_headers",