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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/nacl/BUILD.gn
diff --git a/mojo/nacl/BUILD.gn b/mojo/nacl/BUILD.gn
index 44e3b3e3d6ef7393b06f205882d49cbd8bce2ecd..b179087e84e20ee709cfdb6e5d7cd19e20244b4c 100644
--- a/mojo/nacl/BUILD.gn
+++ b/mojo/nacl/BUILD.gn
@@ -20,16 +20,34 @@ if (!is_nacl) {
data_deps = [ "//nacl_bindings:irt_mojo(//native_client/build/toolchain/nacl:irt_${target_cpu})" ]
}
- executable("monacl_shell_nonsfi") {
- testonly = true
- sources = [
- "monacl_shell_nonsfi.cc",
- ]
- deps = [
- ":irt_mojo_nonsfi",
- "//mojo/edk/system",
- "//native_client/src/nonsfi/loader:elf_loader",
- ]
+ if (current_cpu == "x86") {
+ # Non-SFI NaCl currently supports x86-32 but not x86-64. Additionally,
+ # PNaCl pexes assume 32-bit pointers.
+ executable("monacl_shell_nonsfi") {
+ testonly = true
+ sources = [
+ "monacl_shell_nonsfi.cc",
+ ]
+ deps = [
+ ":irt_mojo_nonsfi",
+ "//mojo/edk/system",
+ "//native_client/src/nonsfi/loader:elf_loader",
+ ]
+ }
+ }
+}
+
+group("monacl_shell_nonsfi_x86") {
+ testonly = true
+ deps = []
+ if ((target_cpu == "x64" || target_cpu == "x86") && is_linux) {
+ # Even when Mojo is built for x86-64 by default, we want to use x86-32
+ # for running programs under Non-SFI NaCl.
+ # The toolchain is hardcoded as 32-bit clang here -- although it must
+ # be 32 bit (for nonsfi), it assumes clang. Ideally, the toolchain would
+ # be defined as the 32 bit variant of whatever is being used (be it clang,
+ # gcc, or something else).
+ deps += [ ":monacl_shell_nonsfi(//build/toolchain/linux:clang_x86)" ]
}
}
@@ -104,6 +122,7 @@ group("mojo_nacl_tests") {
deps = [
":mojo_nacl_tests_untrusted(//native_client/build/toolchain/nacl:clang_newlib_${current_cpu})",
":monacl_shell",
+ ":monacl_shell_nonsfi_x86",
":mojo_pnacl_tests",
]
}
« 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