From a6eb660a3d02ad6260d3edb7b13b99549ee5bf94 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Tue, 11 Feb 2025 11:08:35 -0500 Subject: [PATCH] build: make gen-libc++-filenames.js produce the same results on Windows (#45577) Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Will Anderson --- script/gen-libc++-filenames.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/script/gen-libc++-filenames.js b/script/gen-libc++-filenames.js index 84cb2b2e3b3e..fb258cf89637 100644 --- a/script/gen-libc++-filenames.js +++ b/script/gen-libc++-filenames.js @@ -7,6 +7,7 @@ const check = process.argv.includes('--check'); function findAllHeaders (basePath) { const allFiles = fs.readdirSync(basePath); + allFiles.sort(); const toReturn = []; for (const file of allFiles) { const absPath = path.resolve(basePath, file); @@ -48,7 +49,7 @@ for (const folder of ['libc++', 'libc++abi']) { const libcxxIncludeDir = path.resolve(__dirname, '..', '..', 'third_party', folder, 'src', 'include'); const gclientPath = `third_party/${folder}/src/include`; - const headers = findAllHeaders(libcxxIncludeDir).map(absPath => path.relative(path.resolve(__dirname, '../..', gclientPath), absPath)); + const headers = findAllHeaders(libcxxIncludeDir).map(absPath => path.relative(path.resolve(__dirname, '../..', gclientPath), absPath).replaceAll('\\', '/')); const newHeaders = headers.map(f => `//${path.posix.join(gclientPath, f)}`); const content = `${prettyName}_headers = [