Chromium Code Reviews| 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 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 # Nonsfi nacl can only be executed by a 32-bit process, so our |
|
Petr Hosek
2015/09/14 19:13:51
Nit: "Non-SFI NaCl" instead of "Nonsfi nacl".
Sean Klein
2015/09/15 18:37:50
Done.
| |
| 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") { |
| 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 our content handler prefixed line | |
|
Mark Seaborn
2015/09/14 18:38:58
How about: "so that the '#!' prefix line for invok
Sean Klein
2015/09/15 18:37:50
Done.
| |
| 50 # can simply be "mojo:nacl_content_handler_nonsfi". | |
| 51 if ("${root_out_dir}" != "${root_build_dir}") { | |
|
Petr Hosek
2015/09/14 19:13:51
Do you really need this? To check that you're not
Sean Klein
2015/09/15 18:37:50
I updated things to use a different naming convent
| |
| 52 copy("nacl_content_handler_nonsfi_copy") { | |
| 53 sources = [ | |
| 54 "${root_out_dir}/nacl_content_handler_nonsfi.mojo", | |
| 55 ] | |
| 56 outputs = [ | |
| 57 "${root_build_dir}/{{source_file_part}}", | |
| 58 ] | |
| 59 deps = [ | |
| 60 ":nacl_content_handler_nonsfi", | |
| 61 ] | |
| 62 } | |
| 63 } | |
| 44 } | 64 } |
| 45 } | 65 } |
| 66 | |
| 67 # This group serves as a 64 to 32 bit transformation for Linux. If we are | |
| 68 # using a 64 bit toolchain, build the nonsfi nacl content handler as 32 bit. | |
| 69 group("nacl_content_handler_nonsfi_x86") { | |
|
Petr Hosek
2015/09/14 19:13:51
I'd suggest naming the group `nacl_content_handler
Sean Klein
2015/09/15 18:37:50
Done.
| |
| 70 deps = [] | |
| 71 if (target_cpu == "x64" && is_linux) { | |
| 72 deps += [ ":nacl_content_handler_nonsfi_copy(//build/toolchain/linux:clang_x 86)" ] | |
|
Mark Seaborn
2015/09/14 18:38:58
See other comment -- comment to warn about assumin
Sean Klein
2015/09/15 18:37:50
Done.
| |
| 73 } else if (target_cpu == "x86" && is_linux) { | |
| 74 deps += | |
| 75 [ ":nacl_content_handler_nonsfi(//build/toolchain/linux:clang_x86)" ] | |
|
Petr Hosek
2015/09/14 19:13:51
What if the default toolchain is glibc_x86? Then t
Sean Klein
2015/09/15 18:37:50
Although this is untested, the new dependency on t
| |
| 76 } | |
| 77 } | |
| OLD | NEW |