From 9a1a63cf1148eeeb50d58a6982b4c45f2e83e8ab Mon Sep 17 00:00:00 2001 From: Liming Gao Date: Wed, 28 Sep 2016 14:18:56 +0800 Subject: [PATCH] BaseTools Makefile: Enable O2 option to replace Od for VS tool chain Enable O2 option to generate fast code for performance improvement. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao Acked-by: Jordan Justen --- BaseTools/Source/C/Makefiles/ms.app | 2 +- BaseTools/Source/C/Makefiles/ms.common | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/BaseTools/Source/C/Makefiles/ms.app b/BaseTools/Source/C/Makefiles/ms.app index 908ffe8a3d..93d51f9855 100644 --- a/BaseTools/Source/C/Makefiles/ms.app +++ b/BaseTools/Source/C/Makefiles/ms.app @@ -17,7 +17,7 @@ all: $(APPLICATION) $(APPLICATION) : $(OBJECTS) -@if not exist $(BIN_PATH) mkdir $(BIN_PATH) - $(LD) /nologo /debug /incremental:no /nodefaultlib:libc.lib /out:$@ $(LIBS) $** + $(LD) /nologo /debug /OPT:REF /OPT:ICF=10 /incremental:no /nodefaultlib:libc.lib /out:$@ $(LIBS) $** $(OBJECTS) : ..\Include\Common\BuildVersion.h diff --git a/BaseTools/Source/C/Makefiles/ms.common b/BaseTools/Source/C/Makefiles/ms.common index 9e50b217fc..5c3991de92 100644 --- a/BaseTools/Source/C/Makefiles/ms.common +++ b/BaseTools/Source/C/Makefiles/ms.common @@ -61,6 +61,6 @@ LINKER = $(LD) INC = -I . -I $(SOURCE_PATH)\Include -I $(ARCH_INCLUDE) -I $(SOURCE_PATH)\Common $(INC) -CFLAGS = $(CFLAGS) /nologo /c /Zi /Od /RTC1 /D _DEBUG /MTd /W4 /WX /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE -CPPFLAGS = $(CPPFLAGS) /EHsc /nologo /c /Zi /Od /RTC1 /D _DEBUG /MTd /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE +CFLAGS = $(CFLAGS) /nologo /Zi /c /O2 /MD /W4 /WX /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE +CPPFLAGS = $(CPPFLAGS) /EHsc /nologo /Zi /c /O2 /MD /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE