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

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

Issue 544003002: NonSFI mode: Enable compiling exception_test for NonSFI NaCl on ARM (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: remove space Created 6 years, 2 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
« no previous file with comments | « SConstruct ('k') | no next file » | 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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 def PNaClForceNative(env): 296 def PNaClForceNative(env):
297 assert(env.Bit('bitcode')) 297 assert(env.Bit('bitcode'))
298 if env.Bit('pnacl_generate_pexe'): 298 if env.Bit('pnacl_generate_pexe'):
299 env.Replace(CC='NO-NATIVE-CC-INVOCATION-ALLOWED', 299 env.Replace(CC='NO-NATIVE-CC-INVOCATION-ALLOWED',
300 CXX='NO-NATIVE-CXX-INVOCATION-ALLOWED') 300 CXX='NO-NATIVE-CXX-INVOCATION-ALLOWED')
301 return 301 return
302 302
303 env.Replace(OBJSUFFIX='.o', 303 env.Replace(OBJSUFFIX='.o',
304 SHLIBSUFFIX='.so') 304 SHLIBSUFFIX='.so')
305 arch_flag = ' -arch ${TARGET_FULLARCH}' 305 arch_flag = ' -arch ${TARGET_FULLARCH}'
306 if env.Bit('nonsfi_nacl'):
307 arch_flag += '-nonsfi'
306 cc_flags = ' --pnacl-allow-native --pnacl-allow-translate' 308 cc_flags = ' --pnacl-allow-native --pnacl-allow-translate'
307 env.Append(CC=arch_flag + cc_flags, 309 env.Append(CC=arch_flag + cc_flags,
308 CXX=arch_flag + cc_flags, 310 CXX=arch_flag + cc_flags,
309 ASPP=arch_flag + cc_flags, 311 ASPP=arch_flag + cc_flags,
310 LINK=cc_flags) # Already has -arch 312 LINK=cc_flags) # Already has -arch
311 env['LD'] = 'NO-NATIVE-LD-INVOCATION-ALLOWED' 313 env['LD'] = 'NO-NATIVE-LD-INVOCATION-ALLOWED'
312 env['SHLINK'] = '${LINK}' 314 env['SHLINK'] = '${LINK}'
313 if env.Bit('built_elsewhere'): 315 if env.Bit('built_elsewhere'):
314 _StubOutEnvToolsForBuiltElsewhere(env) 316 _StubOutEnvToolsForBuiltElsewhere(env)
315 317
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 # translation. 707 # translation.
706 if not os.path.exists(version_file) or env.Bit('use_sandboxed_translator'): 708 if not os.path.exists(version_file) or env.Bit('use_sandboxed_translator'):
707 version_file = os.path.join(os.path.dirname(root), 'pnacl_translator', 709 version_file = os.path.join(os.path.dirname(root), 'pnacl_translator',
708 'FEATURE_VERSION') 710 'FEATURE_VERSION')
709 if os.path.exists(version_file): 711 if os.path.exists(version_file):
710 with open(version_file, 'r') as fh: 712 with open(version_file, 'r') as fh:
711 version = int(fh.read()) 713 version = int(fh.read())
712 else: 714 else:
713 version = 0 715 version = 0
714 env.Replace(TOOLCHAIN_FEATURE_VERSION=version) 716 env.Replace(TOOLCHAIN_FEATURE_VERSION=version)
OLDNEW
« no previous file with comments | « SConstruct ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698