Pass /Fi with /P to ensure the .i file has a normalized name.
authorDavid Anderson <dvander@alliedmods.net>
Sat Feb 08 21:09:50 2014 -0800 (2014-02-08)
changeset 2400a3b3b549097
parent 239 b7f3bcd06c99
child 241 7d323620251f
Pass /Fi with /P to ensure the .i file has a normalized name.
ambuild2/frontend/cpp.py
     1.1 --- a/ambuild2/frontend/cpp.py	Sat Feb 08 20:41:46 2014 -0800
     1.2 +++ b/ambuild2/frontend/cpp.py	Sat Feb 08 21:09:50 2014 -0800
     1.3 @@ -53,8 +53,8 @@
     1.4    def formatInclude(self, outputPath, includePath):
     1.5      return ['/I', self.IncludePath(outputPath, includePath)]
     1.6  
     1.7 -  def preprocessArgs(self, sourceFile):
     1.8 -    return ['/showIncludes', '/nologo', '/P', '/c', sourceFile]
     1.9 +  def preprocessArgs(self, sourceFile, outFile):
    1.10 +    return ['/showIncludes', '/nologo', '/P', '/c', sourceFile, '/Fi' + outFile]
    1.11  
    1.12    def objectArgs(self, sourceFile, objFile):
    1.13      return ['/showIncludes', '/nologo', '/c', sourceFile, '/Fo' + objFile]
    1.14 @@ -438,7 +438,7 @@
    1.15          cl_argv += [vendor.definePrefix + define for define in defines]
    1.16          for include in (self.compiler.includes + self.compiler.cxxincludes):
    1.17            cl_argv += vendor.formatInclude(objectFile, include)
    1.18 -        cl_argv += vendor.preprocessArgs(sourceFile)
    1.19 +        cl_argv += vendor.preprocessArgs(sourceFile, encname + '.i')
    1.20  
    1.21          rc_argv = ['rc', '/nologo']
    1.22          for define in defines: