build: make gen-libc++-filenames.js produce the same results on Windows (#45576)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Will Anderson <will@itsananderson.com>
This commit is contained in:
parent
a1b846c9e5
commit
66eb15d093
1 changed files with 2 additions and 1 deletions
|
@ -7,6 +7,7 @@ const check = process.argv.includes('--check');
|
||||||
|
|
||||||
function findAllHeaders (basePath) {
|
function findAllHeaders (basePath) {
|
||||||
const allFiles = fs.readdirSync(basePath);
|
const allFiles = fs.readdirSync(basePath);
|
||||||
|
allFiles.sort();
|
||||||
const toReturn = [];
|
const toReturn = [];
|
||||||
for (const file of allFiles) {
|
for (const file of allFiles) {
|
||||||
const absPath = path.resolve(basePath, file);
|
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 libcxxIncludeDir = path.resolve(__dirname, '..', '..', 'third_party', folder, 'src', 'include');
|
||||||
const gclientPath = `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 newHeaders = headers.map(f => `//${path.posix.join(gclientPath, f)}`);
|
||||||
const content = `${prettyName}_headers = [
|
const content = `${prettyName}_headers = [
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue