Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 3, 2024

Conversation

mstorsjo
Copy link
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 tru, rnk and AaronBallman August 31, 2024 21:59
@llvmbot
Copy link
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
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
11 checks passed
@mstorsjo mstorsjo deleted the clang-complex-builtins branch September 3, 2024 19:45
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.

4 participants