OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/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 # IMPORTANT NOTE: If you make local mods to this file, you must run: | 6 # IMPORTANT NOTE: If you make local mods to this file, you must run: |
7 # % pnacl/build.sh driver | 7 # % pnacl/build.sh driver |
8 # in order for them to take effect in the scons build. This command | 8 # in order for them to take effect in the scons build. This command |
9 # updates the copy in the toolchain/ tree. | 9 # updates the copy in the toolchain/ tree. |
10 # | 10 # |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 ( '(-export-dynamic)', AddToBCLinkFlags), | 180 ( '(-export-dynamic)', AddToBCLinkFlags), |
181 | 181 |
182 ( '-?-soname=(.*)', "env.set('SONAME', $0)"), | 182 ( '-?-soname=(.*)', "env.set('SONAME', $0)"), |
183 ( ('-?-soname', '(.*)'), "env.set('SONAME', $0)"), | 183 ( ('-?-soname', '(.*)'), "env.set('SONAME', $0)"), |
184 | 184 |
185 ( '(-M)', AddToBCLinkFlags), | 185 ( '(-M)', AddToBCLinkFlags), |
186 ( '(-t)', AddToBCLinkFlags), | 186 ( '(-t)', AddToBCLinkFlags), |
187 ( ('(-y)','(.*)'), AddToBCLinkFlags), | 187 ( ('(-y)','(.*)'), AddToBCLinkFlags), |
188 ( ('(-defsym)','(.*)'), AddToBCLinkFlags), | 188 ( ('(-defsym)','(.*)'), AddToBCLinkFlags), |
189 | 189 |
190 ( '-melf_nacl', "env.set('ARCH', 'X8632')"), | 190 ( '-melf_nacl', "env.set('ARCH', 'X8632')"), |
191 ( ('-m','elf_nacl'), "env.set('ARCH', 'X8632')"), | 191 ( ('-m','elf_nacl'), "env.set('ARCH', 'X8632')"), |
192 ( '-melf64_nacl', "env.set('ARCH', 'X8664')"), | 192 ( '-melf64_nacl', "env.set('ARCH', 'X8664')"), |
193 ( ('-m','elf64_nacl'), "env.set('ARCH', 'X8664')"), | 193 ( ('-m','elf64_nacl'), "env.set('ARCH', 'X8664')"), |
194 ( '-marmelf_nacl', "env.set('ARCH', 'ARM')"), | 194 ( '-marmelf_nacl', "env.set('ARCH', 'ARM')"), |
195 ( ('-m','armelf_nacl'), "env.set('ARCH', 'ARM')"), | 195 ( ('-m','armelf_nacl'), "env.set('ARCH', 'ARM')"), |
| 196 ( '-mmipselelf_nacl', "env.set('ARCH', 'MIPS32')"), |
| 197 ( ('-m','mipselelf_nacl'), "env.set('ARCH', 'MIPS32')"), |
196 | 198 |
197 ( ('(-?-wrap)', '(.+)'), AddToBCLinkFlags), | 199 ( ('(-?-wrap)', '(.+)'), AddToBCLinkFlags), |
198 ( ('(-?-wrap=.+)'), AddToBCLinkFlags), | 200 ( ('(-?-wrap=.+)'), AddToBCLinkFlags), |
199 | 201 |
200 # NOTE: For scons tests, the code generation fPIC flag is used with pnacl-ld. | 202 # NOTE: For scons tests, the code generation fPIC flag is used with pnacl-ld. |
201 ( '-fPIC', "env.set('PIC', '1')"), | 203 ( '-fPIC', "env.set('PIC', '1')"), |
202 | 204 |
203 # This controls LTO optimization. | 205 # This controls LTO optimization. |
204 # opt does not support -Os but internally it is identical to -O2 | 206 # opt does not support -Os but internally it is identical to -O2 |
205 # opt also does not support -O4 but -O4 is how you ask clang for LTO, so we | 207 # opt also does not support -O4 but -O4 is how you ask clang for LTO, so we |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 -O<opt-level> Optimize output file | 481 -O<opt-level> Optimize output file |
480 -M, --print-map Print map file on standard output | 482 -M, --print-map Print map file on standard output |
481 --whole-archive Include all objects from following archives | 483 --whole-archive Include all objects from following archives |
482 --no-whole-archive Turn off --whole-archive | 484 --no-whole-archive Turn off --whole-archive |
483 -s, --strip-all Strip all symbols | 485 -s, --strip-all Strip all symbols |
484 -S, --strip-debug Strip debugging symbols | 486 -S, --strip-debug Strip debugging symbols |
485 --undefined SYMBOL Start with undefined reference to SYMBOL | 487 --undefined SYMBOL Start with undefined reference to SYMBOL |
486 | 488 |
487 -help | -h Output this help. | 489 -help | -h Output this help. |
488 """ | 490 """ |
OLD | NEW |