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

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

Issue 1327913004: Added 32-bit version of nonsfi monacl shell (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 3 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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") {
24 testonly = true 24 # Non-SFI NaCl currently supports x86-32 but not x86-64. Additionally,
25 sources = [ 25 # PNaCl pexes assume 32-bit pointers.
26 "monacl_shell_nonsfi.cc", 26 executable("monacl_shell_nonsfi") {
27 ] 27 testonly = true
28 deps = [ 28 sources = [
29 ":irt_mojo_nonsfi", 29 "monacl_shell_nonsfi.cc",
30 "//mojo/edk/system", 30 ]
31 "//native_client/src/nonsfi/loader:elf_loader", 31 deps = [
32 ] 32 ":irt_mojo_nonsfi",
33 "//mojo/edk/system",
34 "//native_client/src/nonsfi/loader:elf_loader",
35 ]
36 }
33 } 37 }
34 } 38 }
35 39
40 group("monacl_shell_nonsfi_x86") {
41 testonly = true
42 deps = []
43 if ((target_cpu == "x64" || target_cpu == "x86") && is_linux) {
44 # Even when Mojo is built for x86-64 by default, we want to use x86-32
45 # for running programs under Non-SFI NaCl.
46 # The toolchain is hardcoded as 32-bit clang here -- although it must
47 # be 32 bit (for nonsfi), it assumes clang. Ideally, the toolchain would
48 # be defined as the 32 bit variant of whatever is being used (be it clang,
49 # gcc, or something else).
50 deps += [ ":monacl_shell_nonsfi(//build/toolchain/linux:clang_x86)" ]
51 }
52 }
53
36 # Untrusted code 54 # Untrusted code
37 if (is_nacl) { 55 if (is_nacl) {
38 # Unit test for the Mojo public API. 56 # Unit test for the Mojo public API.
39 executable("monacl_test") { 57 executable("monacl_test") {
40 testonly = true 58 testonly = true
41 sources = [ 59 sources = [
42 "//mojo/public/cpp/system/tests/core_unittest.cc", 60 "//mojo/public/cpp/system/tests/core_unittest.cc",
43 "//mojo/public/cpp/system/tests/macros_unittest.cc", 61 "//mojo/public/cpp/system/tests/macros_unittest.cc",
44 ] 62 ]
45 deps = [ 63 deps = [
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 deps = [ 115 deps = [
98 ":monacl_test(//native_client/build/toolchain/nacl:newlib_pnacl)", 116 ":monacl_test(//native_client/build/toolchain/nacl:newlib_pnacl)",
99 ] 117 ]
100 } 118 }
101 119
102 group("mojo_nacl_tests") { 120 group("mojo_nacl_tests") {
103 testonly = true 121 testonly = true
104 deps = [ 122 deps = [
105 ":mojo_nacl_tests_untrusted(//native_client/build/toolchain/nacl:clang_newli b_${current_cpu})", 123 ":mojo_nacl_tests_untrusted(//native_client/build/toolchain/nacl:clang_newli b_${current_cpu})",
106 ":monacl_shell", 124 ":monacl_shell",
125 ":monacl_shell_nonsfi_x86",
107 ":mojo_pnacl_tests", 126 ":mojo_pnacl_tests",
108 ] 127 ]
109 } 128 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698