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

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

Issue 546883003: MinSFI: Passing arguments to the entry function (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: Created 6 years, 3 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
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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 if env.Bit('nacl_pic'): 230 if env.Bit('nacl_pic'):
231 pnacl_cc_flags += ' -fPIC' 231 pnacl_cc_flags += ' -fPIC'
232 pnacl_cxx_flags += ' -fPIC' 232 pnacl_cxx_flags += ' -fPIC'
233 # NOTE: this is a special hack for the pnacl backend which 233 # NOTE: this is a special hack for the pnacl backend which
234 # does more than linking 234 # does more than linking
235 pnacl_ld_flags += ' -fPIC' 235 pnacl_ld_flags += ' -fPIC'
236 pnacl_translate_flags += ' -fPIC' 236 pnacl_translate_flags += ' -fPIC'
237 237
238 if env.Bit('minsfi'): 238 if env.Bit('minsfi'):
239 pnacl_llc_flags += ' -relocation-model=pic -filetype=obj' 239 pnacl_llc_flags += ' -relocation-model=pic -filetype=obj'
240 pnacl_ld_flags += ' -nostdlib -Wl,-r' 240 pnacl_ld_flags += ' -nostdlib -Wl,-r -L' + os.path.join(root, 'usr', 'lib')
241 241
242 if env.Bit('use_sandboxed_translator'): 242 if env.Bit('use_sandboxed_translator'):
243 sb_flags = ' --pnacl-sb' 243 sb_flags = ' --pnacl-sb'
244 pnacl_ld_flags += sb_flags 244 pnacl_ld_flags += sb_flags
245 pnacl_translate_flags += sb_flags 245 pnacl_translate_flags += sb_flags
246 246
247 if env.Bit('x86_64_zero_based_sandbox'): 247 if env.Bit('x86_64_zero_based_sandbox'):
248 pnacl_translate_flags += ' -sfi-zero-based-sandbox' 248 pnacl_translate_flags += ' -sfi-zero-based-sandbox'
249 249
250 env.Replace(# Replace header and lib paths. 250 env.Replace(# Replace header and lib paths.
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 # translation. 705 # translation.
706 if not os.path.exists(version_file) or env.Bit('use_sandboxed_translator'): 706 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', 707 version_file = os.path.join(os.path.dirname(root), 'pnacl_translator',
708 'FEATURE_VERSION') 708 'FEATURE_VERSION')
709 if os.path.exists(version_file): 709 if os.path.exists(version_file):
710 with open(version_file, 'r') as fh: 710 with open(version_file, 'r') as fh:
711 version = int(fh.read()) 711 version = int(fh.read())
712 else: 712 else:
713 version = 0 713 version = 0
714 env.Replace(TOOLCHAIN_FEATURE_VERSION=version) 714 env.Replace(TOOLCHAIN_FEATURE_VERSION=version)
OLDNEW
« no previous file with comments | « SConstruct ('k') | src/include/minsfi.h » ('j') | src/include/minsfi_priv.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698