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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 "//native_client/src/untrusted/nacl:imc_syscalls", |
69 ":mojo_nacl_codegen($default_toolchain)", | 70 ":mojo_nacl_codegen($default_toolchain)", |
70 ] | 71 ] |
71 } | 72 } |
72 | 73 |
73 # Unit test for the Mojo public API. | 74 # Unit test for the Mojo public API. |
74 executable("monacl_test") { | 75 executable("monacl_test") { |
75 testonly = true | 76 testonly = true |
76 sources = [ | 77 sources = [ |
77 "//mojo/public/cpp/system/tests/core_unittest.cc", | 78 "//mojo/public/cpp/system/tests/core_unittest.cc", |
78 "//mojo/public/cpp/system/tests/macros_unittest.cc", | 79 "//mojo/public/cpp/system/tests/macros_unittest.cc", |
79 ] | 80 ] |
80 deps = [ | 81 deps = [ |
81 "//native_client/src/untrusted/nacl:imc_syscalls", | |
82 "//mojo/public/c/system/tests:tests", | 82 "//mojo/public/c/system/tests:tests", |
83 "//mojo/public/cpp/system:system", | 83 "//mojo/public/cpp/system:system", |
84 "//testing/gtest:gtest", | 84 "//testing/gtest:gtest", |
85 "//testing/gtest:gtest_main", | 85 "//testing/gtest:gtest_main", |
86 ":mojo", | 86 ":mojo", |
87 ] | 87 ] |
88 } | 88 } |
89 | 89 |
90 executable("irt_mojo") { | 90 executable("irt_mojo") { |
91 cflags_c = [ "-std=c99" ] | 91 cflags_c = [ "-std=c99" ] |
(...skipping 14 matching lines...) Expand all Loading... |
106 ] | 106 ] |
107 } | 107 } |
108 | 108 |
109 group("mojo_nacl_tests") { | 109 group("mojo_nacl_tests") { |
110 testonly = true | 110 testonly = true |
111 deps = [ | 111 deps = [ |
112 ":monacl_shell", | 112 ":monacl_shell", |
113 ":monacl_test(//native_client/build/toolchain/nacl:clang_newlib_${cpu_arch})
", | 113 ":monacl_test(//native_client/build/toolchain/nacl:clang_newlib_${cpu_arch})
", |
114 ] | 114 ] |
115 } | 115 } |
OLD | NEW |