| OLD | NEW |
| 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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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. |
| 251 NACL_SDK_INCLUDE=os.path.join(root, 'usr', 'include'), | 251 NACL_SDK_INCLUDE=os.path.join(root, 'le32-nacl', 'include'), |
| 252 NACL_SDK_LIB=os.path.join(root, 'lib'), | 252 NACL_SDK_LIB=os.path.join(root, 'le32-nacl', 'lib'), |
| 253 # Remove arch-specific flags (if any) | 253 # Remove arch-specific flags (if any) |
| 254 BASE_LINKFLAGS='', | 254 BASE_LINKFLAGS='', |
| 255 BASE_CFLAGS='', | 255 BASE_CFLAGS='', |
| 256 BASE_CXXFLAGS='', | 256 BASE_CXXFLAGS='', |
| 257 BASE_ASFLAGS='', | 257 BASE_ASFLAGS='', |
| 258 BASE_ASPPFLAGS='', | 258 BASE_ASPPFLAGS='', |
| 259 # Replace the normal unix tools with the PNaCl ones. | 259 # Replace the normal unix tools with the PNaCl ones. |
| 260 CC=pnacl_cc + pnacl_cc_flags, | 260 CC=pnacl_cc + pnacl_cc_flags, |
| 261 CXX=pnacl_cxx + pnacl_cxx_flags, | 261 CXX=pnacl_cxx + pnacl_cxx_flags, |
| 262 ASPP=pnacl_cc + pnacl_cc_flags, | 262 ASPP=pnacl_cc + pnacl_cc_flags, |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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) |
| OLD | NEW |