| OLD | NEW |
| 1 # -*- python -*- | 1 # -*- python -*- |
| 2 # Copyright 2008 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # be found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 | 6 |
| 7 Import('env') | 7 Import('env') |
| 8 | 8 |
| 9 # TODO(robertm): get rid of this if possible | 9 # TODO(robertm): get rid of this if possible |
| 10 env.Append(CCFLAGS=['-fno-strict-aliasing']) | 10 env.Append(CCFLAGS=['-fno-strict-aliasing']) |
| 11 | 11 |
| 12 # This library is linked into irt.nexe (see src/untrusted/irt/). |
| 13 # All IRT code must avoid direct use of the TLS ABI register, which |
| 14 # is reserved for user TLS. Instead, ensure all TLS accesses use a |
| 15 # call to __nacl_read_tp, which the IRT code overrides to segregate |
| 16 # IRT-private TLS from user TLS. |
| 17 if not env.Bit('bitcode'): |
| 18 env.Append(CCFLAGS=['-mtls-use-call']) |
| 19 |
| 12 | 20 |
| 13 # NOTE: keep this sync'ed with build.scons | 21 # NOTE: keep this sync'ed with build.scons |
| 14 trusted_untrusted_shared = [ | 22 trusted_untrusted_shared = [ |
| 15 'invoke.c', | 23 'invoke.c', |
| 16 'module_init_fini.c', | 24 'module_init_fini.c', |
| 17 'nacl_srpc.c', | 25 'nacl_srpc.c', |
| 18 'nacl_srpc_message.c', | 26 'nacl_srpc_message.c', |
| 19 'rpc_serialize.c', | 27 'rpc_serialize.c', |
| 20 'rpc_service.c', | 28 'rpc_service.c', |
| 21 'rpc_server_loop.c', | 29 'rpc_server_loop.c', |
| 22 'utility.c', | 30 'utility.c', |
| 23 ] | 31 ] |
| 24 | 32 |
| 25 # NOTE: these files maybe candidates for a separate library | 33 # NOTE: these files maybe candidates for a separate library |
| 26 untrusted_only = [ | 34 untrusted_only = [ |
| 27 'accept.c', | 35 'accept.c', |
| 28 'accept_threaded.c'] | 36 'accept_threaded.c'] |
| 29 | 37 |
| 30 env.ComponentLibrary('libsrpc', | 38 env.ComponentLibrary('libsrpc', |
| 31 trusted_untrusted_shared + untrusted_only) | 39 trusted_untrusted_shared + untrusted_only) |
| 32 | 40 |
| 33 | 41 |
| 34 env.AddLibraryToSdk(['libsrpc']) | 42 env.AddLibraryToSdk(['libsrpc']) |
| 35 header_install = env.AddHeaderToSdk(['nacl_srpc.h']) | 43 header_install = env.AddHeaderToSdk(['nacl_srpc.h']) |
| 36 env.Requires('libsrpc', header_install) | 44 env.Requires('libsrpc', header_install) |
| OLD | NEW |