[edk2] [Patch] BaseTools: Retrieve /U and -U CC flags to structure PcdValueInit Makefile

Liming Gao posted 1 patch 5 years, 11 months ago
Failed in applying to current master (apply log)
BaseTools/Source/Python/Workspace/DscBuildData.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[edk2] [Patch] BaseTools: Retrieve /U and -U CC flags to structure PcdValueInit Makefile
Posted by Liming Gao 5 years, 11 months ago
/D and -D flags have been added. So, /U and -U flags should be added.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
---
 BaseTools/Source/Python/Workspace/DscBuildData.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py
index 7e3187f..38a0acb 100644
--- a/BaseTools/Source/Python/Workspace/DscBuildData.py
+++ b/BaseTools/Source/Python/Workspace/DscBuildData.py
@@ -2075,11 +2075,11 @@ class DscBuildData(PlatformBuildClassObject):
                         ValueList = Value.split()
                         if ValueList:
                             for Id, Item in enumerate(ValueList):
-                                if Item == '-D' or Item == '/D':
+                                if Item in ['-D', '/D', '-U', '/U']:
                                     CC_FLAGS += ' ' + Item
                                     if Id + 1 < len(ValueList):
                                         CC_FLAGS += ' ' + ValueList[Id + 1]
-                                elif Item.startswith('/D') or Item.startswith('-D'):
+                                elif Item.startswith(('-D', '/D', '-U', '/U')):
                                     CC_FLAGS += ' ' + Item
         MakeApp += CC_FLAGS
 
-- 
2.8.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch] BaseTools: Retrieve /U and -U CC flags to structure PcdValueInit Makefile
Posted by Zhu, Yonghong 5 years, 11 months ago
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> 

Best Regards,
Zhu Yonghong


-----Original Message-----
From: Gao, Liming 
Sent: Friday, May 04, 2018 1:28 PM
To: edk2-devel@lists.01.org
Cc: Zhu, Yonghong <yonghong.zhu@intel.com>
Subject: [Patch] BaseTools: Retrieve /U and -U CC flags to structure PcdValueInit Makefile

/D and -D flags have been added. So, /U and -U flags should be added.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
---
 BaseTools/Source/Python/Workspace/DscBuildData.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py
index 7e3187f..38a0acb 100644
--- a/BaseTools/Source/Python/Workspace/DscBuildData.py
+++ b/BaseTools/Source/Python/Workspace/DscBuildData.py
@@ -2075,11 +2075,11 @@ class DscBuildData(PlatformBuildClassObject):
                         ValueList = Value.split()
                         if ValueList:
                             for Id, Item in enumerate(ValueList):
-                                if Item == '-D' or Item == '/D':
+                                if Item in ['-D', '/D', '-U', '/U']:
                                     CC_FLAGS += ' ' + Item
                                     if Id + 1 < len(ValueList):
                                         CC_FLAGS += ' ' + ValueList[Id + 1]
-                                elif Item.startswith('/D') or Item.startswith('-D'):
+                                elif Item.startswith(('-D', '/D', '-U', '/U')):
                                     CC_FLAGS += ' ' + Item
         MakeApp += CC_FLAGS
 
-- 
2.8.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel