OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 if (is_mac) { | 5 if (is_mac) { |
6 import("//build/config/mac/rules.gni") | 6 import("//build/config/mac/rules.gni") |
7 } | 7 } |
8 | 8 |
9 # Declares a PPAPI example target of the correct type for the current platform | 9 # Declares a PPAPI example target of the correct type for the current platform |
10 # and with the right linker flags. | 10 # and with the right linker flags. |
11 template("ppapi_example") { | 11 template("ppapi_example") { |
12 if (!is_mac) { | 12 if (!is_mac) { |
13 shared_library(target_name) { | 13 shared_library(target_name) { |
14 testonly = true | 14 testonly = true |
15 | 15 |
16 if (defined(invoker.output_name)) { | 16 if (defined(invoker.output_name)) { |
17 output_name = invoker.output_name | 17 output_name = invoker.output_name |
18 } | 18 } |
19 | 19 |
20 sources = invoker.sources | 20 sources = invoker.sources |
21 deps = invoker.deps + [ "//build/config:exe_and_shlib_deps" ] | 21 deps = invoker.deps |
22 } | 22 } |
23 } else { | 23 } else { |
24 mac_plugin_bundle(target_name) { | 24 mac_plugin_bundle(target_name) { |
25 testonly = true | 25 testonly = true |
26 | 26 |
27 if (defined(invoker.output_name)) { | 27 if (defined(invoker.output_name)) { |
28 output_name = invoker.output_name | 28 output_name = invoker.output_name |
29 } | 29 } |
30 | 30 |
31 sources = invoker.sources | 31 sources = invoker.sources |
32 deps = invoker.deps | 32 deps = invoker.deps |
33 | 33 |
34 ldflags = [ | 34 ldflags = [ |
35 # Not to strip important symbols by -Wl,-dead_strip. | 35 # Not to strip important symbols by -Wl,-dead_strip. |
36 "-Wl,-exported_symbol,_PPP_GetInterface", | 36 "-Wl,-exported_symbol,_PPP_GetInterface", |
37 "-Wl,-exported_symbol,_PPP_InitializeModule", | 37 "-Wl,-exported_symbol,_PPP_InitializeModule", |
38 "-Wl,-exported_symbol,_PPP_ShutdownModule", | 38 "-Wl,-exported_symbol,_PPP_ShutdownModule", |
39 ] | 39 ] |
40 } | 40 } |
41 } | 41 } |
42 } | 42 } |
OLD | NEW |