From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=2a00:1450:400c:c09::242; helo=mail-wm0-x242.google.com; envelope-from=pete@akeo.ie; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A00152217CE51 for ; Wed, 6 Dec 2017 03:10:55 -0800 (PST) Received: by mail-wm0-x242.google.com with SMTP id y82so22647964wmg.1 for ; Wed, 06 Dec 2017 03:15:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akeo-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=C+Ma0nMaJ9kWnx8mMlXT9493nDp5j+Dxvx0H09UTAWI=; b=PnPmh9qjTWrgxcfVee7OVXDT8v2CZNiH3VDTh1MYuwZNtYTncc6QNGEstOCj3PmJUp NCK95olf0vrkcXqo4N7jc01PZSjnTXWiUAXHSaI+kRwCsjjcIweEg3DlJ17/hoGig5WP jyhLNEGoDMLdRgBOk6mKGTqir07e/Hoa/4HRokahGqJbTqvYeTeFEbgPMM8SK2ChSNGh uA1hO3YatTnfxpivnVT3LNGYdJUAMkskTBxPVB0LeD0/ISjoJJckxBgvtYax9h4s3drB RtoY7MehSi5ujob1YBSTxyl26i3kpbR2hislR2sPJ2ZtOwerNfwwrTpcGwewyhiIVkFw BafQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=C+Ma0nMaJ9kWnx8mMlXT9493nDp5j+Dxvx0H09UTAWI=; b=sYqD3DrwYk/mX3VLc09jIaW2mW688+VEh+hF6bEpKHMB6qAu33S9rGRICoKRKu32A3 S7yxwWDIpR5/YprlJ9a1Pe0J936Ellh4aLUkWQUspPF62dnrgokTth2QJ4z8IDtX2RXF pRBl41Sb3SredcaOXEebYYOr/32Q/Kzi9+KyBtAlZ0unUwhp2mes/C/CzjMzxm6OSHLT bJT4hfoUdCx//ovxgvlP0bJ6xSJH6Lm3PdZxdnEEcub0+jK1Met09EFH0uE4p0quJRJk AEaplDek7KQDzXnIAjadYvjxjKOFcZxGj2FQrxBO3l9O5vFT0AVBlPBYCn12Kdat2p4z K7qw== X-Gm-Message-State: AJaThX5GUdL6F5G8vMufg7qb6eWwn12o1uUcfBx/rC+raJXIlV3rg4dm 4g/P3RKNmsjI4hhj5dKr5S2s/Yhs8Dc= X-Google-Smtp-Source: AGs4zMazYzcE3CPodMGJjeibPo/d5NDg+aXDS2bHM8xU89pS5htdlyJoBpYI/BMYjl0ejKzXLUotRQ== X-Received: by 10.80.170.87 with SMTP id p23mr41229194edc.289.1512558925955; Wed, 06 Dec 2017 03:15:25 -0800 (PST) Received: from localhost.localdomain ([84.203.69.204]) by smtp.gmail.com with ESMTPSA id b17sm1132422edj.21.2017.12.06.03.15.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Dec 2017 03:15:25 -0800 (PST) From: Pete Batard To: edk2-devel@lists.01.org Cc: liming.gao@intel.com Date: Wed, 6 Dec 2017 11:15:09 +0000 Message-Id: <20171206111509.10144-7-pete@akeo.ie> X-Mailer: git-send-email 2.9.3.windows.2 In-Reply-To: <20171206111509.10144-1-pete@akeo.ie> References: <20171206111509.10144-1-pete@akeo.ie> Subject: [PATCH v2 6/6] BaseTools/Conf: Add VS2017/ARM support 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, 06 Dec 2017 11:10:56 -0000 We duplicate the Assembly-Code-File section from build_rule.template because --convert-hex cannot be used with the MSFT ARM assembler. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Pete Batard --- BaseTools/Conf/build_rule.template | 31 +++++++++++++++++++- BaseTools/Conf/tools_def.template | 28 ++++++++++++++++++ 2 files changed, 58 insertions(+), 1 deletion(-) diff --git a/BaseTools/Conf/build_rule.template b/BaseTools/Conf/build_rule.template index 3e6aa8ff0f34..6ea14fb7aa02 100755 --- a/BaseTools/Conf/build_rule.template +++ b/BaseTools/Conf/build_rule.template @@ -182,7 +182,6 @@ - [Assembly-Code-File.COMMON.COMMON] ?.asm, ?.Asm, ?.ASM @@ -207,6 +206,36 @@ # For RVCTCYGWIN ASM_FLAGS must be first to work around pathing issues "$(ASM)" $(ASM_FLAGS) -o ${dst} $(INC) ${d_path}(+)${s_base}.iii +[Assembly-Code-File.COMMON.ARM] + # Remove --convert-hex for ARM as it breaks MSFT assemblers + + ?.asm, ?.Asm, ?.ASM + + + ?.S, ?.s + + + $(MAKE_FILE) + + + $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj + + + "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i + Trim --source-code --convert-hex --trim-long -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i + "$(ASM)" /Fo${dst} $(ASM_FLAGS) /I${s_path} $(INC) ${d_path}(+)${s_base}.iii + + + "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i + Trim --source-code --trim-long -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i + "$(ASM)" /Fo${dst} $(ASM_FLAGS) /I${s_path} $(INC) ${d_path}(+)${s_base}.iii + + + "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i + Trim --trim-long --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i + # For RVCTCYGWIN ASM_FLAGS must be first to work around pathing issues + "$(ASM)" $(ASM_FLAGS) -o ${dst} $(INC) ${d_path}(+)${s_base}.iii + [Nasm-Assembly-Code-File.COMMON.COMMON] ?.nasm diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index 91b135c2e569..1b888aa842e2 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -79,6 +79,7 @@ DEFINE VS2017_HOST = x86 DEFINE VS2017_BIN_HOST = DEF(VS2017_BIN)\HostDEF(VS2017_HOST)\DEF(VS2017_HOST) DEFINE VS2017_BIN_IA32 = DEF(VS2017_BIN)\HostDEF(VS2017_HOST)\x86 DEFINE VS2017_BIN_X64 = DEF(VS2017_BIN)\HostDEF(VS2017_HOST)\x64 +DEFINE VS2017_BIN_ARM = DEF(VS2017_BIN)\HostDEF(VS2017_HOST)\arm DEFINE WINSDK_BIN = ENV(WINSDK_PREFIX) DEFINE WINSDKx86_BIN = ENV(WINSDKx86_PREFIX) @@ -4169,6 +4170,33 @@ NOOPT_VS2017_X64_NASM_FLAGS = -O0 -f win64 -g RELEASE_VS2017_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data NOOPT_VS2017_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG +################# +# ARM definitions +################# +*_VS2017_ARM_CC_PATH = DEF(VS2017_BIN_ARM)\cl.exe +*_VS2017_ARM_VFRPP_PATH = DEF(VS2017_BIN_ARM)\cl.exe +*_VS2017_ARM_SLINK_PATH = DEF(VS2017_BIN_ARM)\lib.exe +*_VS2017_ARM_DLINK_PATH = DEF(VS2017_BIN_ARM)\link.exe +*_VS2017_ARM_APP_PATH = DEF(VS2017_BIN_ARM)\cl.exe +*_VS2017_ARM_PP_PATH = DEF(VS2017_BIN_ARM)\cl.exe +*_VS2017_ARM_ASM_PATH = DEF(VS2017_BIN_ARM)\armasm.exe +*_VS2017_ARM_ASLCC_PATH = DEF(VS2017_BIN_ARM)\cl.exe +*_VS2017_ARM_ASLPP_PATH = DEF(VS2017_BIN_ARM)\cl.exe +*_VS2017_ARM_ASLDLINK_PATH = DEF(VS2017_BIN_ARM)\link.exe + + *_VS2017_ARM_MAKE_FLAGS = /nologo + DEBUG_VS2017_ARM_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm /Gw /Oi- +RELEASE_VS2017_ARM_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gw /Oi- +NOOPT_VS2017_ARM_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm /Od /Oi- + + DEBUG_VS2017_ARM_ASM_FLAGS = /nologo /g +RELEASE_VS2017_ARM_ASM_FLAGS = /nologo +NOOPT_VS2017_ARM_ASM_FLAGS = /nologo + + DEBUG_VS2017_ARM_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:ARM /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG +RELEASE_VS2017_ARM_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:ARM /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data +NOOPT_VS2017_ARM_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:ARM /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG + ################## # EBC definitions ################## -- 2.9.3.windows.2