[PATCH] D141738: Add initial support for cross compile Windows runtimes under Linux when building Fuchsia clang toolchain
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 31 23:38:54 PST 2023
phosek added inline comments.
================
Comment at: clang/cmake/caches/Fuchsia-stage2.cmake:95
+ # and remove these libpath flags.
+ -libpath:"${LLVM_WINSYSROOT}/VC/Tools/MSVC/14.34.31933/lib/x64"
+ -libpath:"${LLVM_WINSYSROOT}/VC/Tools/MSVC/14.34.31933/atlmfc/lib/x64"
----------------
phosek wrote:
> haowei wrote:
> > thakis wrote:
> > > You can tell cmake to invoke lld-link, which has a /winsysroot: flag.
> > What would be a good way to make CMake invoke lld-link (or through clang-cl) instead of using `cmake vs_link` in this situation?
> > We thought about using
> >
> > ```
> > set(CMAKE_${LANG}_SIMULATE_ID "MSVC")
> > set(CMAKE_${LANG}_COMPILER_FRONTEND_VARIANT "GNU")
> > ```
> >
> > but I don't feel great about changing variables that are not suppose to change.
> Wouldn't CMake use `lld-link` if you set `CMAKE_LINKER=lld-link`. We already do this in https://github.com/llvm/llvm-project/blob/0e09bb8b143c80426c497a924ee4fa57a26af6b5/llvm/cmake/modules/LLVMExternalProjectUtils.cmake#L179 which is used by the bootstrapping build so you should be able to use `/winsysroot:` here.
@haowei have tried this suggestion?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141738/new/
https://reviews.llvm.org/D141738
More information about the llvm-commits
mailing list