[libcxx-commits] [PATCH] D97166: [libcxx] [docs] Update docs about how to build for Windows
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Mar 12 09:54:51 PST 2021
mstorsjo marked 4 inline comments as done.
mstorsjo added inline comments.
================
Comment at: libcxx/docs/BuildingLibcxx.rst:125
-DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=NO ^
\path\to\libcxx
+ > ninja cxx
----------------
Quuxplusone wrote:
> Why forward-slashes on line 123 and backslashes on line 125? I think they should be forward-slashes in both places, if that's possible (i.e. if it'd do the right thing). And if the backslashes are important for correctness, that should probably be explained here.
They're interpreted kinda differently - there's a lot of vague differences between if you run things in a bash shell, a cmd shell, or you pass paths that are interpreted by cmake at a later point. But it looks like this path works with forward slashes. And it turns out that `-DLLVM_PATH` actually is entirely unnecessary at this point, will remove that one.
================
Comment at: libcxx/docs/BuildingLibcxx.rst:129-133
+Note that if running in an MSYS2 shell and the MSYS2 provided clang package
+is installed, that one ends up picked up as tests invoke plain `clang++`
+instead of `clang-cl`. As the MSYS2 provided `clang++` binary defaults to
+a non-MSVC target, add `-DLIBCXX_TARGET_TRIPLE=x86_64-windows-msvc` to the
+cmake configuration in this case.
----------------
Quuxplusone wrote:
>
Thanks for the rewording.
One tweak though; adding that `LIBCXX_TARGET_TRIPLE` doesn't make it call `clang-cl` instead of `clang++`, but it adds `-target x86_64-windows-msvc` to the `clang++` command line.
What about "... you should tell `check-cxx` to make `clang++` use the right target by adding `-DLIBCXX_TARGET_TRIPLE=x86_64-windows-msvc` to the `cmake` command line above."?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97166/new/
https://reviews.llvm.org/D97166
More information about the libcxx-commits
mailing list