mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 18:37:34 +00:00
LibJS: Do not use the $
special character in file names
The dollar sign is a special character in POSIX shells and in the Ninja build file format. If the file name contains a `$`, something goes wrong in the escaping/unescaping of this symbol, and CMake/GCC/Clang generate invalid dependency files where not all instances of `$` are escaped properly. Because of this, Ninja fails to rebuild `$262Object.cpp` if the headers included by it have changed. Stale `$262Object.cpp.o` files have been the cause of mysterious crashes multiple times which only go away after doing a clean build. Let's prevent these from happening again by removing the `$` from the filename.
This commit is contained in:
parent
2b46e6f664
commit
e64a8751d1
7 changed files with 8 additions and 9 deletions
|
@ -39,10 +39,7 @@ paths = []
|
|||
for containing_path in PATHS_TO_SEARCH:
|
||||
for root, dirs, files in os.walk(userland_path / containing_path):
|
||||
for file in files:
|
||||
# FIXME: The dollar sign in $262Object.cpp gets corrupted in compile_commands.json somehow, and
|
||||
# ends up as "\\$$262Object.cpp". This results in a clang error, so we just ignore the
|
||||
# file here
|
||||
if file.endswith('.cpp') and not file.endswith('262Object.cpp'):
|
||||
if file.endswith('.cpp'):
|
||||
paths.append(Path(root) / file)
|
||||
|
||||
|
||||
|
|
|
@ -36,10 +36,10 @@ shared_library("LibJS") {
|
|||
"Bytecode/RegexTable.cpp",
|
||||
"Bytecode/StringTable.cpp",
|
||||
"Console.cpp",
|
||||
"Contrib/Test262/262Object.cpp",
|
||||
"Contrib/Test262/AgentObject.cpp",
|
||||
"Contrib/Test262/GlobalObject.cpp",
|
||||
"Contrib/Test262/IsHTMLDDA.cpp",
|
||||
"Contrib/Test262/\$262Object.cpp",
|
||||
"CyclicModule.cpp",
|
||||
"Heap/BlockAllocator.cpp",
|
||||
"Heap/Cell.cpp",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue