Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(825)

Unified Diff: pnacl/driver/pnacl-ld.py

Issue 12843006: Use llvm-opt's LTO pass list instead of generic O2/O3 pass list for LTO (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: link dwarf test with O0 Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pnacl/build.sh ('k') | tests/toolchain/nacl.scons » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pnacl/driver/pnacl-ld.py
diff --git a/pnacl/driver/pnacl-ld.py b/pnacl/driver/pnacl-ld.py
index f8e9e7a313723be88da82eff355b842378cf5b1c..509c178c44b007390bf825e85ce7000d210129c7 100755
--- a/pnacl/driver/pnacl-ld.py
+++ b/pnacl/driver/pnacl-ld.py
@@ -40,7 +40,8 @@ EXTRA_ENV = {
'OPT_LEVEL': '', # Default opt is 0, but we need to know if it's explicitly
# requested or not, since we don't want to propagate
# the value to TRANSLATE_FLAGS if it wasn't explicitly set.
- 'OPT_FLAGS': '-O${#OPT_LEVEL ? ${OPT_LEVEL} : 0} ${OPT_STRIP_%STRIP_MODE%} ' +
+ 'OPT_LTO_FLAGS': '-std-link-opts -disable-internalize',
jvoung - send to chromium... 2013/03/21 21:23:37 might also want to leave a comment on why -disable
+ 'OPT_FLAGS': '${#OPT_LEVEL && !OPT_LEVEL == 0 ? ${OPT_LTO_FLAGS}} ${OPT_STRIP_%STRIP_MODE%} ' +
jvoung - send to chromium... 2013/03/21 21:17:05 80 cols
'-inline-threshold=${OPT_INLINE_THRESHOLD} ' +
'--do-not-wrap',
'OPT_STRIP_none': '',
@@ -331,7 +332,7 @@ def main(argv):
if env.getbool('STATIC') and len(native_objects) == 0:
chain.add(DoExpandCtorsAndTls, 'expand_ctors_and_tls.' + bitcode_type)
if env.getone('OPT_LEVEL') != '' and env.getone('OPT_LEVEL') != '0':
- chain.add(DoOPT, 'opt.' + bitcode_type)
+ chain.add(DoLTO, 'opt.' + bitcode_type)
elif env.getone('STRIP_MODE') != 'none':
chain.add(DoStrip, 'stripped.' + bitcode_type)
else:
@@ -434,9 +435,10 @@ def CheckInputsArch(inputs):
def DoExpandCtorsAndTls(infile, outfile):
RunDriver('opt', ['-nacl-expand-ctors',
'-nacl-expand-tls',
+ '--do-not-wrap',
infile, '-o', outfile])
-def DoOPT(infile, outfile):
+def DoLTO(infile, outfile):
opt_flags = env.get('OPT_FLAGS')
RunDriver('opt', opt_flags + [ infile, '-o', outfile ])
« no previous file with comments | « pnacl/build.sh ('k') | tests/toolchain/nacl.scons » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698