Do not throw a preprocessor error, if COMPILER_GCC is not defined.
build/build_config.h defines one of two macros: https://cs.chromium.org/chromium/src/build/build_config.h // Compiler detection. #if defined(__GNUC__) #define COMPILER_GCC 1 #elif defined(_MSC_VER) #define COMPILER_MSVC 1 #else #error Please add support for your compiler in build/build_config.h #endif And in the most of the case, the following checks are performed: #if defined(COMPILER_GCC) // Do something. #elif defined(COMPILER_MSVC) // Do something else. #else // Do something completely else. #endif There's one use in base/compiler_specific.h that violates this convention, as it tests: #if COMPILER_GCC && defined(NDEBUG) #define ALWAYS_INLINE inline __attribute__((__always_inline__)) #elif COMPILER_MSVC && defined(NDEBUG) #define ALWAYS_INLINE __forceinline #else #define ALWAYS_INLINE inline #endif That leads to a preprocessor error on Windows. While this error is not triggered in Chromium, it can be reproduced, if link WebRTC Native Code with //base shipped as a part of their checkout. BUG=chromium:871039 Change-Id: I868b4a47a574fba48e7d2743cd64ace99ea64940 Reviewed-on: https://chromium-review.googlesource.com/1162343Reviewed-by:Nico Weber <thakis@chromium.org> Commit-Queue: Ivan Krasin <krasin@chromium.org> Cr-Commit-Position: refs/heads/master@{#580770}
Showing
Please register or sign in to comment