Force define DEPRECATEDENUMERATOR for clang

The Fall Creators Update SDK uses DEPRECATEDENUMERATOR to mark some
enums as being deprecated but in the __cplusplus >= 201402 case it
fails to define it! This change forcibly defines it to work around
this header-file bug. This change avoids dozens of errors in
Windows.ApplicationModel.Contacts.h.

VS bug is filed here:
https://developercommunity.visualstudio.com/content/problem/131391/154-fails-to-define-deprecatedenumerator-2.html

Bug: 773476
Change-Id: I604228cac02f676e2c79e9a8e533fd332221b0cd
Reviewed-on: https://chromium-review.googlesource.com/717190
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#508862}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 00de4b5174c190b4d9f6120ef550a310ec740459
This commit is contained in:
Bruce Dawson 2017-10-13 23:21:23 +00:00 коммит произвёл Commit Bot
Родитель f6d94d10a1
Коммит c74997418b
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -178,6 +178,12 @@ config("runtime_library") {
"_SCL_SECURE_NO_DEPRECATE",
]
if (is_clang) {
# Work around Fall Creators Update SDK bug - crbug.com/773476 has details.
# https://developercommunity.visualstudio.com/content/problem/131391/154-fails-to-define-deprecatedenumerator-2.html
defines += [ "DEPRECATEDENUMERATOR(x)=[[deprecated(x)]]" ]
}
# Defines that set up the Windows SDK.
defines += [
"_ATL_NO_OPENGL",