| OLD | NEW |
| 1 # -*- python -*- | 1 # -*- python -*- |
| 2 # Copyright 2012 The Native Client Authors. All rights reserved. | 2 # Copyright 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 # Calling convention test to ensure interoperabilty of nacl-gcc and | 6 # Calling convention test to ensure interoperabilty of nacl-gcc and |
| 7 # pnacl generated code | 7 # pnacl generated code |
| 8 | 8 |
| 9 Import('env') | 9 Import('env') |
| 10 | 10 |
| 11 # This test does not make any sense for pure pnacl | 11 # This test does not make any sense for pure pnacl |
| 12 if not env.Bit('bitcode'): | 12 if not env.Bit('bitcode'): |
| 13 Return() | 13 Return() |
| 14 | 14 |
| 15 if env.Bit('pnacl_generate_pexe'): | 15 if env.Bit('pnacl_generate_pexe'): |
| 16 Return() | 16 Return() |
| 17 | 17 |
| 18 if env.Bit('built_elsewhere'): | 18 if env.Bit('built_elsewhere'): |
| 19 Return() | 19 Return() |
| 20 | 20 |
| 21 # TODO(petarj): Add nacl-gcc for MIPS. |
| 22 if env.Bit('target_mips32'): |
| 23 Return() |
| 24 |
| 21 env_pnacl_cc = env.Clone() | 25 env_pnacl_cc = env.Clone() |
| 22 env_pnacl_cc.PNaClForceNative() | 26 env_pnacl_cc.PNaClForceNative() |
| 23 # for ppapi headers which include other ppapi headers | 27 # for ppapi headers which include other ppapi headers |
| 24 env_pnacl_cc.Append(CPPPATH='${SCONSTRUCT_DIR}/tests/callingconv_ppapi') | 28 env_pnacl_cc.Append(CPPPATH='${SCONSTRUCT_DIR}/tests/callingconv_ppapi') |
| 25 | 29 |
| 26 env_pnacl_cc_calling = env_pnacl_cc.Clone() | 30 env_pnacl_cc_calling = env_pnacl_cc.Clone() |
| 27 env_pnacl_cc_calling.Append( | 31 env_pnacl_cc_calling.Append( |
| 28 CCFLAGS=['-Xtranslator', '--cc-rewrite'], | 32 CCFLAGS=['-Xtranslator', '--cc-rewrite'], |
| 29 # force invoked functions to have "gcc" prefix | 33 # force invoked functions to have "gcc" prefix |
| 30 CPPDEFINES=['INVOCATION_PREFIX=gcc']) | 34 CPPDEFINES=['INVOCATION_PREFIX=gcc']) |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 for name, objs in TARGETS: | 93 for name, objs in TARGETS: |
| 90 nexe = env_pnacl_cc.ComponentProgram('callingconv_ppapi_%s' % name, | 94 nexe = env_pnacl_cc.ComponentProgram('callingconv_ppapi_%s' % name, |
| 91 objs, | 95 objs, |
| 92 EXTRA_LIBS=['${NONIRT_LIBS}']) | 96 EXTRA_LIBS=['${NONIRT_LIBS}']) |
| 93 test= env.CommandSelLdrTestNacl('callingconv_ppapi_%s.out' % name, | 97 test= env.CommandSelLdrTestNacl('callingconv_ppapi_%s.out' % name, |
| 94 nexe, | 98 nexe, |
| 95 stdout_golden=env.File('golden.out')) | 99 stdout_golden=env.File('golden.out')) |
| 96 env.AddNodeToTestSuite(test, | 100 env.AddNodeToTestSuite(test, |
| 97 ['medium_tests', 'nonpexe_tests'], | 101 ['medium_tests', 'nonpexe_tests'], |
| 98 'run_callingconv_ppapi_%s_test' % name) | 102 'run_callingconv_ppapi_%s_test' % name) |
| OLD | NEW |