OLD | NEW |
1 # All toolchains use the same generated code. | 1 # All toolchains use the same generated code. |
2 gen_dir = "$root_build_dir/gen/mojo/nacl" | 2 gen_dir = "$root_build_dir/gen/mojo/nacl" |
3 | 3 |
4 # Only allow the generator to be run by one toolchain. | 4 # Only allow the generator to be run by one toolchain. |
5 if (current_toolchain == default_toolchain) { | 5 if (current_toolchain == default_toolchain) { |
6 # Generate the code to plumb the Mojo public API into the NaCl sandbox. | 6 # Generate the code to plumb the Mojo public API into the NaCl sandbox. |
7 action("mojo_nacl_codegen") { | 7 action("mojo_nacl_codegen") { |
8 script = "generator/generate_nacl_bindings.py" | 8 script = "generator/generate_nacl_bindings.py" |
9 args = [ | 9 args = [ |
10 "-d", | 10 "-d", |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 | 45 |
46 # A simple shell for running untrusted binaries that talk to the Mojo | 46 # A simple shell for running untrusted binaries that talk to the Mojo |
47 # embedder. (No services.) | 47 # embedder. (No services.) |
48 executable("monacl_shell") { | 48 executable("monacl_shell") { |
49 testonly = true | 49 testonly = true |
50 sources = [ | 50 sources = [ |
51 "monacl_shell.cc", | 51 "monacl_shell.cc", |
52 ] | 52 ] |
53 deps = [ | 53 deps = [ |
54 "//base:base", | 54 "//base:base", |
55 "//mojo/edk/system:system", | 55 "//third_party/mojo/src/mojo/edk/system:system", |
56 ":monacl_sel", | 56 ":monacl_sel", |
57 ] | 57 ] |
58 } | 58 } |
59 } | 59 } |
60 | 60 |
61 # Untrusted code | 61 # Untrusted code |
62 if (is_nacl) { | 62 if (is_nacl) { |
63 # Thunk mapping the Mojo public API onto NaCl syscalls. | 63 # Thunk mapping the Mojo public API onto NaCl syscalls. |
64 static_library("mojo") { | 64 static_library("mojo") { |
65 sources = [ | 65 sources = [ |
66 "$gen_dir/libmojo.cc", | 66 "$gen_dir/libmojo.cc", |
67 ] | 67 ] |
68 deps = [ | 68 deps = [ |
69 ":mojo_nacl_codegen($default_toolchain)", | 69 ":mojo_nacl_codegen($default_toolchain)", |
70 ] | 70 ] |
71 } | 71 } |
72 | 72 |
73 # Unit test for the Mojo public API. | 73 # Unit test for the Mojo public API. |
74 executable("monacl_test") { | 74 executable("monacl_test") { |
75 testonly = true | 75 testonly = true |
76 sources = [ | 76 sources = [ |
77 "//mojo/public/cpp/system/tests/core_unittest.cc", | 77 "//third_party/mojo/src/mojo/public/cpp/system/tests/core_unittest.cc", |
78 "//mojo/public/cpp/system/tests/macros_unittest.cc", | 78 "//third_party/mojo/src/mojo/public/cpp/system/tests/macros_unittest.cc", |
79 ] | 79 ] |
80 deps = [ | 80 deps = [ |
81 "//native_client/src/untrusted/nacl:imc_syscalls", | 81 "//native_client/src/untrusted/nacl:imc_syscalls", |
82 "//mojo/public/c/system/tests:tests", | |
83 "//mojo/public/cpp/system:system", | |
84 "//testing/gtest:gtest", | 82 "//testing/gtest:gtest", |
85 "//testing/gtest:gtest_main", | 83 "//testing/gtest:gtest_main", |
| 84 "//third_party/mojo/src/mojo/public/c/system/tests:tests", |
| 85 "//third_party/mojo/src/mojo/public/cpp/system:system", |
86 ":mojo", | 86 ":mojo", |
87 ] | 87 ] |
88 } | 88 } |
89 } | 89 } |
90 | 90 |
91 group("mojo_nacl") { | 91 group("mojo_nacl") { |
92 deps = [ | 92 deps = [ |
93 "//native_client/src/untrusted/irt:irt_core(//native_client/build/toolchain/
nacl:irt_${cpu_arch})", | 93 "//native_client/src/untrusted/irt:irt_core(//native_client/build/toolchain/
nacl:irt_${cpu_arch})", |
94 ] | 94 ] |
95 } | 95 } |
96 | 96 |
97 group("mojo_nacl_tests") { | 97 group("mojo_nacl_tests") { |
98 testonly = true | 98 testonly = true |
99 deps = [ | 99 deps = [ |
100 ":monacl_shell", | 100 ":monacl_shell", |
101 ":monacl_test(//native_client/build/toolchain/nacl:clang_newlib_${cpu_arch})
", | 101 ":monacl_test(//native_client/build/toolchain/nacl:clang_newlib_${cpu_arch})
", |
102 ] | 102 ] |
103 } | 103 } |
OLD | NEW |