================
@@ -684,6 +684,8 @@ static StringRef getArchNameForCompilerRTLib(const 
ToolChain &TC,
 StringRef ToolChain::getOSLibName() const {
   if (Triple.isOSDarwin())
     return "darwin";
+  if (Triple.isWindowsCygwinEnvironment())
+    return "cygwin";
----------------
tyan0 wrote:

My apologies for replying so late.

ToolChain::getOS() returns "windows", since the Triple is 
"x86_64-pc-windows-cygnus".

After investigating the issue again, I found that the problem was simply caused 
by llvm/clang being built with `LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON` while 
compiler-rt was built with `LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF`.
Setting both to `LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON` works.
Therefore, this fix is not necessary.

However, setting `LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF` for both does not 
work. I still investigation that. It seems that clang ignores 
`LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF`.

https://github.com/llvm/llvm-project/pull/147960
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to