Non-SFI Mode: Build base/ library by PNaCL toolchain for nacl_helper_nonsfi.
This CL is to build base/ for nacl_helper_nonsfi.
The library is similar to base_nacl, but slightly different:
- For rand_util, rand_util_posix should be used, instead of
rand_util_nacl, because nacl_helper_nonsfi will be running under
Linux directly.
- MessageLoopForIO should be based on MessagePumpLibevent rather than
MessagePumpDefault, to support IPC.
- GetKnownDeadTerminationStatus, GetTerminationStatus,
UnixDomainSocket::SendMsg and RecvMsg are included, as these are used
to implement nacl_helper_nonsfi binary.
- GLIB is not supported. It is unnecessary for nacl_helper_nonsfi.
Note that this library is not used yet from any binary, because this CL
is just a preparation, but the library is built actually.
BUG=358465
TEST=Ran trybot. Implement nacl_helper_nonsfi on top of this CL, and made sure
it is working.
Review URL: https://codereview.chromium.org/659513004
Cr-Commit-Position: refs/heads/master@{#300075}
CrOS-Libchrome-Original-Commit: 2b720d21260715614abea6f241874cc779f01332
diff --git a/base/message_loop/message_loop.cc b/base/message_loop/message_loop.cc
index c01e542..f1d0d3b 100644
--- a/base/message_loop/message_loop.cc
+++ b/base/message_loop/message_loop.cc
@@ -100,7 +100,7 @@
#if defined(OS_IOS)
typedef MessagePumpIOSForIO MessagePumpForIO;
-#elif defined(OS_NACL)
+#elif defined(OS_NACL) && !defined(__native_client_nonsfi__)
typedef MessagePumpDefault MessagePumpForIO;
#elif defined(OS_POSIX)
typedef MessagePumpLibevent MessagePumpForIO;
@@ -676,7 +676,7 @@
//------------------------------------------------------------------------------
// MessageLoopForIO
-#if !defined(OS_NACL)
+#if !defined(OS_NACL) || defined(__native_client_nonsfi__)
void MessageLoopForIO::AddIOObserver(
MessageLoopForIO::IOObserver* io_observer) {
ToPumpIO(pump_.get())->AddIOObserver(io_observer);
@@ -714,6 +714,6 @@
}
#endif
-#endif // !defined(OS_NACL)
+#endif // !defined(OS_NACL) || defined(__native_client_nonsfi__)
} // namespace base