| OLD | NEW |
| 1 # -*- python -*- | 1 # -*- python -*- |
| 2 # Copyright (c) 2013 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2013 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('env') | 6 Import('env') |
| 7 | 7 |
| 8 def AddLibcTest(env, src, exit_status='0', golden_file=None, test_suffix='', | 8 def AddLibcTest(env, src, exit_status='0', golden_file=None, test_suffix='', |
| 9 is_broken=False, compile_env=None, link_env=None, | 9 is_broken=False, compile_env=None, link_env=None, |
| 10 EXTRA_LIBS=[]): | 10 EXTRA_LIBS=[]): |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 unopt_env = env.Clone() | 55 unopt_env = env.Clone() |
| 56 unopt_env.Append(CFLAGS=['-O0']) | 56 unopt_env.Append(CFLAGS=['-O0']) |
| 57 unopt_env.Append(CCFLAGS=['-O0']) | 57 unopt_env.Append(CCFLAGS=['-O0']) |
| 58 opt_env = env.Clone() | 58 opt_env = env.Clone() |
| 59 opt_env.Append(CFLAGS=['-O3']) | 59 opt_env.Append(CFLAGS=['-O3']) |
| 60 opt_env.Append(CCFLAGS=['-O3']) | 60 opt_env.Append(CCFLAGS=['-O3']) |
| 61 opt_env.Append(LINKFLAGS=['-O3']) | 61 opt_env.Append(LINKFLAGS=['-O3']) |
| 62 AddLibcTest(env, 'printf_to_puts.c', '0', | 62 AddLibcTest(env, 'printf_to_puts.c', '0', |
| 63 compile_env=unopt_env, link_env=opt_env) | 63 compile_env=unopt_env, link_env=opt_env) |
| 64 | 64 |
| 65 if env.Bit('nacl_glibc'): | 65 AddLibcTest(env, 'posix_memalign.c') |
| 66 memalign_env = env | |
| 67 else: | |
| 68 memalign_env = env.Clone() | |
| 69 memalign_env.Append(CPPDEFINES=['NEWLIB=1']) | |
| 70 AddLibcTest(memalign_env, 'posix_memalign.c') | |
| OLD | NEW |