[PATCH] D112787: [Support] Allow configuring the preferred type of slashes on Windows

Aaron Ballman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 4 14:34:14 PDT 2021


aaron.ballman added inline comments.


================
Comment at: llvm/CMakeLists.txt:357
+set(WINDOWS_PREFER_FORWARD_SLASH_DEFAULT OFF)
+if (MINGW)
+  set(WINDOWS_PREFER_FORWARD_SLASH_DEFAULT ON)
----------------
mstorsjo wrote:
> aaron.ballman wrote:
> > Should this also happen for cygwin?
> I think cygwin shouldn't matter here - cygwin mostly presents itself as a unix; it doesn't define `_WIN32` when compiling etc, so on cygwin you'd get the posix path style.
Ooohh! So because `_WIN32` isn't defined, we will prefer forward slashes already? (What confused me is this looks like it prefers backslash on *all* Windows targets except mingw and it seems like we want the same for cygwin.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112787



More information about the llvm-commits mailing list