Introduce OS_NACL_SFI and OS_NACL_NONSFI macros.
PNaCl toolchain starts to support "Non-SFI build binary" mode. Some sources are built both for SFI binary and for Non-SFI binary, but, in some cases, there are small diffs which need to be guarded by #ifdef. In "Non-SFI build binary" mode, __native_client_nonsfi__ is defined. This CL introduce OS_NACL_SFI and OS_NACL_NONSFI which can be used among the chrome code, to slightly simplify the #ifdef conditions. This CL is the follow up of crrev.com/659243002 BUG=358465 TEST=Ran trybot. Review URL: https://codereview.chromium.org/664373003 Cr-Original-Commit-Position: refs/heads/master@{#301603} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: f7295f2e7b0c17a7784f23e06b924ab966fea3a8
This commit is contained in:
Родитель
0512fed2c9
Коммит
10528b2553
|
@ -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__)
|
||||
|
|
Загрузка…
Ссылка в новой задаче