| 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 if (current_cpu == "x86" || current_cpu == "arm") { | 9 if (current_cpu == "x86" || current_cpu == "arm") { |
| 10 # Non-SFI NaCl currently supports x86-32 and ARMv7, but not anything 64-bit. | 10 # Non-SFI NaCl currently supports x86-32 and ARMv7, but not anything 64-bit. |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 | 78 |
| 79 action("translate_mojo_pnacl_tests_to_native") { | 79 action("translate_mojo_pnacl_tests_to_native") { |
| 80 testonly = true | 80 testonly = true |
| 81 | 81 |
| 82 # Leaving default as linux for OSes which are similar to linux, but do | 82 # Leaving default as linux for OSes which are similar to linux, but do |
| 83 # not self-identify as linux through host_os. | 83 # not self-identify as linux through host_os. |
| 84 nacl_toolchain_host_os = "linux" | 84 nacl_toolchain_host_os = "linux" |
| 85 if (host_os == "mac") { | 85 if (host_os == "mac") { |
| 86 nacl_toolchain_host_os = "mac" | 86 nacl_toolchain_host_os = "mac" |
| 87 } | 87 } |
| 88 script = rebase_path("//") + "native_client/toolchain/${nacl_toolchain_host_os
}_x86/pnacl_newlib/bin/pydir/loader.py" | 88 script = rebase_path( |
| 89 input = rebase_path(root_build_dir) + "/newlib_pnacl/monacl_test.pexe" | 89 "//native_client/toolchain/${nacl_toolchain_host_os}_x86/pnacl_newlib/
bin/pydir/loader.py") |
| 90 input = rebase_path("${root_build_dir}/newlib_pnacl/monacl_test.pexe") |
| 90 inputs = [ | 91 inputs = [ |
| 91 input, | 92 input, |
| 92 ] | 93 ] |
| 93 output = "monacl_test_nonsfi.nexe" | 94 output = "monacl_test_nonsfi.nexe" |
| 94 outputs = [ | 95 outputs = [ |
| 95 "$root_out_dir/${output}", | 96 "$root_out_dir/${output}", |
| 96 ] | 97 ] |
| 97 args = [ | 98 args = [ |
| 98 "pnacl-translate", | 99 "pnacl-translate", |
| 99 "$input", | 100 "$input", |
| 100 "-o", | 101 "-o", |
| 101 "$output", | 102 "$output", |
| 102 "-arch", | 103 "-arch", |
| 103 ] | 104 ] |
| 104 if (target_cpu == "x86" || target_cpu == "x64") { | 105 if (target_cpu == "x86" || target_cpu == "x64") { |
| 105 args += [ "x86-32-nonsfi" ] | 106 args += [ "x86-32-nonsfi" ] |
| 106 } else if (target_cpu == "arm") { | 107 } else if (target_cpu == "arm") { |
| 107 args += [ "arm-nonsfi" ] | 108 args += [ "arm-nonsfi" ] |
| 108 } else { | 109 } else { |
| 109 assert(false, "Unrecognized target CPU for Non-SFI NaCl translation") | 110 assert(false, "Unrecognized target CPU for Non-SFI NaCl translation") |
| 110 } | 111 } |
| 111 deps = [ | 112 deps = [ |
| 112 ":mojo_pnacl_tests", | 113 ":mojo_pnacl_tests", |
| 113 ] | 114 ] |
| 114 } | 115 } |
| 115 | 116 |
| 116 action("prepend_shebang_to_nexe") { | 117 action("prepend_shebang_to_nexe") { |
| 117 testonly = true | 118 testonly = true |
| 118 | 119 |
| 119 script = rebase_path("//") + "mojo/public/tools/prepend.py" | 120 script = rebase_path("//mojo/public/tools/prepend.py") |
| 120 nexe_path = "$root_out_dir/monacl_test_nonsfi" | 121 nexe_path = "$root_out_dir/monacl_test_nonsfi" |
| 121 input = "${nexe_path}.nexe" | 122 input = "${nexe_path}.nexe" |
| 122 inputs = [ | 123 inputs = [ |
| 123 input, | 124 input, |
| 124 ] | 125 ] |
| 125 output = "${nexe_path}.mojo" | 126 output = "${nexe_path}.mojo" |
| 126 outputs = [ | 127 outputs = [ |
| 127 output, | 128 output, |
| 128 ] | 129 ] |
| 129 | 130 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 146 ] | 147 ] |
| 147 } | 148 } |
| 148 | 149 |
| 149 group("mojo_nacl_tests_nonsfi") { | 150 group("mojo_nacl_tests_nonsfi") { |
| 150 testonly = true | 151 testonly = true |
| 151 deps = [ | 152 deps = [ |
| 152 ":monacl_shell_nonsfi_x86", | 153 ":monacl_shell_nonsfi_x86", |
| 153 ":monacl_test_nonsfi_nexes", | 154 ":monacl_test_nonsfi_nexes", |
| 154 ] | 155 ] |
| 155 } | 156 } |
| OLD | NEW |