diff options
author | Hidehiko Abe <hidehiko@google.com> | 2018-02-15 11:09:33 +0900 |
---|---|---|
committer | Hidehiko Abe <hidehiko@google.com> | 2018-02-19 13:31:47 +0900 |
commit | c0d6a3235da44dc29ded5c773db7df0170611cbb (patch) | |
tree | f72f6679ce6e841c2613caf596098be9ea63b89f /Android.bp | |
parent | 24af70ee32b234bfcd6c8dd09030b1f8d5f8348e (diff) | |
download | libchrome-c0d6a3235da44dc29ded5c773db7df0170611cbb.tar.gz |
Deal with -Wunused-parameter in libchrome build rule.
So, now we do not need modification in libchrome to workaround
the error.
Bug: 73270448
Test: Build locally. Treehugger.
Change-Id: I38fe79c1e01fd39a4bdd7121bb58b9b6d9a3da89
Diffstat (limited to 'Android.bp')
-rw-r--r-- | Android.bp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/Android.bp b/Android.bp index bf4809e30e..202076beec 100644 --- a/Android.bp +++ b/Android.bp @@ -15,6 +15,18 @@ // Common defaults // ======================================================== +// Using Chrome header files directly could cause -Wunused-parameter errors, +// and this is workaround. Please find the document in include_generator.py +// for details. +gensrcs { + name: "libchrome-include", + cmd: "$(location libchrome_tools/include_generator.py) $(in) $(out)", + tool_files: ["libchrome_tools/include_generator.py"], + export_include_dirs: ["."], + srcs: ["**/*.h"], + output_extension: "h", +} + cc_defaults { name: "libchrome-defaults", // Set clang to "true" to force clang or "false" to force gcc. @@ -24,12 +36,18 @@ cc_defaults { "-Wall", "-Werror", "-Wno-deprecated-declarations", + "-Wno-unused-parameter", ], include_dirs: [ "external/valgrind/include", "external/valgrind", ], - export_include_dirs: ["."], + + // Note: Although the generated header files are exported here, in building + // libchrome, "." has priority (unlike building projects using libchrome), + // so the raw header files are used for them. + generated_headers: ["libchrome-include"], + export_generated_headers: ["libchrome-include"], target: { host: { cflags: [ |