OLD | NEW |
1 # -*- python -*- | 1 # -*- python -*- |
2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2011 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 # PNaCl doesn't have -finstrument-for-thread-suspension currently | 8 # PNaCl doesn't have -finstrument-for-thread-suspension currently |
9 if not env.Bit('bitcode'): | 9 if not env.Bit('bitcode'): |
10 inputs = ['gc_noinst.c'] | 10 inputs = ['gc_noinst.c'] |
11 | 11 |
12 # Compile gc_instrumentation.c with -finstrument-for-thread-suspension | 12 # Compile gc_instrumentation.c with -finstrument-for-thread-suspension |
13 env_inst = env.Clone() | 13 env_inst = env.Clone() |
14 env_inst.Append(CFLAGS=['-finstrument-for-thread-suspension']) | 14 env_inst.Append(CFLAGS=['-finstrument-for-thread-suspension']) |
15 inputs += env_inst.ComponentObject('gc_instrumentation.c') | 15 inputs += env_inst.ComponentObject('gc_instrumentation.c') |
16 | 16 |
17 env.ComponentProgram('gc_instrumentation.nexe', inputs, | 17 nexe = env.ComponentProgram('gc_instrumentation', inputs, |
18 EXTRA_LIBS=['nacl_dyncode', 'pthread']) | 18 EXTRA_LIBS=['nacl_dyncode', 'pthread']) |
19 | 19 |
20 node = env.CommandSelLdrTestNacl( | 20 node = env.CommandSelLdrTestNacl('gc_instrumentation.out', nexe) |
21 'gc_instrumentation.out', | |
22 command=[env.File('gc_instrumentation.nexe')] ) | |
23 | 21 |
24 env.AddNodeToTestSuite(node, ['small_tests'], 'run_gc_instrumentation_test') | 22 env.AddNodeToTestSuite(node, ['small_tests'], 'run_gc_instrumentation_test') |
OLD | NEW |