OLD | NEW |
1 # -*- python -*- | 1 # -*- python -*- |
2 # Copyright 2008, Google Inc. | 2 # Copyright 2008, Google Inc. |
3 # All rights reserved. | 3 # All rights reserved. |
4 # | 4 # |
5 # Redistribution and use in source and binary forms, with or without | 5 # Redistribution and use in source and binary forms, with or without |
6 # modification, are permitted provided that the following conditions are | 6 # modification, are permitted provided that the following conditions are |
7 # met: | 7 # met: |
8 # | 8 # |
9 # * Redistributions of source code must retain the above copyright | 9 # * Redistributions of source code must retain the above copyright |
10 # notice, this list of conditions and the following disclaimer. | 10 # notice, this list of conditions and the following disclaimer. |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 ) | 81 ) |
82 | 82 |
83 if env.Bit('windows'): | 83 if env.Bit('windows'): |
84 env.Append( | 84 env.Append( |
85 CCFLAGS = ['/EHsc',], | 85 CCFLAGS = ['/EHsc',], |
86 CPPDEFINES = ['XP_WIN', 'WIN32', '_WINDOWS'], | 86 CPPDEFINES = ['XP_WIN', 'WIN32', '_WINDOWS'], |
87 ) | 87 ) |
88 env.Tool('atlmfc_vc80') | 88 env.Tool('atlmfc_vc80') |
89 | 89 |
90 # Both the NPAPI and PPAPI plugins depend upon the code that is in the | 90 # Both the NPAPI and PPAPI plugins depend upon the code that is in the |
91 # srpc subdirectory and on a large set of libraries. | 91 # top (plugin) directory and on a large set of libraries. |
92 common_inputs = [ | 92 common_inputs = [ |
93 # TODO: we should put a scons file in src/third_party_mod/nacl_plugin | 93 # TODO: we should put a scons file in src/third_party_mod/nacl_plugin |
94 # which exports a library which is then linked in. | 94 # which exports a library which is then linked in. |
95 # Currently this results inlink time symbol clashes | 95 # Currently this results inlink time symbol clashes |
96 # generic URL-origin / same-domain handling | 96 # generic URL-origin / same-domain handling |
97 'origin.cc', | 97 'origin.cc', |
98 # Portable plugin code | 98 # Portable plugin code |
99 'srpc/browser_interface.cc', | 99 'browser_interface.cc', |
100 'srpc/connected_socket.cc', | 100 'connected_socket.cc', |
101 'srpc/desc_based_handle.cc', | 101 'desc_based_handle.cc', |
102 'srpc/method_map.cc', | 102 'method_map.cc', |
103 'srpc/nexe_arch.cc', | 103 'nexe_arch.cc', |
104 'srpc/plugin.cc', | 104 'plugin.cc', |
105 'srpc/portable_handle.cc', | 105 'portable_handle.cc', |
106 'srpc/scriptable_handle.cc', | 106 'scriptable_handle.cc', |
107 'srpc/service_runtime.cc', | 107 'service_runtime.cc', |
108 'srpc/shared_memory.cc', | 108 'shared_memory.cc', |
109 'srpc/socket_address.cc', | 109 'socket_address.cc', |
110 'srpc/srpc_client.cc', | 110 'srpc_client.cc', |
111 'srpc/srt_socket.cc', | 111 'srt_socket.cc', |
112 'srpc/stream_shm_buffer.cc', | 112 'stream_shm_buffer.cc', |
113 'srpc/string_encoding.cc', | 113 'string_encoding.cc', |
114 'srpc/utility.cc', | 114 'utility.cc', |
115 ] | 115 ] |
116 | 116 |
117 common_objs = env.ComponentObject(common_inputs) | 117 common_objs = env.ComponentObject(common_inputs) |
118 | 118 |
119 # The common libraries are those used by both the NPAPI and PPAPI plugins. | 119 # The common libraries are those used by both the NPAPI and PPAPI plugins. |
120 # They and the NPAPI/PPAPI specific libraries must come before OS libraries, | 120 # They and the NPAPI/PPAPI specific libraries must come before OS libraries, |
121 # because they may generate references that are resolved by the OS libraries. | 121 # because they may generate references that are resolved by the OS libraries. |
122 # E.g., libplatform.a contains references to symbols from libcrypto.so. | 122 # E.g., libplatform.a contains references to symbols from libcrypto.so. |
123 common_libs = [ | 123 common_libs = [ |
124 'nonnacl_util', | 124 'nonnacl_util', |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 nptest_env.AddNodeToTestSuite(node, ['small_tests'], 'run_plugin_unittest') | 241 nptest_env.AddNodeToTestSuite(node, ['small_tests'], 'run_plugin_unittest') |
242 | 242 |
243 | 243 |
244 # This test fails to link in our ARM cross-compile environment because | 244 # This test fails to link in our ARM cross-compile environment because |
245 # the toolchain tarball lacks libraries, specifically libSM.so.6. | 245 # the toolchain tarball lacks libraries, specifically libSM.so.6. |
246 if env['TARGET_ARCHITECTURE'] != 'arm': | 246 if env['TARGET_ARCHITECTURE'] != 'arm': |
247 test_env = env.Clone() | 247 test_env = env.Clone() |
248 test_env.FilterOut(LINKFLAGS=['-bundle']) | 248 test_env.FilterOut(LINKFLAGS=['-bundle']) |
249 string_encoding_test = test_env.ComponentProgram( | 249 string_encoding_test = test_env.ComponentProgram( |
250 'string_encoding_test', | 250 'string_encoding_test', |
251 ['srpc/string_encoding_test.cc', | 251 ['string_encoding_test.cc', |
252 env.ComponentObject('srpc/string_encoding_for_test', | 252 env.ComponentObject('string_encoding_for_test', |
253 'srpc/string_encoding.cc')], | 253 'string_encoding.cc')], |
254 EXTRA_LIBS=['platform', 'gio'] + os_libs) | 254 EXTRA_LIBS=['platform', 'gio'] + os_libs) |
255 node = env.CommandTest('string_encoding_test.out', | 255 node = env.CommandTest('string_encoding_test.out', |
256 command=[string_encoding_test]) | 256 command=[string_encoding_test]) |
257 env.AddNodeToTestSuite(node, ['small_tests'], 'run_string_encoding_test') | 257 env.AddNodeToTestSuite(node, ['small_tests'], 'run_string_encoding_test') |
258 | 258 |
259 | 259 |
260 # The PPAPI (Pepper v2) plugin is used in Chrome. We build a shared library | 260 # The PPAPI (Pepper v2) plugin is used in Chrome. We build a shared library |
261 # with this build script to allow easier build testing. The actual PPAPI | 261 # with this build script to allow easier build testing. The actual PPAPI |
262 # integration uses the same sources, but is part of the Chrome build through | 262 # integration uses the same sources, but is part of the Chrome build through |
263 # gyp. | 263 # gyp. |
(...skipping 18 matching lines...) Expand all Loading... |
282 | 282 |
283 if ppapi_env.Bit('linux') and not ppapi_env.Bit('chrome'): | 283 if ppapi_env.Bit('linux') and not ppapi_env.Bit('chrome'): |
284 ppapi_plugin = ppapi_env.ComponentLibrary(ppNaClPlugin, | 284 ppapi_plugin = ppapi_env.ComponentLibrary(ppNaClPlugin, |
285 common_objs + ppapi_inputs, | 285 common_objs + ppapi_inputs, |
286 no_import_lib=True) | 286 no_import_lib=True) |
287 | 287 |
288 # we need this to build the plugin, so register it here | 288 # we need this to build the plugin, so register it here |
289 ppapi_env.AddPluginPrerequisite([ppapi_plugin[0]]) | 289 ppapi_env.AddPluginPrerequisite([ppapi_plugin[0]]) |
290 | 290 |
291 # TODO(polina,sehr): add a test for the PPAPI plugin. | 291 # TODO(polina,sehr): add a test for the PPAPI plugin. |
OLD | NEW |