OLD | NEW |
---|---|
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # Trusted code | 5 # Trusted code |
6 if (!is_nacl) { | 6 if (!is_nacl) { |
7 # A simple shell for running untrusted binaries that talk to the Mojo | 7 # A simple shell for running untrusted binaries that talk to the Mojo |
8 # embedder. (No services.) | 8 # embedder. (No services.) |
9 executable("monacl_shell") { | 9 executable("monacl_shell") { |
10 testonly = true | 10 testonly = true |
11 sources = [ | 11 sources = [ |
12 "monacl_shell.cc", | 12 "monacl_shell.cc", |
13 ] | 13 ] |
14 deps = [ | 14 deps = [ |
15 "//base:base", | 15 "//base:base", |
16 "//mojo/edk/system:system", | 16 "//mojo/edk/system:system", |
17 "//nacl_bindings:monacl_sel", | 17 "//nacl_bindings:monacl_sel", |
18 ] | 18 ] |
19 | 19 |
20 data_deps = [ "//nacl_bindings:irt_mojo(//native_client/build/toolchain/nacl :irt_${target_cpu})" ] | 20 data_deps = [ "//nacl_bindings:irt_mojo(//native_client/build/toolchain/nacl :irt_${target_cpu})" ] |
21 } | 21 } |
22 | 22 |
23 executable("monacl_shell_nonsfi") { | 23 if (current_cpu == "x86") { |
Mark Seaborn
2015/09/09 19:13:14
Can you add a comment to explain the conditional?
Sean Klein
2015/09/09 19:32:33
Done.
| |
24 testonly = true | 24 executable("monacl_shell_nonsfi") { |
25 sources = [ | 25 testonly = true |
26 "monacl_shell_nonsfi.cc", | 26 sources = [ |
27 ] | 27 "monacl_shell_nonsfi.cc", |
28 deps = [ | 28 ] |
29 ":irt_mojo_nonsfi", | 29 deps = [ |
30 "//mojo/edk/system", | 30 ":irt_mojo_nonsfi", |
31 "//native_client/src/nonsfi/loader:elf_loader", | 31 "//mojo/edk/system", |
32 ] | 32 "//native_client/src/nonsfi/loader:elf_loader", |
33 ] | |
34 } | |
33 } | 35 } |
34 } | 36 } |
35 | 37 |
38 group("monacl_shell_nonsfi_x86") { | |
39 testonly = true | |
40 deps = [] | |
41 if ((target_cpu == "x64" || target_cpu == "x86") && is_linux) { | |
Mark Seaborn
2015/09/09 19:13:14
A similar explanatory comment would be good here:
Sean Klein
2015/09/09 19:32:33
Done.
| |
42 # The toolchain is hardcoded as 32-bit clang here -- although it must | |
43 # be 32 bit (for nonsfi), it assumes clang. Ideally, the toolchain would | |
44 # be defined as the 32 bit variant of whatever is being used (be it clang, | |
45 # gcc, or something else). | |
46 deps += [ ":monacl_shell_nonsfi(//build/toolchain/linux:clang_x86)" ] | |
47 } | |
48 } | |
49 | |
36 # Untrusted code | 50 # Untrusted code |
37 if (is_nacl) { | 51 if (is_nacl) { |
38 # Unit test for the Mojo public API. | 52 # Unit test for the Mojo public API. |
39 executable("monacl_test") { | 53 executable("monacl_test") { |
40 testonly = true | 54 testonly = true |
41 sources = [ | 55 sources = [ |
42 "//mojo/public/cpp/system/tests/core_unittest.cc", | 56 "//mojo/public/cpp/system/tests/core_unittest.cc", |
43 "//mojo/public/cpp/system/tests/macros_unittest.cc", | 57 "//mojo/public/cpp/system/tests/macros_unittest.cc", |
44 ] | 58 ] |
45 deps = [ | 59 deps = [ |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
97 deps = [ | 111 deps = [ |
98 ":monacl_test(//native_client/build/toolchain/nacl:newlib_pnacl)", | 112 ":monacl_test(//native_client/build/toolchain/nacl:newlib_pnacl)", |
99 ] | 113 ] |
100 } | 114 } |
101 | 115 |
102 group("mojo_nacl_tests") { | 116 group("mojo_nacl_tests") { |
103 testonly = true | 117 testonly = true |
104 deps = [ | 118 deps = [ |
105 ":mojo_nacl_tests_untrusted(//native_client/build/toolchain/nacl:clang_newli b_${current_cpu})", | 119 ":mojo_nacl_tests_untrusted(//native_client/build/toolchain/nacl:clang_newli b_${current_cpu})", |
106 ":monacl_shell", | 120 ":monacl_shell", |
121 ":monacl_shell_nonsfi_x86", | |
107 ":mojo_pnacl_tests", | 122 ":mojo_pnacl_tests", |
108 ] | 123 ] |
109 } | 124 } |
OLD | NEW |