Skip to content

[clang] [docs] Clarify the issue with compiler-rt on Windows/MSVC#106875

Merged
mstorsjo merged 1 commit intollvm:mainfrom
mstorsjo:clang-complex-builtins
Sep 3, 2024
Merged

[clang] [docs] Clarify the issue with compiler-rt on Windows/MSVC#106875
mstorsjo merged 1 commit intollvm:mainfrom
mstorsjo:clang-complex-builtins

Conversation

@mstorsjo
Copy link
Copy Markdown
Member

Compiler-rt does support Windows just fine, even if outdated docs pages didn't list it as one of the supported OSes, this is being rectified in #106874.

MinGW is another environment configuration on Windows, where compiler-rt or libgcc is linked in automatically, so there's no issue with having such builtins functions available.

For MSVC style environments, compiler-rt builtins do work just fine, but Clang doesn't automatically link them in. See e.g. https://discourse.llvm.org/t/improve-autolinking-of-compiler-rt-and-libc-on-windows-with-lld-link/71392 for a discussion on how to improve this situation. But none of that issue is that compiler-rt itself wouldn't support Windows.

Compiler-rt does support Windows just fine, even if outdated docs
pages didn't list it as one of the supported OSes, this is being
rectified in llvm#106874.

MinGW is another environment configuration on Windows, where
compiler-rt or libgcc is linked in automatically, so there's no
issue with having such builtins functions available.

For MSVC style environments, compiler-rt builtins do work just fine,
but Clang doesn't automatically link them in. See e.g.
https://discourse.llvm.org/t/improve-autolinking-of-compiler-rt-and-libc-on-windows-with-lld-link/71392
for a discussion on how to improve this situation. But none of that
issue is that compiler-rt itself wouldn't support Windows.
@mstorsjo mstorsjo added documentation clang Clang issues not falling into any other category labels Aug 31, 2024
@mstorsjo mstorsjo requested review from AaronBallman, rnk and tru August 31, 2024 21:59
@llvmbot
Copy link
Copy Markdown
Member

llvmbot commented Aug 31, 2024

@llvm/pr-subscribers-clang

Author: Martin Storsjö (mstorsjo)

Changes

Compiler-rt does support Windows just fine, even if outdated docs pages didn't list it as one of the supported OSes, this is being rectified in #106874.

MinGW is another environment configuration on Windows, where compiler-rt or libgcc is linked in automatically, so there's no issue with having such builtins functions available.

For MSVC style environments, compiler-rt builtins do work just fine, but Clang doesn't automatically link them in. See e.g. https://discourse.llvm.org/t/improve-autolinking-of-compiler-rt-and-libc-on-windows-with-lld-link/71392 for a discussion on how to improve this situation. But none of that issue is that compiler-rt itself wouldn't support Windows.


Full diff: https://github.com/llvm/llvm-project/pull/106875.diff

1 Files Affected:

  • (modified) clang/www/c_status.html (+2-2)
diff --git a/clang/www/c_status.html b/clang/www/c_status.html
index 91638331be877a..255690cd6d34e2 100644
--- a/clang/www/c_status.html
+++ b/clang/www/c_status.html
@@ -1057,8 +1057,8 @@ <h2 id="c99">C99 implementation status</h2>
           conformance to Annex G.<br />
           <br />
           <code>_Complex</code> support requires an underlying support library
-          such as compiler-rt to provide functions like <code>__divsc3</code>,
-          but compiler-rt is not supported on Windows.
+          such as compiler-rt to provide functions like <code>__divsc3</code>.
+          Compiler-rt isn't linked in automatically in MSVC style environments.
         </details>
       </td>
     </tr>

Copy link
Copy Markdown
Collaborator

@AaronBallman AaronBallman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added @vitalybuka for awareness, but given that the other PR was accepted and landed, I think this one makes sense to land as well. LGTM, thank you!

@mstorsjo mstorsjo merged commit eb05e8f into llvm:main Sep 3, 2024
@mstorsjo mstorsjo deleted the clang-complex-builtins branch September 3, 2024 19:45
@h-vetinari
Copy link
Copy Markdown
Contributor

See e.g. https://discourse.llvm.org/t/improve-autolinking-of-compiler-rt-and-libc-on-windows-with-lld-link/71392 for a discussion on how to improve this situation.

Xref #63827

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang Clang issues not falling into any other category documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants