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

Unified Diff: build/build_config.h

Issue 664373003: Introduce OS_NACL_SFI and OS_NACL_NONSFI macros. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « PRESUBMIT.py ('k') | ipc/ipc_channel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/build_config.h
diff --git a/build/build_config.h b/build/build_config.h
index 553484605a857baa66d252ba5df4286ce89b53c7..b07660db412f654fae64e622a26f0cc02c7fbd27 100644
--- a/build/build_config.h
+++ b/build/build_config.h
@@ -4,7 +4,8 @@
// This file adds defines about the platform we're currently building on.
// Operating System:
-// OS_WIN / OS_MACOSX / OS_LINUX / OS_POSIX (MACOSX or LINUX) / OS_NACL
+// OS_WIN / OS_MACOSX / OS_LINUX / OS_POSIX (MACOSX or LINUX) /
+// OS_NACL (NACL_SFI or NACL_NONSFI) / OS_NACL_SFI / OS_NACL_NONSFI
// Compiler:
// COMPILER_MSVC / COMPILER_GCC
// Processor:
@@ -18,6 +19,14 @@
#if defined(__native_client__)
// __native_client__ must be first, so that other OS_ defines are not set.
#define OS_NACL 1
+// OS_NACL comes in two sandboxing technology flavors, SFI or Non-SFI.
+// PNaCl toolchain defines __native_client_nonsfi__ macro in Non-SFI build
+// mode, while it does not in SFI build mode.
+#if defined(__native_client_nonsfi__)
+#define OS_NACL_NONSFI
+#else
+#define OS_NACL_SFI
+#endif
#elif defined(ANDROID)
#define OS_ANDROID 1
#elif defined(__APPLE__)
« no previous file with comments | « PRESUBMIT.py ('k') | ipc/ipc_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698