[PATCH] D82437: [ELF] Add --dependency-file option

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 16 19:40:05 PDT 2020


phosek added inline comments.
Herald added a subscriber: dang.


================
Comment at: lld/ELF/Driver.cpp:1591
+        unsigned j = i;
+        while (j > 0 && nativePath[--j] == '\\')
+          os << '\\';
----------------
MaskRay wrote:
> MaskRay wrote:
> > The backslash escaping rule is complex. Do you have a description how it works? We should have a test as well. If it can cause problems on Windows, add `UNSUPPORTED: system-windows`
> @mcgrathr https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=f37b21b481a7804a13c5806098c19b6119288ba4 does not escape `$` or `\`
See the comment above this lambda:
```
We use the same escape rules as Clang/GCC which are accepted by Make/Ninja:
* A space is escaped by a backslash which itself must be escaped.
* A hash sign is escaped by a single backslash.
* $ is escapes as $$.
```
I can drop this if we decide that we don't want to support escaping, but I wanted to match what the existing consumers expect.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82437/new/

https://reviews.llvm.org/D82437





More information about the llvm-commits mailing list