summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Workspace/DscBuildData.py
diff options
context:
space:
mode:
authorFeng, Bob C <bob.c.feng@intel.com>2019-07-01 17:48:51 +0800
committerFeng, Bob C <bob.c.feng@intel.com>2019-07-10 09:26:18 +0800
commit1d06b46cf1d0a6e8a36ac1b790333f3c0f1c3733 (patch)
tree0a7fe69d686bdcca9c69c3c8031cfe99aaae107a /BaseTools/Source/Python/Workspace/DscBuildData.py
parentf527942e6bdd9f198db90f2de99a0482e9be5b1b (diff)
downloadedk2-1d06b46cf1d0a6e8a36ac1b790333f3c0f1c3733.tar.gz
edk2-1d06b46cf1d0a6e8a36ac1b790333f3c0f1c3733.tar.bz2
edk2-1d06b46cf1d0a6e8a36ac1b790333f3c0f1c3733.zip
BaseTools: Fixed the issue of the CFlag for compile PcdValueInit.c
This issue happens when using Structured PCD. Build tool use set to store the cflags for compile PcdValueInit.c, that is the order of cflags is disorder. This patch make -U, /U flags appear before -D, /D Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Workspace/DscBuildData.py')
-rw-r--r--BaseTools/Source/Python/Workspace/DscBuildData.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py
index 9f65ad5425..985f877525 100644
--- a/BaseTools/Source/Python/Workspace/DscBuildData.py
+++ b/BaseTools/Source/Python/Workspace/DscBuildData.py
@@ -2668,7 +2668,8 @@ class DscBuildData(PlatformBuildClassObject):
elif len(ArchBuildOptions.keys()) > 1:
CommonBuildOptions = reduce(lambda x,y: x&y, ArchBuildOptions.values())
BuildOptions['COMMON'] |= CommonBuildOptions
- ValueList = list(BuildOptions['COMMON'])
+ ValueList = [item for item in BuildOptions['COMMON'] if item.startswith((r"/U","-U"))]
+ ValueList.extend([item for item in BuildOptions['COMMON'] if item.startswith((r"/D", "-D"))])
CC_FLAGS += " ".join(ValueList)
MakeApp += CC_FLAGS