| OLD | NEW |
| 1 # -*- python -*- | 1 # -*- python -*- |
| 2 # Copyright (c) 2011 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 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 env.ComponentLibrary('libpthread', ['nc_thread.c', | 15 env.ComponentLibrary('libpthread', ['nc_thread.c', |
| 16 'nc_mutex.c', | 16 'nc_mutex.c', |
| 17 'nc_condvar.c', | 17 'nc_condvar.c', |
| 18 'nc_semaphore.c', | 18 'nc_semaphore.c', |
| 19 'nc_spinlock.c', | 19 'nc_spinlock.c', |
| 20 'nc_hash.c', | 20 'nc_hash.c', |
| 21 valgrind | 21 valgrind |
| 22 ]) | 22 ]) |
| 23 | 23 |
| 24 env.AddLibraryToSdk(['libpthread']) | 24 env.AddLibraryToSdk(['libpthread']) |
| 25 | 25 |
| 26 dest_dir = ARGUMENTS.get('extra_sdk_include_destination', | 26 # install_libpthread is a no-op under --nacl_glibc, but without it |
| 27 '${NACL_SDK_INCLUDE}') | 27 # installs the header files from this directory into the toolchain. |
| 28 Alias('install_libpthread', | 28 if not env.Bit('nacl_glibc'): |
| 29 # Copy the header file to the include directory. | 29 n = env.AddHeaderToSdk(['pthread.h', 'semaphore.h'], None) |
| 30 [env.Replicate(dest_dir, ['pthread.h', 'semaphore.h' ])]) | 30 else: |
| 31 n = [] |
| 32 env.Alias('install_libpthread', n) |
| OLD | NEW |