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

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

Issue 9824001: Change built_elsewhere flag to work with pexe mode (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: add AS, line len Created 8 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 unified diff | Download patch | Annotate | Revision Log
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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 AR=pnacl_ar, 318 AR=pnacl_ar,
319 AS=pnacl_as + ld_arch_flag, 319 AS=pnacl_as + ld_arch_flag,
320 RANLIB=pnacl_ranlib, 320 RANLIB=pnacl_ranlib,
321 DISASS=pnacl_disass, 321 DISASS=pnacl_disass,
322 OBJDUMP=pnacl_disass, 322 OBJDUMP=pnacl_disass,
323 STRIP=pnacl_strip, 323 STRIP=pnacl_strip,
324 GENNMF=pnacl_nmf, 324 GENNMF=pnacl_nmf,
325 TRANSLATE=pnacl_translate + arch_flag + pnacl_translate_flags, 325 TRANSLATE=pnacl_translate + arch_flag + pnacl_translate_flags,
326 ) 326 )
327 327
328 if env.Bit('built_elsewhere'):
329 def FakeInstall(dest, source, env):
330 print 'Not installing', dest
331 env.Replace(CC='true', CXX='true', LINK='true', AR='true',
332 RANLIB='true', AS='true', LD='true', INSTALL=FakeInstall,
jvoung - send to chromium... 2012/03/21 23:15:04 Do you need to stub out STRIP as well?
(google.com) Derek Schuff 2012/03/22 00:02:02 Apparently not, since it works without it? couldn'
333 #TODO(dschuff) remove this when we can translate on arm hw
334 TRANSLATE='true')
335
328 336
329 def _SetEnvForSdkManually(env): 337 def _SetEnvForSdkManually(env):
330 def GetEnvOrDummy(v): 338 def GetEnvOrDummy(v):
331 return os.getenv('NACL_SDK_' + v, 'MISSING_SDK_' + v) 339 return os.getenv('NACL_SDK_' + v, 'MISSING_SDK_' + v)
332 340
333 env.Replace(# Replace header and lib paths. 341 env.Replace(# Replace header and lib paths.
334 NACL_SDK_INCLUDE=GetEnvOrDummy('INCLUDE'), 342 NACL_SDK_INCLUDE=GetEnvOrDummy('INCLUDE'),
335 NACL_SDK_LIB=GetEnvOrDummy('LIB'), 343 NACL_SDK_LIB=GetEnvOrDummy('LIB'),
336 # Replace the normal unix tools with the NaCl ones. 344 # Replace the normal unix tools with the NaCl ones.
337 CC=GetEnvOrDummy('CC'), 345 CC=GetEnvOrDummy('CC'),
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 # Dependency files it produces are to be found in ${LIBPATH}. 618 # Dependency files it produces are to be found in ${LIBPATH}.
611 # It is applied recursively to those dependencies in case 619 # It is applied recursively to those dependencies in case
612 # some of them are linker scripts too. 620 # some of them are linker scripts too.
613 ldscript_scanner = SCons.Scanner.Base( 621 ldscript_scanner = SCons.Scanner.Base(
614 function=ScanLinkerScript, 622 function=ScanLinkerScript,
615 skeys=['.a', '.so', '.pso'], 623 skeys=['.a', '.so', '.pso'],
616 path_function=SCons.Scanner.FindPathDirs('LIBPATH'), 624 path_function=SCons.Scanner.FindPathDirs('LIBPATH'),
617 recursive=True 625 recursive=True
618 ) 626 )
619 env.Append(SCANNERS=ldscript_scanner) 627 env.Append(SCANNERS=ldscript_scanner)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698