Fix compiler_version.py on systems with non-English locale.

The the version string can be localized! The regexs assume English formatting and will fail to match under other localization (such as when the versions dots become commas).

http://www.gnu.org/software/gettext/manual/html_node/Locale-Environment-Variables.html#Locale-Environment-Variables

BUG=354231

Review URL: https://codereview.chromium.org/207873002

git-svn-id: http://src.chromium.org/svn/trunk/src/build@258867 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
mithro@mithis.com 2014-03-24 03:40:01 +00:00
Родитель 8753fdb163
Коммит fcbccb8ce7
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -60,6 +60,10 @@ def GetVersion(compiler, tool):
def main(args):
# Force the locale to C otherwise the version string could be localized
# making regex matching fail.
os.environ["LC_ALL"] = "C"
tool = "compiler"
if len(args) == 1:
tool = args[0]