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 from driver_tools import ArchMerge, DriverChain, GetArch, \ | 6 from driver_tools import ArchMerge, DriverChain, GetArch, \ |
7 ParseArgs, ParseTriple, RunDriver, RunWithEnv, SetArch, \ | 7 ParseArgs, ParseTriple, RunDriver, RunWithEnv, SetArch, \ |
8 SetExecutableMode, TempNameGen, UnrecognizedOption | 8 SetExecutableMode, TempNameGen, UnrecognizedOption |
9 from driver_env import env | 9 from driver_env import env |
10 from driver_log import Log | 10 from driver_log import Log |
(...skipping 19 matching lines...) Expand all Loading... |
30 'STRIP_MODE' : 'none', | 30 'STRIP_MODE' : 'none', |
31 | 31 |
32 'STRIP_FLAGS' : '${STRIP_FLAGS_%STRIP_MODE%}', | 32 'STRIP_FLAGS' : '${STRIP_FLAGS_%STRIP_MODE%}', |
33 'STRIP_FLAGS_all' : '-s', | 33 'STRIP_FLAGS_all' : '-s', |
34 'STRIP_FLAGS_debug': '-S', | 34 'STRIP_FLAGS_debug': '-S', |
35 | 35 |
36 'OPT_INLINE_THRESHOLD': '100', | 36 'OPT_INLINE_THRESHOLD': '100', |
37 'OPT_LEVEL': '', # Default opt is 0, but we need to know if it's explicitly | 37 'OPT_LEVEL': '', # Default opt is 0, but we need to know if it's explicitly |
38 # requested or not, since we don't want to propagate | 38 # requested or not, since we don't want to propagate |
39 # the value to TRANSLATE_FLAGS if it wasn't explicitly set. | 39 # the value to TRANSLATE_FLAGS if it wasn't explicitly set. |
40 'OPT_LTO_FLAGS': '-std-link-opts -disable-internalize', | 40 'OPT_LTO_FLAGS': '-std-link-opts', |
41 'OPT_FLAGS': '${#OPT_LEVEL && !OPT_LEVEL == 0 ? ${OPT_LTO_FLAGS}} ' + | 41 'OPT_FLAGS': '${#OPT_LEVEL && !OPT_LEVEL == 0 ? ${OPT_LTO_FLAGS}} ' + |
42 '-inline-threshold=${OPT_INLINE_THRESHOLD} ', | 42 '-inline-threshold=${OPT_INLINE_THRESHOLD} ', |
43 | 43 |
44 'TRANSLATE_FLAGS': '${PIC ? -fPIC} ${!USE_STDLIB ? -nostdlib} ' + | 44 'TRANSLATE_FLAGS': '${PIC ? -fPIC} ${!USE_STDLIB ? -nostdlib} ' + |
45 '${#SONAME ? -Wl,--soname=${SONAME}} ' + | 45 '${#SONAME ? -Wl,--soname=${SONAME}} ' + |
46 '${#OPT_LEVEL ? -O${OPT_LEVEL}} ' + | 46 '${#OPT_LEVEL ? -O${OPT_LEVEL}} ' + |
47 '--allow-llvm-bitcode-input ' + | 47 '--allow-llvm-bitcode-input ' + |
48 '${CXX_EH_MODE==zerocost ? --pnacl-allow-zerocost-eh} ' + | 48 '${CXX_EH_MODE==zerocost ? --pnacl-allow-zerocost-eh} ' + |
49 '${TRANSLATE_FLAGS_USER}', | 49 '${TRANSLATE_FLAGS_USER}', |
50 | 50 |
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 -O<opt-level> Optimize output file | 602 -O<opt-level> Optimize output file |
603 -M, --print-map Print map file on standard output | 603 -M, --print-map Print map file on standard output |
604 --whole-archive Include all objects from following archives | 604 --whole-archive Include all objects from following archives |
605 --no-whole-archive Turn off --whole-archive | 605 --no-whole-archive Turn off --whole-archive |
606 -s, --strip-all Strip all symbols | 606 -s, --strip-all Strip all symbols |
607 -S, --strip-debug Strip debugging symbols | 607 -S, --strip-debug Strip debugging symbols |
608 -u SYM, --undefined=SYM Start with undefined reference to SYM | 608 -u SYM, --undefined=SYM Start with undefined reference to SYM |
609 | 609 |
610 -help | -h Output this help. | 610 -help | -h Output this help. |
611 """ | 611 """ |
OLD | NEW |