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

Side by Side Diff: site_scons/site_tools/naclsdk.py

Issue 352213002: PNaCl dynamic loading: Extend pnacl-translate to be able to translate PSOs (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Cleanup Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pnacl/driver/pnacl-translate.py ('k') | tests/pnacl_dynamic_loading/nacl.scons » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 """NaCl SDK tool SCons.""" 6 """NaCl SDK tool SCons."""
7 7
8 import __builtin__ 8 import __builtin__
9 import re 9 import re
10 import os 10 import os
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 'pnacl-translate' + binext) 193 'pnacl-translate' + binext)
194 else: 194 else:
195 pnacl_translate = binprefix + 'translate' + binext 195 pnacl_translate = binprefix + 'translate' + binext
196 196
197 pnacl_cc = binprefix + 'clang' + binext 197 pnacl_cc = binprefix + 'clang' + binext
198 pnacl_cxx = binprefix + 'clang++' + binext 198 pnacl_cxx = binprefix + 'clang++' + binext
199 199
200 pnacl_ld = binprefix + 'ld' + binext 200 pnacl_ld = binprefix + 'ld' + binext
201 pnacl_disass = binprefix + 'dis' + binext 201 pnacl_disass = binprefix + 'dis' + binext
202 pnacl_finalize = binprefix + 'finalize' + binext 202 pnacl_finalize = binprefix + 'finalize' + binext
203 pnacl_opt = binprefix + 'opt' + binext
203 pnacl_strip = binprefix + 'strip' + binext 204 pnacl_strip = binprefix + 'strip' + binext
204 205
205 # NOTE: XXX_flags start with space for easy concatenation 206 # NOTE: XXX_flags start with space for easy concatenation
206 # The flags generated here get baked into the commands (CC, CXX, LINK) 207 # The flags generated here get baked into the commands (CC, CXX, LINK)
207 # instead of CFLAGS etc to keep them from getting blown away by some 208 # instead of CFLAGS etc to keep them from getting blown away by some
208 # tests. Don't add flags here unless they always need to be preserved. 209 # tests. Don't add flags here unless they always need to be preserved.
209 pnacl_cxx_flags = '' 210 pnacl_cxx_flags = ''
210 pnacl_cc_flags = ' -std=gnu99' 211 pnacl_cc_flags = ' -std=gnu99'
211 pnacl_ld_flags = ' ' + ' '.join(env['PNACL_BCLDFLAGS']) 212 pnacl_ld_flags = ' ' + ' '.join(env['PNACL_BCLDFLAGS'])
212 pnacl_translate_flags = '' 213 pnacl_translate_flags = ''
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 SHLINK=pnacl_cxx + ld_arch_flag + pnacl_ld_flags, 253 SHLINK=pnacl_cxx + ld_arch_flag + pnacl_ld_flags,
253 LD=pnacl_ld, 254 LD=pnacl_ld,
254 AR=pnacl_ar, 255 AR=pnacl_ar,
255 AS=pnacl_as + ld_arch_flag, 256 AS=pnacl_as + ld_arch_flag,
256 RANLIB=pnacl_ranlib, 257 RANLIB=pnacl_ranlib,
257 DISASS=pnacl_disass, 258 DISASS=pnacl_disass,
258 OBJDUMP=pnacl_disass, 259 OBJDUMP=pnacl_disass,
259 STRIP=pnacl_strip, 260 STRIP=pnacl_strip,
260 TRANSLATE=pnacl_translate + arch_flag + pnacl_translate_flags, 261 TRANSLATE=pnacl_translate + arch_flag + pnacl_translate_flags,
261 PNACLFINALIZE=pnacl_finalize, 262 PNACLFINALIZE=pnacl_finalize,
263 PNACLOPT=pnacl_opt,
262 ) 264 )
263 265
264 if env.Bit('built_elsewhere'): 266 if env.Bit('built_elsewhere'):
265 def FakeInstall(dest, source, env): 267 def FakeInstall(dest, source, env):
266 print 'Not installing', dest 268 print 'Not installing', dest
267 _StubOutEnvToolsForBuiltElsewhere(env) 269 _StubOutEnvToolsForBuiltElsewhere(env)
268 env.Replace(INSTALL=FakeInstall) 270 env.Replace(INSTALL=FakeInstall)
269 if env.Bit('translate_in_build_step'): 271 if env.Bit('translate_in_build_step'):
270 env.Replace(TRANSLATE='true') 272 env.Replace(TRANSLATE='true')
271 env.Replace(PNACLFINALIZE='true') 273 env.Replace(PNACLFINALIZE='true')
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 # translation. 685 # translation.
684 if not os.path.exists(version_file) or env.Bit('use_sandboxed_translator'): 686 if not os.path.exists(version_file) or env.Bit('use_sandboxed_translator'):
685 version_file = os.path.join(os.path.dirname(root), 'pnacl_translator', 687 version_file = os.path.join(os.path.dirname(root), 'pnacl_translator',
686 'FEATURE_VERSION') 688 'FEATURE_VERSION')
687 if os.path.exists(version_file): 689 if os.path.exists(version_file):
688 with open(version_file, 'r') as fh: 690 with open(version_file, 'r') as fh:
689 version = int(fh.read()) 691 version = int(fh.read())
690 else: 692 else:
691 version = 0 693 version = 0
692 env.Replace(TOOLCHAIN_FEATURE_VERSION=version) 694 env.Replace(TOOLCHAIN_FEATURE_VERSION=version)
OLDNEW
« no previous file with comments | « pnacl/driver/pnacl-translate.py ('k') | tests/pnacl_dynamic_loading/nacl.scons » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698