Index: pylib/gyp/generator/msvs.py |
=================================================================== |
--- pylib/gyp/generator/msvs.py (revision 1389) |
+++ pylib/gyp/generator/msvs.py (working copy) |
@@ -733,6 +733,9 @@ |
s = _EscapeEnvironmentVariableExpansion(s) |
s = _EscapeCommandLineArgumentForMSBuild(s) |
s = _EscapeMSBuildSpecialCharacters(s) |
+ # cl.exe replaces literal # characters with = in preprocesor definitions for |
+ # some reason. Octal-encode to work around that. |
+ s = s.replace('#', '\\%03o' % ord('#')) |
return s |