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

Side by Side Diff: templates/BUILD.gn.template

Issue 2440763002: Fix Android build issues and gRPC LB policy (Closed)
Patch Set: Fix minor typo 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 unified diff | Download patch
OLDNEW
1 %YAML 1.2 1 %YAML 1.2
2 --- | 2 --- |
3 # GRPC Chromium BUILD.gn file. 3 # GRPC Chromium BUILD.gn file.
4 # This file has been automatically generated from a template file. 4 # This file has been automatically generated from a template file.
5 # Please look at the templates directory instead. 5 # Please look at the templates directory instead.
6 # This file can be regenerated from the template by running 6 # This file can be regenerated from the template by running
7 # tools/buildgen/generate_projects.sh 7 # tools/buildgen/generate_projects.sh
8 if (is_android) {
9 import("//build/config/android/config.gni")
10 import("//build/config/android/rules.gni")
11 }
12
8 config("grpc_config") { 13 config("grpc_config") {
9 include_dirs = [ 14 include_dirs = [
10 ".", 15 ".",
11 "include/", 16 "include/",
12 ] 17 ]
13 18
14 defines = [ 19 defines = [
15 "GRPC_USE_PROTO_LITE", 20 "GRPC_USE_PROTO_LITE",
16 # TODO(xyzzyz): the <condition_variable> header in libstdc++-4.6 we're usi ng 21 # TODO(xyzzyz): the <condition_variable> header in libstdc++-4.6 we're usi ng
17 # in Chromium has a bug, which causes a compilation error on Clang. 22 # in Chromium has a bug, which causes a compilation error on Clang.
18 # Therefore, we need to make gRPC not use standard library threading 23 # Therefore, we need to make gRPC not use standard library threading
19 # support. 24 # support.
20 # https://crbug.com/593874 25 # https://crbug.com/593874
21 "GRPC_CXX0X_NO_THREAD", 26 "GRPC_CXX0X_NO_THREAD",
22 ] 27 ]
28
29 cflags_c = [
30 "-std=c99",
31 "-Wimplicit-function-declaration",
32 ]
33
34 if (is_android) {
35 libs = [ "log" ] # For __android_log_write
36 }
23 } 37 }
24 38
25 <%! 39 <%!
26 def get_deps(target_dict): 40 def get_deps(target_dict):
27 deps = [] 41 deps = []
28 if target_dict.get("secure", False): 42 if target_dict.get("secure", False):
29 deps = [ 43 deps = [
30 "//third_party/boringssl", 44 "//third_party/boringssl",
31 ] 45 ]
32 46
(...skipping 20 matching lines...) Expand all
53 deps.append(":%s" % d) 67 deps.append(":%s" % d)
54 return deps 68 return deps
55 69
56 def get_extra_configs(target_dict): 70 def get_extra_configs(target_dict):
57 if target_dict.get("name", "") == "grpc_cpp_plugin": 71 if target_dict.get("name", "") == "grpc_cpp_plugin":
58 return ["//third_party/protobuf:protobuf_config"] 72 return ["//third_party/protobuf:protobuf_config"]
59 return [] 73 return []
60 74
61 def uses_nanopb_or_protofull(f): 75 def uses_nanopb_or_protofull(f):
62 return (f.startswith("third_party/nanopb") 76 return (f.startswith("third_party/nanopb")
63 or "census" in f 77 or "census" in f
xyzzyz 2016/10/21 20:42:49 Can we remove these now?
64 or "grpclb" in f) 78 or "grpclb" in f)
65 79
66 def wanted_lib(lib): 80 def wanted_lib(lib):
67 wanted_libs = ("gpr", "grpc", "grpc_unsecure", "grpc++", "grpc++_unsecure", 81 wanted_libs = ("gpr", "grpc", "grpc_unsecure", "grpc++", "grpc++_unsecure",
68 "grpc_cronet", "grpc_plugin_support") 82 "grpc_cronet", "grpc_plugin_support")
69 return lib.build in ("all", "protoc") and lib.get("name", "") in wanted_libs 83 return lib.build in ("all", "protoc") and lib.get("name", "") in wanted_libs
70 84
71 def wanted_binary(tgt): 85 def wanted_binary(tgt):
72 wanted_binaries = ("grpc_cpp_plugin",) 86 wanted_binaries = ("grpc_cpp_plugin",)
73 return tgt.build == "protoc" and tgt.get("name", "") in wanted_binaries 87 return tgt.build == "protoc" and tgt.get("name", "") in wanted_binaries
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 configs -= [ "//build/config/compiler:chromium_code" ] 168 configs -= [ "//build/config/compiler:chromium_code" ]
155 configs += [ 169 configs += [
156 "//build/config/compiler:no_chromium_code", 170 "//build/config/compiler:no_chromium_code",
157 % for config in get_extra_configs(tgt): 171 % for config in get_extra_configs(tgt):
158 "${config}", 172 "${config}",
159 % endfor 173 % endfor
160 ] 174 ]
161 public_configs = [ ":grpc_config" ] 175 public_configs = [ ":grpc_config" ]
162 } 176 }
163 </%def> 177 </%def>
OLDNEW
« no previous file with comments | « src/core/plugin_registry/grpc_unsecure_plugin_registry.c ('k') | test/core/surface/public_headers_must_be_c89.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698