OLD | NEW |
1 #! -*- python -*- | 1 #! -*- 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 import atexit | 6 import atexit |
7 import json | 7 import json |
8 import os | 8 import os |
9 import platform | 9 import platform |
10 import re | 10 import re |
(...skipping 3016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3027 # | 3027 # |
3028 # For Non-SFI NaCl we use inline assembly in PNaCl/Clang. | 3028 # For Non-SFI NaCl we use inline assembly in PNaCl/Clang. |
3029 if not (env.Bit('target_arm') or env.Bit('target_mips32') | 3029 if not (env.Bit('target_arm') or env.Bit('target_mips32') |
3030 or env.Bit('nonsfi_nacl')): | 3030 or env.Bit('nonsfi_nacl')): |
3031 return False | 3031 return False |
3032 # Inline assembly does not work in pexes. | 3032 # Inline assembly does not work in pexes. |
3033 if env.Bit('pnacl_generate_pexe'): | 3033 if env.Bit('pnacl_generate_pexe'): |
3034 return False | 3034 return False |
3035 env.AddBiasForPNaCl() | 3035 env.AddBiasForPNaCl() |
3036 env.PNaClForceNative() | 3036 env.PNaClForceNative() |
| 3037 |
| 3038 if env.Bit('target_x86_32'): |
| 3039 env.AppendUnique(CCFLAGS=['--target=i686-unknown-nacl']) |
| 3040 elif env.Bit('target_x86_64'): |
| 3041 env.AppendUnique(CCFLAGS=['--target=x86_64-unknown-nacl']) |
| 3042 elif env.Bit('target_arm'): |
| 3043 env.AppendUnique(CCFLAGS=['--target=arm-unknown-nacl', |
| 3044 '-mfloat-abi=hard']) |
3037 return True | 3045 return True |
3038 | 3046 |
3039 nacl_env.AddMethod(AllowInlineAssembly) | 3047 nacl_env.AddMethod(AllowInlineAssembly) |
3040 | 3048 |
3041 | 3049 |
3042 # TODO(mseaborn): Enable this unconditionally once the C code on the | 3050 # TODO(mseaborn): Enable this unconditionally once the C code on the |
3043 # Chromium side compiles successfully with this warning. | 3051 # Chromium side compiles successfully with this warning. |
3044 if not enable_chrome: | 3052 if not enable_chrome: |
3045 nacl_env.Append(CFLAGS=['-Wstrict-prototypes']) | 3053 nacl_env.Append(CFLAGS=['-Wstrict-prototypes']) |
3046 | 3054 |
(...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4022 nacl_env.ValidateSdk() | 4030 nacl_env.ValidateSdk() |
4023 | 4031 |
4024 if BROKEN_TEST_COUNT > 0: | 4032 if BROKEN_TEST_COUNT > 0: |
4025 msg = "There are %d broken tests." % BROKEN_TEST_COUNT | 4033 msg = "There are %d broken tests." % BROKEN_TEST_COUNT |
4026 if GetOption('brief_comstr'): | 4034 if GetOption('brief_comstr'): |
4027 msg += " Add --verbose to the command line for more information." | 4035 msg += " Add --verbose to the command line for more information." |
4028 print msg | 4036 print msg |
4029 | 4037 |
4030 # separate warnings from actual build output | 4038 # separate warnings from actual build output |
4031 Banner('B U I L D - O U T P U T:') | 4039 Banner('B U I L D - O U T P U T:') |
OLD | NEW |