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 if (not env.Bit('bitcode')): | 8 if (not env.Bit('bitcode')): |
9 flags = ['-mfpmath=sse', '-msse2', '-O3', '-ffast-math', | 9 flags = ['-mfpmath=sse', '-msse2', '-O3', '-ffast-math', |
10 '-fomit-frame-pointer'] | 10 '-fomit-frame-pointer'] |
11 env.Append(CCFLAGS=flags) | 11 env.Append(CCFLAGS=flags) |
12 env.Append(CXXFLAGS=flags) | 12 env.Append(CXXFLAGS=flags) |
13 | 13 |
14 earthlib = env.ComponentLibrary('earthlib', ['earth.cc']) | 14 earthlib = env.ComponentLibrary('earthlib', ['earth.cc']) |
15 | 15 |
16 # build, C then C++ | 16 # build, C then C++ |
17 cobj=['pepper_c.c'] | 17 cobj=['pepper_c.c'] |
18 c_nexe_name = 'earth_c_%s' % env.get('TARGET_FULLARCH') | 18 c_nexe_name = 'earth_c_%s' % env.get('TARGET_FULLARCH') |
19 cnexe = env.ComponentProgram(c_nexe_name, cobj, | 19 cnexe = env.ComponentProgram(c_nexe_name, cobj, |
20 EXTRA_LIBS=['earthlib', | 20 EXTRA_LIBS=['earthlib', |
21 '${PPAPI_LIBS}', | 21 '${PPAPI_LIBS}', |
22 'm', 'pthread']) | 22 'm', 'pthread']) |
23 env.Publish(c_nexe_name, 'run', ['earth_c.html', 'earth_c.nmf']) | 23 env.Publish(c_nexe_name, 'run', ['earth_c.html']) |
24 | 24 |
25 node = env.DemoSelLdrNacl('demo_earth_c', cnexe, args=[]) | 25 node = env.DemoSelLdrNacl('demo_earth_c', cnexe, args=[]) |
26 # Note: Make this available from top level | 26 # Note: Make this available from top level |
27 Alias('demo_earth_c', node) | 27 Alias('demo_earth_c', node) |
28 | 28 |
29 ccobj=['pepper_cc.cc'] | 29 ccobj=['pepper_cc.cc'] |
30 cc_nexe_name = 'earth_cc_%s' % env.get('TARGET_FULLARCH') | 30 cc_nexe_name = 'earth_cc_%s' % env.get('TARGET_FULLARCH') |
31 ccnexe = env.ComponentProgram(cc_nexe_name, ccobj, | 31 ccnexe = env.ComponentProgram(cc_nexe_name, ccobj, |
32 EXTRA_LIBS=['earthlib', | 32 EXTRA_LIBS=['earthlib', |
33 '${PPAPI_LIBS}', | 33 '${PPAPI_LIBS}', |
34 'ppapi_cpp', | 34 'ppapi_cpp', |
35 'm', 'pthread']) | 35 'm', 'pthread']) |
36 env.Publish(cc_nexe_name, 'run', ['earth_cc.html', 'earth_cc.nmf']) | 36 env.Publish(cc_nexe_name, 'run', ['earth_cc.html']) |
37 | 37 |
38 node = env.DemoSelLdrNacl('demo_earth_cc', ccnexe, args=[]) | 38 node = env.DemoSelLdrNacl('demo_earth_cc', ccnexe, args=[]) |
39 # Note: Make this available from top level | 39 # Note: Make this available from top level |
40 Alias('demo_earth_cc', node) | 40 Alias('demo_earth_cc', node) |
41 | 41 |
42 | 42 |
43 # Validator tests, C then C++, but not for glibc | 43 # Validator tests, C then C++, but not for glibc |
44 # TODO(bradchen): enable these tests when ncval works with glibc DSOs | 44 # TODO(bradchen): enable these tests when ncval works with glibc DSOs |
45 if not env.Bit('nacl_glibc'): | 45 if not env.Bit('nacl_glibc'): |
46 node = env.CommandValidatorTestNacl( | 46 node = env.CommandValidatorTestNacl( |
(...skipping 11 matching lines...) Expand all Loading... |
58 | 58 |
59 # TODO(robertm): enable arm support ASAP | 59 # TODO(robertm): enable arm support ASAP |
60 if env.Bit('target_arm'): | 60 if env.Bit('target_arm'): |
61 Return() | 61 Return() |
62 | 62 |
63 # browser tests, C then C++ | 63 # browser tests, C then C++ |
64 | 64 |
65 node = env.PPAPIBrowserTester( | 65 node = env.PPAPIBrowserTester( |
66 'earth_browser_test_c.out', | 66 'earth_browser_test_c.out', |
67 url='earth_c.html', | 67 url='earth_c.html', |
| 68 nmfs=['earth_c.nmf'], |
68 files=[cnexe, | 69 files=[cnexe, |
69 env.File('earth_c.html'), | 70 env.File('earth_c.html'), |
70 env.File('earth_c.nmf'), | 71 env.File('earth_c.nmf'), |
71 ] | 72 ] |
72 ) | 73 ) |
73 | 74 |
74 env.AddNodeToTestSuite(node, ['chrome_browser_tests'], 'earth_browser_test_c') | 75 env.AddNodeToTestSuite(node, ['chrome_browser_tests'], 'earth_browser_test_c', |
| 76 is_broken=env.Bit('nacl_glibc')) |
75 | 77 |
76 node = env.PPAPIBrowserTester( | 78 node = env.PPAPIBrowserTester( |
77 'earth_browser_test_cc.out', | 79 'earth_browser_test_cc.out', |
78 url='earth_cc.html', | 80 url='earth_cc.html', |
| 81 nmfs=['earth_cc.nmf'], |
79 files=[ccnexe, | 82 files=[ccnexe, |
80 env.File('earth_cc.html'), | 83 env.File('earth_cc.html'), |
81 env.File('earth_cc.nmf'), | 84 env.File('earth_cc.nmf'), |
82 ] | 85 ] |
83 ) | 86 ) |
84 | 87 |
85 env.AddNodeToTestSuite(node, ['chrome_browser_tests'], 'earth_browser_test_cc') | 88 env.AddNodeToTestSuite(node, ['chrome_browser_tests'], 'earth_browser_test_cc', |
| 89 is_broken=env.Bit('nacl_glibc')) |
OLD | NEW |