diff options
Diffstat (limited to 'build/build_config.h')
-rw-r--r-- | build/build_config.h | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/build/build_config.h b/build/build_config.h index bf3f43ee4f..e152a66ba0 100644 --- a/build/build_config.h +++ b/build/build_config.h @@ -25,20 +25,32 @@ // hosts. Use __ANDROID__ and __ANDROID_HOST__ instead. // - OS_ANDROID is a Chrome-specific define used to build Chrome for Android // within the NDK. -#if defined(__ANDROID__) -#define __linux__ 1 -// The Chrome OS implementation of this library is currently built on Android. +// Android targets and hosts don't use tcmalloc. +#if defined(__ANDROID__) || defined(__ANDROID_HOST__) +#define NO_TCMALLOC +#endif // defined(__ANDROID__) || defined(__ANDROID_HOST__) + +// Use the Chrome OS version of the code for both Android targets and Chrome OS builds. +#if !defined(__ANDROID_HOST__) #define OS_CHROMEOS 1 +#endif // !defined(__ANDROID_HOST__) + +#if defined(__ANDROID__) // Android targets +#define __linux__ 1 #if defined(__BIONIC__) #define __UCLIBC__ 1 #endif // defined(__BIONIC__) -#endif // defined(__ANDROID__) -#if defined(__ANDROID__) || defined(__ANDROID_HOST__) -#define NO_TCMALLOC -#endif // defined(__ANDROID__) || defined(__ANDROID_HOST__) +#elif !defined(__ANDROID_HOST__) // Chrome OS + +// TODO: Remove these once the GLib MessageLoopForUI isn't being used: +// https://crbug.com/361635 +#define USE_GLIB 1 +#define USE_OZONE 1 + +#endif // defined(__ANDROID__) // A set of macros to use for platform detection. #if defined(__native_client__) @@ -52,6 +64,7 @@ #else #define OS_NACL_SFI #endif +// Don't set OS_ANDROID; it's only used when building Chrome for Android. #elif defined(__APPLE__) // only include TargetConditions after testing ANDROID as some android builds // on mac don't have this header available and it's not needed unless the target @@ -84,8 +97,8 @@ #error Please add support for your platform in build/build_config.h #endif -#if defined(USE_OPENSSL) && defined(USE_NSS) -#error Cannot use both OpenSSL and NSS +#if defined(USE_OPENSSL_CERTS) && defined(USE_NSS_CERTS) +#error Cannot use both OpenSSL and NSS for certificates #endif // For access to standard BSD features, use OS_BSD instead of a |