aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRisan <risan@google.com>2018-01-20 16:13:25 +0900
committerRisan <risan@google.com>2018-01-26 08:29:44 +0000
commit7db3d20fd6c3c29cc8fc1f9fded774ea84e7cd16 (patch)
tree2910e4f541ede53f1dd6072e5753d6bd3f00243d
parentceaad1adcb0547f40a078d123ecc832c8f5b9aa1 (diff)
downloadlibmojo-7db3d20fd6c3c29cc8fc1f9fded774ea84e7cd16.tar.gz
Allow variable numbers of typemap in mojo generations
As example, device/google/cheets2/camera doesn't add additional typemap and libarcbrigge needs to have multiple typemaps. Bug: 27569341 Test: mmma -j32 external/libmojo (in AOSP branch), mmma -j32 device/google/cheets2/camera/mojo (in master), mmma -j32 vendor/google_arc/libs/libarcbridgeservice (in master). Change-Id: Ifb5e045c7dd8ec658dce7cb688e7ffaa71b837bb
-rwxr-xr-xsoong/mojom_source_generator.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/soong/mojom_source_generator.sh b/soong/mojom_source_generator.sh
index 5420b99..bf78fab 100755
--- a/soong/mojom_source_generator.sh
+++ b/soong/mojom_source_generator.sh
@@ -61,6 +61,7 @@ for arg in "$@"; do
--typemap=*)
typemap="${arg#'--typemap='}"
typemap="$(get_abs_path ${typemap})"
+ args=("${args[@]}" "--typemap=${typemap}")
;;
--bytecode_path=*)
bytecode_path="${arg#'--bytecode_path='}"
@@ -90,11 +91,11 @@ for file in "${files[@]}"; do
mkdir -p "${output_dir}/${rel_dir}"
"${mojom_bindings_generator}" generate -o "${output_dir}" "${args[@]}" \
- --typemap="${typemap}" --bytecode_path="${bytecode_path}" \
+ --bytecode_path="${bytecode_path}" \
--generators=${generators} "${file}"
if [[ "${generators}" =~ .*c\+\+.* ]] ; then
"${mojom_bindings_generator}" generate -o "${output_dir}" \
- --generate_non_variant_code "${args[@]}" --typemap="${typemap}" \
+ --generate_non_variant_code "${args[@]}" \
--bytecode_path="${bytecode_path}" --generators=${generators} \
"${file}"
fi