From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 2FF4121A143E0 for ; Tue, 13 Jun 2017 21:46:00 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Jun 2017 21:47:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,340,1493708400"; d="scan'208";a="1182206737" Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.121]) by fmsmga002.fm.intel.com with ESMTP; 13 Jun 2017 21:47:14 -0700 From: Yonghong Zhu To: edk2-devel@lists.01.org Cc: Liming Gao Date: Wed, 14 Jun 2017 12:47:06 +0800 Message-Id: <1497415626-23908-3-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 In-Reply-To: <1497415626-23908-1-git-send-email-yonghong.zhu@intel.com> References: <1497415626-23908-1-git-send-email-yonghong.zhu@intel.com> Subject: [Patch 2/2] MdePkg: update Base.h in MdePkg to check the _MSC_VER X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jun 2017 04:46:00 -0000 update Base.h in MdePkg to check the _MSC_VER and define GLOBAL_REMOVE_IF_UNREFERENCED to nothing for VS2013 and higher tool chain tags. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- 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 5b311f6..21a603a 100644 --- a/MdePkg/Include/Base.h +++ b/MdePkg/Include/Base.h @@ -89,11 +89,11 @@ VERIFY_SIZE_OF (__VERIFY_UINT32_ENUM_SIZE, 4); // // The Microsoft* C compiler can removed references to unreferenced data items // if the /OPT:REF linker option is used. We defined a macro as this is a // a non standard extension // -#if defined(_MSC_EXTENSIONS) && !defined (MDE_CPU_EBC) +#if defined(_MSC_EXTENSIONS) && _MSC_VER < 1800 && !defined (MDE_CPU_EBC) /// /// Remove global variable from the linked image if there are no references to /// it after all compiler and linker optimizations have been performed. /// /// -- 2.6.1.windows.1