Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Side by Side Diff: mojo/nacl/nonsfi/BUILD.gn

Issue 1382713002: Creating a pexe content handler to translate and run pexes. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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.
11 # Additionally, PNaCl pexes assume 32-bit pointers. 11 # Additionally, PNaCl pexes assume 32-bit pointers.
12 executable("monacl_shell_nonsfi") { 12 executable("monacl_shell_nonsfi") {
13 testonly = true 13 testonly = true
14 sources = [ 14 sources = [
15 "monacl_shell_nonsfi.cc", 15 "monacl_shell_nonsfi.cc",
16 ] 16 ]
17 deps = [ 17 deps = [
18 ":irt_mojo_nonsfi", 18 ":irt_mojo_nonsfi",
19 "//mojo/edk/system", 19 "//mojo/edk/system",
20 "//mojo/gles2:mgl",
21 "//mojo/public/cpp/environment:standalone", 20 "//mojo/public/cpp/environment:standalone",
22 "//native_client/src/nonsfi/loader:elf_loader", 21 "//native_client/src/nonsfi/loader:elf_loader",
23 ] 22 ]
24 } 23 }
25 } 24 }
26 } 25 }
27 26
28 group("monacl_shell_nonsfi_x86") { 27 group("monacl_shell_nonsfi_x86") {
29 testonly = true 28 testonly = true
30 deps = [] 29 deps = []
31 if ((target_cpu == "x64" || target_cpu == "x86") && is_linux) { 30 if ((target_cpu == "x64" || target_cpu == "x86") && is_linux) {
32 # Even when Mojo is built for x86-64 by default, we want to use x86-32 31 # Even when Mojo is built for x86-64 by default, we want to use x86-32
33 # for running programs under Non-SFI NaCl. 32 # for running programs under Non-SFI NaCl.
34 # The toolchain is hardcoded as 32-bit clang here -- although it must 33 # The toolchain is hardcoded as 32-bit clang here -- although it must
35 # be 32 bit (for nonsfi), it assumes clang. Ideally, the toolchain would 34 # be 32 bit (for nonsfi), it assumes clang. Ideally, the toolchain would
36 # be defined as the 32 bit variant of whatever is being used (be it clang, 35 # be defined as the 32 bit variant of whatever is being used (be it clang,
37 # gcc, or something else). 36 # gcc, or something else).
38 deps += [ ":monacl_shell_nonsfi(//build/toolchain/linux:clang_x86)" ] 37 deps += [ ":monacl_shell_nonsfi(//build/toolchain/linux:clang_x86)" ]
39 } 38 }
40 } 39 }
41 40
42 static_library("irt_mojo_nonsfi") { 41 static_library("irt_mojo_nonsfi") {
43 sources = [ 42 sources = [
44 "irt_mojo_nonsfi.cc", 43 "irt_mojo_nonsfi.cc",
45 "irt_mojo_nonsfi.h", 44 "irt_mojo_nonsfi.h",
45 "irt_pnacl_translator_compile.cc",
46 "irt_pnacl_translator_link.cc",
47 "irt_resource_open.cc",
46 "nexe_launcher_nonsfi.cc", 48 "nexe_launcher_nonsfi.cc",
47 ] 49 ]
48 50
49 deps = [ 51 deps = [
50 "//base", 52 "//base",
51 "//mojo/public/c/gpu:MGL", 53 "//mojo/public/c/gpu:MGL",
52 "//mojo/public/c/gpu:MGL_onscreen", 54 "//mojo/public/c/gpu:MGL_onscreen",
53 "//mojo/public/c/gpu:MGL_signal_sync_point", 55 "//mojo/public/c/gpu:MGL_signal_sync_point",
54 "//mojo/public/c/system", 56 "//mojo/public/c/system",
57 "//mojo/public/cpp/utility",
55 "//mojo/public/platform/nacl:mojo_irt_header", 58 "//mojo/public/platform/nacl:mojo_irt_header",
59 "//mojo/public/platform/native:mgl_thunks",
60 "//mojo/public/platform/native:mgl_onscreen_thunks",
56 "//native_client/src/nonsfi/irt:irt_interfaces", 61 "//native_client/src/nonsfi/irt:irt_interfaces",
62 "//services/nacl:pnacl_translator_bindings",
57 ] 63 ]
58 } 64 }
59 65
60 group("mojo_nacl_nonsfi") { 66 group("mojo_nacl_nonsfi") {
61 deps = [ 67 deps = [
62 "//services/nacl:nacl_content_handler_nonsfi", 68 "//services/nacl:content_handler_nonsfi",
63 ] 69 ]
64 } 70 }
65 71
66 group("mojo_pnacl_tests") { 72 group("mojo_pnacl_tests") {
67 testonly = true 73 testonly = true
68 public_deps = [ 74 public_deps = [
69 "//mojo/nacl:monacl_test(//build/toolchain/nacl:newlib_pnacl)", 75 "//mojo/nacl:monacl_test(//build/toolchain/nacl:newlib_pnacl)",
70 ] 76 ]
71 } 77 }
72 78
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 nexe_path = "$root_out_dir/monacl_test_nonsfi" 120 nexe_path = "$root_out_dir/monacl_test_nonsfi"
115 input = "${nexe_path}.nexe" 121 input = "${nexe_path}.nexe"
116 inputs = [ 122 inputs = [
117 input, 123 input,
118 ] 124 ]
119 output = "${nexe_path}.mojo" 125 output = "${nexe_path}.mojo"
120 outputs = [ 126 outputs = [
121 output, 127 output,
122 ] 128 ]
123 129
124 line = "#!mojo mojo:nacl_content_handler_nonsfi" 130 line = "#!mojo mojo:content_handler_nonsfi_nexe"
125 args = [ 131 args = [
126 "--input=" + rebase_path(input, root_build_dir), 132 "--input=" + rebase_path(input, root_build_dir),
127 "--output=" + rebase_path(output, root_build_dir), 133 "--output=" + rebase_path(output, root_build_dir),
128 "--line=$line", 134 "--line=$line",
129 ] 135 ]
130 deps = [ 136 deps = [
131 ":translate_mojo_pnacl_tests_to_native", 137 ":translate_mojo_pnacl_tests_to_native",
132 ] 138 ]
133 } 139 }
134 140
135 group("monacl_test_nonsfi_nexes") { 141 group("monacl_test_nonsfi_nexes") {
136 testonly = true 142 testonly = true
137 deps = [ 143 deps = [
138 ":translate_mojo_pnacl_tests_to_native", 144 ":translate_mojo_pnacl_tests_to_native",
139 ":prepend_shebang_to_nexe", 145 ":prepend_shebang_to_nexe",
140 ] 146 ]
141 } 147 }
142 148
143 group("mojo_nacl_tests_nonsfi") { 149 group("mojo_nacl_tests_nonsfi") {
144 testonly = true 150 testonly = true
145 deps = [ 151 deps = [
146 ":monacl_shell_nonsfi_x86", 152 ":monacl_shell_nonsfi_x86",
147 ":monacl_test_nonsfi_nexes", 153 ":monacl_test_nonsfi_nexes",
148 ] 154 ]
149 } 155 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698