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

Side by Side Diff: third_party/widevine/cdm/BUILD.gn

Issue 2792743002: Use Stub CDM for building libwidevinecdmadapter.so (Closed)
Patch Set: Created 3 years, 8 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/chrome_build.gni") 5 import("//build/config/chrome_build.gni")
6 import("//build/config/features.gni") 6 import("//build/config/features.gni")
7 import("//chrome/process_version_rc_template.gni") 7 import("//chrome/process_version_rc_template.gni")
8 import("//media/cdm/ppapi/cdm_paths.gni") 8 import("//media/cdm/ppapi/cdm_paths.gni")
9 import("//media/cdm/ppapi/ppapi_cdm_adapter.gni") 9 import("//media/cdm/ppapi/ppapi_cdm_adapter.gni")
10 import("//ppapi/features/features.gni") 10 import("//ppapi/features/features.gni")
11 import("//third_party/widevine/cdm/widevine.gni") 11 import("//third_party/widevine/cdm/widevine.gni")
12 12
13 widevine_arch = current_cpu 13 widevine_arch = current_cpu
14 if (widevine_arch == "x86") { 14 if (widevine_arch == "x86") {
15 widevine_arch = "ia32" 15 widevine_arch = "ia32"
16 } 16 }
17 17
18 widevine_cdm_binary_files = [] 18 widevine_cdm_binary_files = []
19 widevine_cdm_manifest_file = [] 19 widevine_cdm_manifest_file = []
20 20
21 if (is_android) { 21 if (is_android) {
22 # Always available on Android regardless of branding. 22 # Always available on Android regardless of branding.
23 widevine_cdm_version_h_file = "android/widevine_cdm_version.h" 23 widevine_cdm_version_h_file = "android/widevine_cdm_version.h"
24 } else if (is_chrome_branded) { 24 } else if (is_chrome_branded) {
25 if (is_chromeos) { 25 if (is_chromeos) {
26 # TODO(hmchen): Revert this change and the other in is_linux after the
27 # libwidevinecdm.so issue is fixed.
xhwang 2017/04/01 00:56:41 Please file a bug and add bug number here for trac
28 enable_widevine = true
26 widevine_cdm_version_h_file = 29 widevine_cdm_version_h_file =
27 "chromeos/$widevine_arch/widevine_cdm_version.h" 30 "chromeos/$widevine_arch/widevine_cdm_version.h"
28 widevine_cdm_binary_files = [ "chromeos/$widevine_arch/libwidevinecdm.so" ]
29 } else if (is_linux) { 31 } else if (is_linux) {
32 enable_widevine = true
30 widevine_cdm_version_h_file = "linux/$widevine_arch/widevine_cdm_version.h" 33 widevine_cdm_version_h_file = "linux/$widevine_arch/widevine_cdm_version.h"
31 widevine_cdm_binary_files = [ "linux/$widevine_arch/libwidevinecdm.so" ]
32 } else if (is_win) { 34 } else if (is_win) {
33 widevine_cdm_version_h_file = "win/$widevine_arch/widevine_cdm_version.h" 35 widevine_cdm_version_h_file = "win/$widevine_arch/widevine_cdm_version.h"
34 widevine_cdm_binary_files = [ 36 widevine_cdm_binary_files = [
35 "win/$widevine_arch/widevinecdm.dll", 37 "win/$widevine_arch/widevinecdm.dll",
36 "win/$widevine_arch/widevinecdm.dll.lib", 38 "win/$widevine_arch/widevinecdm.dll.lib",
37 "win/$widevine_arch/widevinecdm.dll.sig", 39 "win/$widevine_arch/widevinecdm.dll.sig",
38 ] 40 ]
39 widevine_cdm_manifest_file = [ "win/$widevine_arch/manifest.json" ] 41 widevine_cdm_manifest_file = [ "win/$widevine_arch/manifest.json" ]
40 } else if (is_mac) { 42 } else if (is_mac) {
41 widevine_cdm_version_h_file = "mac/$widevine_arch/widevine_cdm_version.h" 43 widevine_cdm_version_h_file = "mac/$widevine_arch/widevine_cdm_version.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 "widevine_cdm_common.h", 77 "widevine_cdm_common.h",
76 ] 78 ]
77 79
78 public_deps = [ 80 public_deps = [
79 ":version_h", # Forward permission to use version header. 81 ":version_h", # Forward permission to use version header.
80 "//media:media_features", 82 "//media:media_features",
81 "//ppapi/features", 83 "//ppapi/features",
82 ] 84 ]
83 } 85 }
84 86
87 copy("copy_widevinecdm") {
88 if (is_linux) {
89 widevine_cdm_binary_files = [ "linux/$widevine_arch/libwidevinecdm.so" ]
90 } else if (is_chromeos) {
91 widevine_cdm_binary_files = [ "chromeos/$widevine_arch/libwidevinecdm.so" ]
92 }
93 sources = widevine_cdm_binary_files
94 outputs = [
95 "$root_out_dir/$widevine_cdm_path/{{source_file_part}}",
96 ]
97 }
98
85 if (widevine_cdm_binary_files != []) { 99 if (widevine_cdm_binary_files != []) {
86 copy("widevinecdm") { 100 copy("widevinecdm") {
87 sources = widevine_cdm_binary_files 101 sources = widevine_cdm_binary_files
88 outputs = [ 102 outputs = [
89 "$root_out_dir/$widevine_cdm_path/{{source_file_part}}", 103 "$root_out_dir/$widevine_cdm_path/{{source_file_part}}",
90 ] 104 ]
91 105
92 # TODO(jrummell) 106 # TODO(jrummell)
93 # 'COPY_PHASE_STRIP': 'NO', 107 # 'COPY_PHASE_STRIP': 'NO',
94 } 108 }
95 } else if (enable_widevine && enable_pepper_cdms) { 109 } else if (enable_widevine && enable_pepper_cdms) {
96 assert(!is_chrome_branded, "Branded Chrome should have binary files to copy.") 110 if (!is_linux && !is_chromeos) {
111 assert(!is_chrome_branded, "Branded Chrome should have binary files to copy. ")
112 }
97 assert(!is_android, "Android should not have enable_pepper_cdms.") 113 assert(!is_android, "Android should not have enable_pepper_cdms.")
98 shared_library("widevinecdm") { 114 shared_library("widevinecdm") {
99 output_dir = "$root_out_dir/$widevine_cdm_path" 115 output_dir = "$root_out_dir/$widevine_cdm_path/stub_cdm"
100 sources = [ 116 sources = [
101 "//media/cdm/stub/stub_cdm.cc", 117 "//media/cdm/stub/stub_cdm.cc",
102 "//media/cdm/stub/stub_cdm.h", 118 "//media/cdm/stub/stub_cdm.h",
103 ] 119 ]
104 120
105 defines = [ "CDM_IMPLEMENTATION" ] 121 defines = [ "CDM_IMPLEMENTATION" ]
106 122
107 deps = [ 123 deps = [
108 ":version_h", 124 ":version_h",
125 ":copy_widevinecdm",
109 "//base", 126 "//base",
110 "//build/config/sanitizers:deps", 127 "//build/config/sanitizers:deps",
111 ] 128 ]
112 129
130 public_deps = [ ":copy_widevinecdm" ]
131
113 if (is_mac) { 132 if (is_mac) {
114 ldflags = [ 133 ldflags = [
115 # Not to strip important symbols by -Wl,-dead_strip. 134 # Not to strip important symbols by -Wl,-dead_strip.
116 "-Wl,-exported_symbol,_PPP_GetInterface", 135 "-Wl,-exported_symbol,_PPP_GetInterface",
117 "-Wl,-exported_symbol,_PPP_InitializeModule", 136 "-Wl,-exported_symbol,_PPP_InitializeModule",
118 "-Wl,-exported_symbol,_PPP_ShutdownModule", 137 "-Wl,-exported_symbol,_PPP_ShutdownModule",
119 ] 138 ]
120 #TODO(jrummell) Mac: 'DYLIB_INSTALL_NAME_BASE': '@loader_path', 139 #TODO(jrummell) Mac: 'DYLIB_INSTALL_NAME_BASE': '@loader_path',
121 } else if (is_posix && !is_mac) { 140 } else if (is_posix && !is_mac) {
122 cflags = [ "-fvisibility=hidden" ] 141 cflags = [ "-fvisibility=hidden" ]
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 ":widevinecdm", 179 ":widevinecdm",
161 ":widevinecdmadapter_resources", 180 ":widevinecdmadapter_resources",
162 ] 181 ]
163 data_deps = [ 182 data_deps = [
164 ":widevine_cdm_manifest", 183 ":widevine_cdm_manifest",
165 ":widevinecdm", 184 ":widevinecdm",
166 ] 185 ]
167 186
168 if (is_linux) { 187 if (is_linux) {
169 ldflags = 188 ldflags =
170 [ rebase_path("$root_out_dir/$widevine_cdm_path/libwidevinecdm.so", 189 [ rebase_path("$root_out_dir/$widevine_cdm_path/stub_cdm/libwidevinecd m.so",
171 root_build_dir) ] 190 root_build_dir) ]
172 } else if (is_win) { 191 } else if (is_win) {
173 ldflags = 192 ldflags =
174 [ rebase_path("$root_out_dir/$widevine_cdm_path/widevinecdm.dll.lib", 193 [ rebase_path("$root_out_dir/$widevine_cdm_path/widevinecdm.dll.lib",
175 root_build_dir) ] 194 root_build_dir) ]
176 } else if (is_mac) { 195 } else if (is_mac) {
177 ldflags = 196 ldflags =
178 [ rebase_path("$root_out_dir/$widevine_cdm_path/libwidevinecdm.dylib", 197 [ rebase_path("$root_out_dir/$widevine_cdm_path/libwidevinecdm.dylib",
179 root_build_dir) ] 198 root_build_dir) ]
180 } 199 }
(...skipping 23 matching lines...) Expand all
204 "../scripts/signer.py", 223 "../scripts/signer.py",
205 ] 224 ]
206 outputs = [ 225 outputs = [
207 "$root_out_dir/installer/widevine/{{source_file_part}}", 226 "$root_out_dir/installer/widevine/{{source_file_part}}",
208 ] 227 ]
209 } 228 }
210 } else { 229 } else {
211 group("widevine_signature_scripts") { 230 group("widevine_signature_scripts") {
212 } 231 }
213 } 232 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698