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

Unified Diff: services/nacl/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: Added Mojom interface to communicate with translation nexes Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: services/nacl/BUILD.gn
diff --git a/services/nacl/BUILD.gn b/services/nacl/BUILD.gn
index 15c97d58832f282bbe2e16209ab26969d7bfa261..15864827693b2f58a9199a8d84729e4c5a95a093 100644
--- a/services/nacl/BUILD.gn
+++ b/services/nacl/BUILD.gn
@@ -3,6 +3,7 @@
# found in the LICENSE file.
import("//mojo/public/mojo_application.gni")
+import("//mojo/public/tools/bindings/mojom.gni")
# Trusted code
if (!is_nacl) {
@@ -32,6 +33,7 @@ if (!is_nacl) {
# Non-SFI NaCl can only be executed by a 32-bit process, so our
# content handler must be built and launched as a 32-bit process as well.
mojo_native_application("nacl_content_handler_nonsfi_32_bit") {
+ output_name = "nacl_content_handler_nonsfi_nexe"
sources = [
"content_handler_main_nonsfi.cc",
]
@@ -49,20 +51,85 @@ if (!is_nacl) {
"//native_client/src/nonsfi/loader:elf_loader",
]
}
+ mojo_native_application("nacl_content_handler_nonsfi_pexe_32_bit") {
Petr Hosek 2015/10/27 15:07:52 Nit: GN convention is to avoid duplicating the dir
Sean Klein 2015/10/28 17:02:41 Done.
+ output_name = "nacl_content_handler_nonsfi_pexe"
+ sources = [
+ "content_handler_main_nonsfi_pexe.cc",
+ ]
- # Copy to the root build directory so that the '#!' prefix line for invoking
- # our content handler can simply be "mojo:nacl_content_handler_nonsfi".
- copy("nacl_content_handler_nonsfi_copy") {
+ deps = [
+ ":pnacl_translator_bindings",
+ "//base",
+ "//mojo/application:application",
+ "//mojo/application:content_handler",
+ "//mojo/data_pipe_utils",
+ "//mojo/public/platform/native:mgl_thunks",
Mark Seaborn 2015/10/27 17:30:20 These are being repeated across all of these mojo_
Sean Klein 2015/10/28 17:02:41 Done.
+ "//mojo/public/platform/native:mgl_onscreen_thunks",
+ "//mojo/message_pump",
+ "//mojo/nacl/nonsfi:irt_mojo_nonsfi",
+ "//native_client/src/nonsfi/loader:elf_loader",
+ ]
+ }
+ mojo_native_application("pnacl_compile_32_bit") {
+ output_name = "pnacl_compile"
sources = [
- "${root_out_dir}/nacl_content_handler_nonsfi_32_bit.mojo",
+ "pnacl_compile.cc",
]
- outputs = [
- "${root_build_dir}/nacl_content_handler_nonsfi.mojo",
+
+ deps = [
+ ":pnacl_translator_bindings",
+ "//base",
+ "//mojo/nacl/nonsfi:irt_mojo_nonsfi",
+ "//mojo/public/platform/native:mgl_thunks",
+ "//mojo/public/platform/native:mgl_onscreen_thunks",
+ "//mojo/public/cpp/application:standalone",
+ "//native_client/src/nonsfi/loader:elf_loader",
+ ]
+ }
+ mojo_native_application("pnacl_link_32_bit") {
+ output_name = "pnacl_link"
+ sources = [
+ "pnacl_link.cc",
]
+
deps = [
- ":nacl_content_handler_nonsfi_32_bit",
+ ":pnacl_translator_bindings",
+ "//base",
+ "//mojo/nacl/nonsfi:irt_mojo_nonsfi",
+ "//mojo/public/platform/native:mgl_thunks",
+ "//mojo/public/platform/native:mgl_onscreen_thunks",
+ "//mojo/public/cpp/application:standalone",
+ "//native_client/src/nonsfi/loader:elf_loader",
]
}
+
+ # Copy to the root build directory so that the '#!' prefix line for invoking
+ # our content handler can simply be "mojo:nacl_content_handler_nonsfi".
+ # Either way, build the same dependencies.
+ shared_deps = [
+ ":nacl_content_handler_nonsfi_32_bit",
+ ":nacl_content_handler_nonsfi_pexe_32_bit",
+ ":pnacl_compile_32_bit",
+ ":pnacl_link_32_bit",
+ ]
+ if (root_out_dir != root_build_dir) {
+ copy("nacl_content_handler_nonsfi_copy") {
+ sources = [
+ "${root_out_dir}/nacl_content_handler_nonsfi_nexe.mojo",
+ "${root_out_dir}/nacl_content_handler_nonsfi_pexe.mojo",
+ "${root_out_dir}/pnacl_compile.mojo",
+ "${root_out_dir}/pnacl_link.mojo",
+ ]
+ outputs = [
+ "${root_build_dir}/{{source_name_part}}.mojo",
Petr Hosek 2015/10/27 15:07:52 You can use {{source_file_part}} here and omit the
Sean Klein 2015/10/28 17:02:41 Done.
+ ]
+ deps = shared_deps
+ }
+ } else {
+ group("nacl_content_handler_nonsfi_copy") {
+ deps = shared_deps
+ }
+ }
}
}
@@ -80,3 +147,10 @@ group("nacl_content_handler_nonsfi") {
deps += [ ":nacl_content_handler_nonsfi_copy" ]
}
}
+
+mojom("pnacl_translator_bindings") {
+ sources = [
+ "pnacl_compile.mojom",
+ "pnacl_link.mojom",
+ ]
+}

Powered by Google App Engine
This is Rietveld 408576698