OLD | NEW |
1 # -*- python -*- | 1 # -*- python -*- |
2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 Import('env') | 6 Import('env') |
7 | 7 |
8 # (elijahtaylor): Removing so braced groups will work for GC syscall wrapping. | 8 # (elijahtaylor): Removing so braced groups will work for GC syscall wrapping. |
9 env.FilterOut(CCFLAGS=['-pedantic']) | 9 env.FilterOut(CCFLAGS=['-pedantic']) |
10 | 10 |
11 valgrind = env.ComponentObject( | 11 valgrind = env.ComponentObject( |
12 'valgrind_annotations.o', | 12 'valgrind_annotations.o', |
13 '${MAIN_DIR}/src/untrusted/valgrind/dynamic_annotations.c') | 13 '${MAIN_DIR}/src/untrusted/valgrind/dynamic_annotations.c') |
14 | 14 |
15 nc_objs = [env.ComponentObject(module, module + '.c') | 15 nc_objs = [env.ComponentObject(module, module + '.c') |
16 for module in [ | 16 for module in [ |
17 'nc_thread', | 17 'nc_thread', |
18 'nc_mutex', | 18 'nc_mutex', |
19 'nc_condvar', | 19 'nc_condvar', |
20 'nc_semaphore', | 20 'nc_semaphore', |
21 'nc_token', | 21 'nc_token', |
22 ] | 22 ] |
23 ] + [valgrind] | 23 ] + [valgrind] |
24 | 24 |
25 # The public library relies on the IRT for crucial system services. | 25 # The public library relies on the IRT for crucial system services. |
26 libpthread = env.ComponentLibrary('libpthread', nc_objs + ['nc_init_irt.c']) | 26 libpthread = env.NaClSdkLibrary( |
| 27 'libpthread', |
| 28 nc_objs + ['nc_init_irt.c'], |
| 29 # only enable shared versions of this library in the shared newlib case |
| 30 no_shared_lib=not env.Bit('pnacl_shared_newlib')) |
27 env.AddLibraryToSdk(libpthread) | 31 env.AddLibraryToSdk(libpthread) |
28 | 32 |
29 # The private library rolls in those IRT components. | 33 # The private library rolls in those IRT components. |
30 nc_private_objs = nc_objs + ['nc_init_private.c'] + [ | 34 nc_private_objs = nc_objs + ['nc_init_private.c'] + [ |
31 env.ComponentObject( | 35 env.ComponentObject( |
32 'irt_%s' % interface, | 36 'irt_%s' % interface, |
33 '${MAIN_DIR}/src/untrusted/irt/irt_%s.c' % interface) | 37 '${MAIN_DIR}/src/untrusted/irt/irt_%s.c' % interface) |
34 for interface in ['mutex', 'cond', 'sem', 'blockhook'] | 38 for interface in ['mutex', 'cond', 'sem', 'blockhook'] |
35 ] | 39 ] |
36 | 40 |
(...skipping 14 matching lines...) Expand all Loading... |
51 # installed, we ensure that they are in place before they're used. | 55 # installed, we ensure that they are in place before they're used. |
52 for compiler in ['${CC}', '${CXX}']: | 56 for compiler in ['${CC}', '${CXX}']: |
53 # TODO(mcgrathr): This can't be the best way! Ideally we'd just use | 57 # TODO(mcgrathr): This can't be the best way! Ideally we'd just use |
54 # '${CC}' directly in env.Depends and that should be fine for scons. | 58 # '${CC}' directly in env.Depends and that should be fine for scons. |
55 # But sometimes '${CC}' is not just '.../gcc', it's '.../gcc -m32'. | 59 # But sometimes '${CC}' is not just '.../gcc', it's '.../gcc -m32'. |
56 compiler = env.subst(compiler).split()[0] | 60 compiler = env.subst(compiler).split()[0] |
57 env.Depends(env.WhereIs(compiler), n) | 61 env.Depends(env.WhereIs(compiler), n) |
58 else: | 62 else: |
59 n = [] | 63 n = [] |
60 env.Alias('install_libpthread', n) | 64 env.Alias('install_libpthread', n) |
OLD | NEW |