1
0
Эх сурвалжийг харах

Ninja: Restore support for non-ascii paths on Windows with ninja<=1.10

Revert commit bbdb000c55 (GlobalNinjaGenerator: enlarge file stream
buffer, 2022-01-25, v3.23.0-rc1~68^2).  Somehow `rdbuf()->pubsetbuf()`
is resetting our imbued locale and `cm_codecvt` that handles encoding.

Fixes: #24089
Brad King 3 жил өмнө
parent
commit
02a04dd9c7

+ 0 - 13
Source/cmGlobalNinjaGenerator.cxx

@@ -1025,19 +1025,6 @@ bool cmGlobalNinjaGenerator::OpenBuildFileStreams()
     return false;
     return false;
   }
   }
 
 
-  // New buffer size 8 MiB
-  constexpr auto buildFileStreamBufferSize = 8 * 1024 * 1024;
-
-  // Ensure the buffer is allocated
-  if (!this->BuildFileStreamBuffer) {
-    this->BuildFileStreamBuffer =
-      cm::make_unique<char[]>(buildFileStreamBufferSize);
-  }
-
-  // Enlarge the internal buffer of the `BuildFileStream`
-  this->BuildFileStream->rdbuf()->pubsetbuf(this->BuildFileStreamBuffer.get(),
-                                            buildFileStreamBufferSize);
-
   // Write a comment about this file.
   // Write a comment about this file.
   *this->BuildFileStream
   *this->BuildFileStream
     << "# This file contains all the build statements describing the\n"
     << "# This file contains all the build statements describing the\n"

+ 0 - 1
Source/cmGlobalNinjaGenerator.h

@@ -529,7 +529,6 @@ private:
   /// The file containing the build statement. (the relationship of the
   /// The file containing the build statement. (the relationship of the
   /// compilation DAG).
   /// compilation DAG).
   std::unique_ptr<cmGeneratedFileStream> BuildFileStream;
   std::unique_ptr<cmGeneratedFileStream> BuildFileStream;
-  std::unique_ptr<char[]> BuildFileStreamBuffer;
   /// The file containing the rule statements. (The action attached to each
   /// The file containing the rule statements. (The action attached to each
   /// edge of the compilation DAG).
   /// edge of the compilation DAG).
   std::unique_ptr<cmGeneratedFileStream> RulesFileStream;
   std::unique_ptr<cmGeneratedFileStream> RulesFileStream;