From: "Zhiguang Liu" <zhiguang.liu@intel.com>
To: devel@edk2.groups.io
Cc: Vitaly Cheptsov <vit9696@protonmail.com>,
Liming Gao <liming.gao@intel.com>,
Michael D Kinney <michael.d.kinney@intel.com>
Subject: [PATCH 2/2] MdePkg: Use __clang__ to decide if using clang or not
Date: Tue, 24 Mar 2020 14:20:45 +0800 [thread overview]
Message-ID: <20200324062045.2263-2-zhiguang.liu@intel.com> (raw)
In-Reply-To: <20200324062045.2263-1-zhiguang.liu@intel.com>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2628
After switching CLANGPDB's IA32 target to i686-unknown-windows, clang will
define _MSC_EXTENSIONS and _MSC_VER. Use __clang__ to decide if using clang.
CC: Vitaly Cheptsov <vit9696@protonmail.com>
CC: Liming Gao <liming.gao@intel.com>
CC: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
---
MdePkg/Include/Base.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h
index 85a091b9d5..c6da816aa9 100644
--- a/MdePkg/Include/Base.h
+++ b/MdePkg/Include/Base.h
@@ -799,7 +799,7 @@ typedef UINTN *BASE_LIST;
**/
#ifdef MDE_CPU_EBC
#define STATIC_ASSERT(Expression, Message)
-#elif defined(_MSC_EXTENSIONS)
+#elif defined(_MSC_EXTENSIONS) && !defined(__clang__)
#define STATIC_ASSERT static_assert
#else
#define STATIC_ASSERT _Static_assert
--
2.25.1.windows.1
next prev parent reply other threads:[~2020-03-24 6:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-24 6:20 [PATCH 1/2] BaseTools: Change CLANGPDB target to reduce image size Zhiguang Liu
2020-03-24 6:20 ` Zhiguang Liu [this message]
2020-03-24 6:24 ` Vitaly Cheptsov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200324062045.2263-2-zhiguang.liu@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox