Chromium Code Reviews| 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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 350 # BUG= http://code.google.com/p/nativeclient/issues/detail?id=1248 | 350 # BUG= http://code.google.com/p/nativeclient/issues/detail?id=1248 | 
| 351 if env.Bit('pnacl_generate_pexe') and not temporarily_allow: | 351 if env.Bit('pnacl_generate_pexe') and not temporarily_allow: | 
| 352 env.Replace(CC='NO-NATIVE-CC-INVOCATION-ALLOWED', | 352 env.Replace(CC='NO-NATIVE-CC-INVOCATION-ALLOWED', | 
| 353 CXX='NO-NATIVE-CXX-INVOCATION-ALLOWED') | 353 CXX='NO-NATIVE-CXX-INVOCATION-ALLOWED') | 
| 354 return | 354 return | 
| 355 | 355 | 
| 356 if env.Bit('target_arm'): | 356 if env.Bit('target_arm'): | 
| 357 env.AppendUnique(CCFLAGS=['--pnacl-arm-bias'], | 357 env.AppendUnique(CCFLAGS=['--pnacl-arm-bias'], | 
| 358 ASPPFLAGS=['--pnacl-arm-bias']) | 358 ASPPFLAGS=['--pnacl-arm-bias']) | 
| 359 elif env.Bit('target_x86_32'): | 359 elif env.Bit('target_x86_32'): | 
| 360 env.AppendUnique(CCFLAGS=['--pnacl-i686-bias'], | 360 env.AppendUnique(CCFLAGS=['--pnacl-i686-bias', | 
| 361 '--target=i686-unknown-nacl'], | |
| 
 
Mark Seaborn
2014/09/30 20:32:29
This is fine to do, but if we're using the arch-sp
 
Junichi Uekawa
2014/10/01 04:17:13
AddBiasForPNaCl is used elsewhere for using the de
 
Mark Seaborn
2014/10/01 17:02:30
Oops, yes.  I misread this change and thought you
 
 | |
| 361 ASPPFLAGS=['--pnacl-i686-bias']) | 362 ASPPFLAGS=['--pnacl-i686-bias']) | 
| 362 elif env.Bit('target_x86_64'): | 363 elif env.Bit('target_x86_64'): | 
| 363 env.AppendUnique(CCFLAGS=['--pnacl-x86_64-bias'], | 364 env.AppendUnique(CCFLAGS=['--pnacl-x86_64-bias'], | 
| 364 ASPPFLAGS=['--pnacl-x86_64-bias']) | 365 ASPPFLAGS=['--pnacl-x86_64-bias']) | 
| 365 elif env.Bit('target_mips32'): | 366 elif env.Bit('target_mips32'): | 
| 366 env.AppendUnique(CCFLAGS=['--pnacl-mips-bias'], | 367 env.AppendUnique(CCFLAGS=['--pnacl-mips-bias'], | 
| 367 ASPPFLAGS=['--pnacl-mips-bias']) | 368 ASPPFLAGS=['--pnacl-mips-bias']) | 
| 368 else: | 369 else: | 
| 369 raise Exception("Unknown architecture!") | 370 raise Exception("Unknown architecture!") | 
| 370 | 371 | 
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 707 # translation. | 708 # translation. | 
| 708 if not os.path.exists(version_file) or env.Bit('use_sandboxed_translator'): | 709 if not os.path.exists(version_file) or env.Bit('use_sandboxed_translator'): | 
| 709 version_file = os.path.join(os.path.dirname(root), 'pnacl_translator', | 710 version_file = os.path.join(os.path.dirname(root), 'pnacl_translator', | 
| 710 'FEATURE_VERSION') | 711 'FEATURE_VERSION') | 
| 711 if os.path.exists(version_file): | 712 if os.path.exists(version_file): | 
| 712 with open(version_file, 'r') as fh: | 713 with open(version_file, 'r') as fh: | 
| 713 version = int(fh.read()) | 714 version = int(fh.read()) | 
| 714 else: | 715 else: | 
| 715 version = 0 | 716 version = 0 | 
| 716 env.Replace(TOOLCHAIN_FEATURE_VERSION=version) | 717 env.Replace(TOOLCHAIN_FEATURE_VERSION=version) | 
| OLD | NEW |