summaryrefslogtreecommitdiff
path: root/BaseTools/Source/Python/Common/String.py
diff options
context:
space:
mode:
Diffstat (limited to 'BaseTools/Source/Python/Common/String.py')
-rw-r--r--BaseTools/Source/Python/Common/String.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/Common/String.py b/BaseTools/Source/Python/Common/String.py
index 0f2a61b1b9..068a63d1c1 100644
--- a/BaseTools/Source/Python/Common/String.py
+++ b/BaseTools/Source/Python/Common/String.py
@@ -319,7 +319,7 @@ def NormPath(Path, Defines={}):
#
# @retval Path Formatted path
#
-def CleanString(Line, CommentCharacter=DataType.TAB_COMMENT_SPLIT, AllowCppStyleComment=False):
+def CleanString(Line, CommentCharacter=DataType.TAB_COMMENT_SPLIT, AllowCppStyleComment=False, BuildOption=False):
#
# remove whitespace
#
@@ -343,7 +343,7 @@ def CleanString(Line, CommentCharacter=DataType.TAB_COMMENT_SPLIT, AllowCppStyle
Line = Line[0: Index]
break
- if CommentInString:
+ if CommentInString and BuildOption:
Line = Line.replace('"', '')
ChIndex = Line.find('#')
while ChIndex >= 0: