aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRisan <risan@google.com>2018-01-23 02:22:50 +0900
committerRisan <risan@google.com>2018-01-23 02:33:59 +0900
commit0ea99099aca4428fee146a3f8d869d687e2c72ed (patch)
tree7cc51dd053ab5f4527a3b7b3d877b3a1779e562c
parentd3b0199c8314c0eb7df422731833077efce9521d (diff)
downloadlibmojo-0ea99099aca4428fee146a3f8d869d687e2c72ed.tar.gz
[libmojo] Creates empty shared cc and h for Darwin
This is a hack to unbreak Darwin targets, since for some reason mojo doesn't generate shared files for Darwin. Bug: 27569341 Test: Compiled on master (somehow AOSP is currently broken) Change-Id: I1f08baf1880cb334b99f4842b058362b3eee9256
-rwxr-xr-xsoong/mojom_source_generator.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/soong/mojom_source_generator.sh b/soong/mojom_source_generator.sh
index 66b684c..c14a689 100755
--- a/soong/mojom_source_generator.sh
+++ b/soong/mojom_source_generator.sh
@@ -93,6 +93,13 @@ for file in "${files[@]}"; do
--typemap="${typemap}" --bytecode_path="${bytecode_path}" \
--generators=${generators} "${file}"
if [[ "${generators}" =~ .*c++.* ]] ; then
+ # TODO(risan): These are HACKS, remove it. It creates shared
+ # sources and headers that are for some reason not generated by
+ # darwin targets. Should consider to write go plugins so we don't
+ # need to explicitly list generated mojom output.
+ touch "${output_dir}/${rel_path}-shared.h"
+ touch "${output_dir}/${rel_path}-shared-internal.h"
+ touch "${output_dir}/${rel_path}-shared.cc"
"${mojom_bindings_generator}" generate -o "${output_dir}" \
--generate_non_variant_code "${args[@]}" --typemap="${typemap}" \
--bytecode_path="${bytecode_path}" --generators=${generators} \