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

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

Issue 1341873002: Enabling 64-bit mojo shell to launch 32-bit child to handle nonsfi content. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Anonymous namespaces and modified target names 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 | shell/BUILD.gn » ('j') | 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 import("//mojo/public/mojo_application.gni") 5 import("//mojo/public/mojo_application.gni")
6 6
7 # Trusted code 7 # Trusted code
8 if (!is_nacl) { 8 if (!is_nacl) {
9 mojo_native_application("nacl_content_handler") { 9 mojo_native_application("nacl_content_handler") {
10 sources = [ 10 sources = [
11 "content_handler_main.cc", 11 "content_handler_main.cc",
12 ] 12 ]
13 13
14 deps = [ 14 deps = [
15 "//base", 15 "//base",
16 "//mojo/application:application", 16 "//mojo/application:application",
17 "//mojo/application:content_handler", 17 "//mojo/application:content_handler",
18 "//mojo/data_pipe_utils", 18 "//mojo/data_pipe_utils",
19 "//mojo/message_pump", 19 "//mojo/message_pump",
20 "//mojo/public/platform/native:system_impl_private", 20 "//mojo/public/platform/native:system_impl_private",
21 "//mojo/services/network/public/interfaces", 21 "//mojo/services/network/public/interfaces",
22 "//nacl_bindings:monacl_sel", 22 "//nacl_bindings:monacl_sel",
23 "//url", 23 "//url",
24 ] 24 ]
25 25
26 data_deps = [ "//nacl_bindings:irt_mojo(//native_client/build/toolchain/nacl :irt_${target_cpu})" ] 26 data_deps = [ "//nacl_bindings:irt_mojo(//native_client/build/toolchain/nacl :irt_${target_cpu})" ]
27 } 27 }
28 28
29 mojo_native_application("nacl_content_handler_nonsfi") { 29 if (current_cpu == "x86") {
30 sources = [ 30 # Non-SFI NaCl can only be executed by a 32-bit process, so our
31 "content_handler_main_nonsfi.cc", 31 # content handler must be built and launched as a 32-bit process as well.
32 ] 32 mojo_native_application("nacl_content_handler_nonsfi_32_bit") {
33 sources = [
34 "content_handler_main_nonsfi.cc",
35 ]
33 36
34 deps = [ 37 deps = [
35 "//base", 38 "//base",
36 "//mojo/application:application", 39 "//mojo/application:application",
37 "//mojo/application:content_handler", 40 "//mojo/application:content_handler",
38 "//mojo/data_pipe_utils", 41 "//mojo/data_pipe_utils",
39 "//mojo/message_pump", 42 "//mojo/message_pump",
40 "//mojo/nacl:irt_mojo_nonsfi", 43 "//mojo/nacl:irt_mojo_nonsfi",
41 "//mojo/public/cpp/application:application", 44 "//mojo/public/cpp/application:application",
42 "//native_client/src/nonsfi/loader:elf_loader", 45 "//native_client/src/nonsfi/loader:elf_loader",
43 ] 46 ]
47 }
48
49 # Copy to the root build directory so that the '#!' prefix line for invoking
50 # our content handler can simply be "mojo:nacl_content_handler_nonsfi".
51 copy("nacl_content_handler_nonsfi_copy") {
52 sources = [
53 "${root_out_dir}/nacl_content_handler_nonsfi_32_bit.mojo",
54 ]
55 outputs = [
56 "${root_build_dir}/nacl_content_handler_nonsfi.mojo",
57 ]
58 deps = [
59 ":nacl_content_handler_nonsfi_32_bit",
60 ]
61 }
44 } 62 }
45 } 63 }
64
65 # This group serves as a 64 to 32 bit transformation for Linux. If we are
66 # using a 64 bit toolchain, build the nonsfi nacl content handler as 32 bit.
67 group("nacl_content_handler_nonsfi") {
68 deps = []
69 if ((target_cpu == "x64" || target_cpu == "x86") && is_linux) {
70 # The toolchain is hardcoded as 32-bit clang here -- although it must
71 # be 32 bit (for nonsfi), it assumes clang. Ideally, the toolchain would
72 # be defined as the 32 bit variant of whatever is being used (be it clang,
73 # gcc, or something else).
74 deps += [ ":nacl_content_handler_nonsfi_copy(//build/toolchain/linux:clang_x 86)" ]
75 }
76 }
OLDNEW
« no previous file with comments | « no previous file | shell/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698