Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1002)

Unified Diff: templates/BUILD.gn.template

Issue 2471543002: Fix gRPC build failure on Android with Clang. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: templates/BUILD.gn.template
diff --git a/templates/BUILD.gn.template b/templates/BUILD.gn.template
index 71607a21a9d98f44bf8574470a3f4c5c3562467d..55aec520e9c84bf06c673f435a135cda0832c20f 100644
--- a/templates/BUILD.gn.template
+++ b/templates/BUILD.gn.template
@@ -87,6 +87,15 @@
def only_on_host_toolchain(tgt):
return tgt.get("name", "") in ("grpc_plugin_support", "grpc_cpp_plugin")
+
+ def contains_wrap_memcpy(srcs):
+ for src in srcs:
+ if 'wrap_memcpy' in src:
+ return True
+ return False
+
+ def get_wrap_memcpy(srcs):
+ return [s for s in srcs if "wrap_memcpy" in s]
%>
% for lib in libs:
@@ -134,6 +143,17 @@
"${src}",
% endfor
]
+ % if contains_wrap_memcpy(srcs):
+ if (is_android) {
+ # gRPC memcpy wrapping logic isn't Android-friendly.
+ # See https://crbug.com/661171
+ sources -= [
+ % for src in get_wrap_memcpy(srcs):
+ "${src}",
+ % endfor
+ ]
+ }
+ % endif
deps = [
% for dep in get_deps(lib):
"${dep}",
« no previous file with comments | « BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698