Index: build/android/gyp/util/build_utils.py |
diff --git a/build/android/gyp/util/build_utils.py b/build/android/gyp/util/build_utils.py |
index c601e06d7157fd97855749a8ecd781c22aac590f..beb7bcfbf1e9c8cbd0a5ef85dd5e6083b588b04f 100644 |
--- a/build/android/gyp/util/build_utils.py |
+++ b/build/android/gyp/util/build_utils.py |
@@ -22,6 +22,10 @@ import md5_check # pylint: disable=relative-import |
sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir)) |
from pylib.constants import host_paths |
+sys.path.append(os.path.join(os.path.dirname(__file__), |
+ os.pardir, os.pardir, os.pardir)) |
+import gn_helpers |
+ |
COLORAMA_ROOT = os.path.join(host_paths.DIR_SOURCE_ROOT, |
'third_party', 'colorama', 'src') |
# aapt should ignore OWNERS files in addition the default ignore pattern. |
@@ -77,18 +81,8 @@ def FindInDirectories(directories, filename_filter): |
def ParseGnList(gn_string): |
- # TODO(brettw) bug 573132: This doesn't handle GN escaping properly, so any |
- # weird characters like $ or \ in the strings will be corrupted. |
- # |
- # The code should import build/gn_helpers.py and then do: |
- # parser = gn_helpers.GNValueParser(gn_string) |
- # return return parser.ParseList() |
- # As of this writing, though, there is a CastShell build script that sends |
- # JSON through this function, and using correct GN parsing corrupts that. |
- # |
- # We need to be consistent about passing either JSON or GN lists through |
- # this function. |
- return ast.literal_eval(gn_string) |
+ parser = gn_helpers.GNValueParser(gn_string) |
+ return parser.ParseList() |
def ParseGypList(gyp_string): |