Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # -*- python -*- | 1 # -*- python -*- |
| 2 # Copyright (c) 2012 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 | 6 |
| 7 Import('env') | 7 Import('env') |
| 8 | 8 |
| 9 # NACL_GC_WRAP_SYSCALL uses ({...}) syntax. | 9 # NACL_GC_WRAP_SYSCALL uses ({...}) syntax. |
| 10 env.FilterOut(CCFLAGS=['-pedantic']) | 10 env.FilterOut(CCFLAGS=['-pedantic']) |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 50 'read.c', | 50 'read.c', |
| 51 'rmdir.c', | 51 'rmdir.c', |
| 52 'sbrk.c', | 52 'sbrk.c', |
| 53 'sched_yield.c', | 53 'sched_yield.c', |
| 54 'stat.c', | 54 'stat.c', |
| 55 'sysconf.c', | 55 'sysconf.c', |
| 56 'unlink.c', | 56 'unlink.c', |
| 57 'write.c', | 57 'write.c', |
| 58 ] | 58 ] |
| 59 | 59 |
| 60 SRCS_NEWLIB_STUBS = [ | |
| 61 'stubs/access-stub.c', | |
| 62 'stubs/chmod-stub.c', | |
| 63 'stubs/chown-stub.c', | |
| 64 'stubs/endpwent-stub.c', | |
| 65 'stubs/environ-stub.c', | |
| 66 'stubs/execle-stub.c', | |
| 67 'stubs/execvp-stub.c', | |
| 68 'stubs/execl-stub.c', | |
| 69 'stubs/execv-stub.c', | |
| 70 'stubs/execlp-stub.c', | |
| 71 'stubs/execve-stub.c', | |
| 72 'stubs/_execve-stub.c', | |
| 73 'stubs/fcntl-stub.c', | |
| 74 'stubs/fchdir-stub.c', | |
| 75 'stubs/fchmod-stub.c', | |
| 76 'stubs/fchown-stub.c', | |
| 77 'stubs/fdatasync-stub.c', | |
| 78 'stubs/fork-stub.c', | |
| 79 'stubs/fsync-stub.c', | |
| 80 'stubs/ftruncate-stub.c', | |
| 81 'stubs/get_current_dir_name-stub.c', | |
| 82 'stubs/getegid-stub.c', | |
| 83 'stubs/geteuid-stub.c', | |
| 84 'stubs/getgid-stub.c', | |
| 85 'stubs/getlogin-stub.c', | |
| 86 'stubs/getrusage-stub.c', | |
| 87 'stubs/getppid-stub.c', | |
| 88 'stubs/getpwent-stub.c', | |
| 89 'stubs/getpwnam-stub.c', | |
| 90 'stubs/getpwnam_r-stub.c', | |
| 91 'stubs/getpwuid-stub.c', | |
| 92 'stubs/getpwuid_r-stub.c', | |
| 93 'stubs/getuid-stub.c', | |
| 94 'stubs/getwd-stub.c', | |
| 95 'stubs/ioctl-stub.c', | |
| 96 'stubs/isatty-stub.c', | |
| 97 'stubs/issetugid-stub.c', | |
| 98 'stubs/kill-stub.c', | |
| 99 'stubs/lchown-stub.c', | |
| 100 'stubs/link-stub.c', | |
| 101 'stubs/llseek-stub.c', | |
| 102 'stubs/lstat-stub.c', | |
| 103 'stubs/pclose-stub.c', | |
| 104 'stubs/pipe-stub.c', | |
| 105 'stubs/popen-stub.c', | |
| 106 'stubs/pselect-stub.c', | |
| 107 'stubs/raise-stub.c', | |
| 108 'stubs/readlink-stub.c', | |
| 109 'stubs/remove-stub.c', | |
| 110 'stubs/rename-stub.c', | |
| 111 'stubs/select-stub.c', | |
| 112 'stubs/setegid-stub.c', | |
| 113 'stubs/seteuid-stub.c', | |
| 114 'stubs/setgid-stub.c', | |
| 115 'stubs/setpwent-stub.c', | |
| 116 'stubs/settimeofday-stub.c', | |
| 117 'stubs/setuid-stub.c', | |
| 118 'stubs/signal-stub.c', | |
| 119 'stubs/sigprocmask-stub.c', | |
| 120 'stubs/symlink-stub.c', | |
| 121 'stubs/system-stub.c', | |
| 122 'stubs/times-stub.c', | |
| 123 'stubs/tmpfile-stub.c', | |
| 124 'stubs/truncate-stub.c', | |
| 125 'stubs/ttyname-stub.c', | |
| 126 'stubs/ttyname_r-stub.c', | |
| 127 'stubs/umask-stub.c', | |
| 128 'stubs/utime-stub.c', | |
| 129 'stubs/utimes-stub.c', | |
| 130 'stubs/vfork-stub.c', | |
| 131 'stubs/wait-stub.c', | |
| 132 'stubs/waitpid-stub.c', | |
| 133 ] | |
| 134 | |
| 60 SRCS_NEWLIB_MISC = [ | 135 SRCS_NEWLIB_MISC = [ |
| 61 'malloc.c', # malloc wrapper | 136 'malloc.c', # malloc wrapper |
| 62 'stacktrace.c', # stack tracing for use with "-finstrument" | 137 'stacktrace.c', # stack tracing for use with "-finstrument" |
| 63 'start.c', # contains _start, preventing us from making this a .so | 138 'start.c', # contains _start, preventing us from making this a .so |
| 64 'nacl_add_tp.c', | 139 'nacl_add_tp.c', |
| 65 'nacl_read_tp.c', | 140 'nacl_read_tp.c', |
| 66 'pthread_initialize_minimal.c', | 141 'pthread_initialize_minimal.c', |
| 67 'pthread_stubs.c', # weak version of __pthread_initialize | 142 'pthread_stubs.c', # weak version of __pthread_initialize |
| 68 'tls.c', | 143 'tls.c', |
| 69 ] | 144 ] |
| 70 | 145 |
| 71 | 146 |
| 72 # used by both glibc and newlib | 147 # used by both glibc and newlib |
| 73 SRCS_NACL_EXTENSIONS = [ | 148 SRCS_NACL_EXTENSIONS = [ |
| 74 'gc_hooks.c', | 149 'gc_hooks.c', |
| 75 'nacl_irt.c', | 150 'nacl_irt.c', |
| 76 'nacl_tls_get.c', | 151 'nacl_tls_get.c', |
| 77 'nacl_tls_init.c', | 152 'nacl_tls_init.c', |
| 78 ] | 153 ] |
| 79 | 154 |
| 80 if env.Bit('nacl_glibc'): | 155 if env.Bit('nacl_glibc'): |
| 81 # For nacl-glibc, the standard interfaces are provided by glibc, so | 156 # For nacl-glibc, the standard interfaces are provided by glibc, so |
| 82 # we do not build them here. | 157 # we do not build them here. |
| 83 sources = SRCS_NACL_EXTENSIONS | 158 sources = SRCS_NACL_EXTENSIONS |
| 84 else: | 159 else: |
| 85 sources = SRCS_NACL_EXTENSIONS + SRCS_NEWLIB_SYSCALL + SRCS_NEWLIB_MISC | 160 sources = SRCS_NACL_EXTENSIONS + \ |
|
Mark Seaborn
2013/08/23 15:45:22
Nit: Python style is to use ()s in preference to b
Petr Hosek
2013/08/23 21:35:07
Fixed.
| |
| 161 SRCS_NEWLIB_SYSCALL + \ | |
| 162 SRCS_NEWLIB_STUBS + \ | |
| 163 SRCS_NEWLIB_MISC | |
| 86 if env.Bit('target_arm') and not env.Bit('bitcode'): | 164 if env.Bit('target_arm') and not env.Bit('bitcode'): |
| 87 sources.append('aeabi_read_tp.S') | 165 sources.append('aeabi_read_tp.S') |
| 88 | 166 |
| 89 # Do not make a shared version of libnacl. | 167 # Do not make a shared version of libnacl. |
| 90 libnacl = env.ComponentLibrary('libnacl', sources) | 168 libnacl = env.ComponentLibrary('libnacl', sources) |
| 91 | 169 |
| 92 env.AddLibraryToSdk(libnacl) | 170 env.AddLibraryToSdk(libnacl) |
| 93 header_install = env.AddHeaderToSdk(['nacl_startup.h', 'nacl_thread.h']) | 171 header_install = env.AddHeaderToSdk(['nacl_startup.h', 'nacl_thread.h']) |
| 94 env.Requires('libnacl', header_install) | 172 env.Requires('libnacl', header_install) |
| 95 | 173 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 145 # the libnacl_sys_private one. Putting everything important into a | 223 # the libnacl_sys_private one. Putting everything important into a |
| 146 # single .o file avoids this scenario. | 224 # single .o file avoids this scenario. |
| 147 private_combine = [env.ComponentObject(module, '%s.c' % module) | 225 private_combine = [env.ComponentObject(module, '%s.c' % module) |
| 148 for module in ['gc_hooks_private', | 226 for module in ['gc_hooks_private', |
| 149 'sys_private']] | 227 'sys_private']] |
| 150 sys_private.append(env.Command('combined_private${OBJSUFFIX}', | 228 sys_private.append(env.Command('combined_private${OBJSUFFIX}', |
| 151 private_combine, | 229 private_combine, |
| 152 '${LD} -relocatable -o ${TARGET} ${SOURCES}')) | 230 '${LD} -relocatable -o ${TARGET} ${SOURCES}')) |
| 153 | 231 |
| 154 env.ComponentLibrary('libnacl_sys_private', sys_private) | 232 env.ComponentLibrary('libnacl_sys_private', sys_private) |
| OLD | NEW |