-
Notifications
You must be signed in to change notification settings - Fork 289
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
Resurrect Windows-2022 with LLVM 16 #1092
Conversation
This PR likely requires a few rounds of iteration. It fails in CI and locally in the same way:
These errors occur because the compilation is using a Windows SDK version of
Hopefully there is bazel option to say ignore Windows Kits and Visual Studio... |
Capturing the build output with It looks like undefining OPENSSL_SSE2 in LLVM 16 release notes: https://releases.llvm.org/16.0.0/docs/ReleaseNotes.html The INCLUDE env variable is defined as here for builds with either LLVM version: Update: doh! I think we can probably specify per file headers for hrss.c that override the paths from the INCLUDE env var. It looks like LLVM 15 and LLVM 16 may treat the order there differently, e.g. LLVM 15 is picking up the LLVM includes (last in INCLUDE); LLVM 16 is picking up Windows Kits version and LLVM includes are still last in INCLUDE. |
As a temporary band-aid, this lets the build to get past the ssl compilation failure:
but will require Windows devs to update the LLVM version and is super fragile. https://clang.llvm.org/docs/UsersManual.html#clang-cl The next failure after this appears to be relatively old intrinsics in V8 code not being replaced by the compiler. Adding
Example error:
|
e8e1514
to
5706ae1
Compare
Progress: manually setting Kludging these out seems doable, but not desirable. Here's a couple of likely related discussions of intrinsics and clang-cl:
Next step, rebuild with LLVM 15 and disassemble the binaries to grok whether intrinsics were transformed appropriately, or something else (predefined macros) has changed, between 15 and 16. |
The Intel Intrinsics Guide maps intrinsics to instructions that show up in the
Two V8 object files that reported linkage errors for intrinsics (e.g.
It looks like clang-cl.exe in LLVM 16 is not substituting intrinsics in these files and leaving functions to be linked. |
b066823
to
830ebad
Compare
830ebad
to
ff7b832
Compare
This passes locally and has passed on github, but the last build flaked out fetching dependencies on Linux... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but let's keep the branch protection turned off for now while waiting for the official fix.
3ebdb84
to
b54a83c
Compare
cab2aa5
to
047ab30
Compare
047ab30
to
60d9cb7
Compare
This is required due to actions/runner-images#8125 An assortment of changes to enable building with the LLVM16 toolchain on Windows: - add Windows-2022 back to the test strategy matrix in test.yml. - add an LLVM upgrade step to test.yml to install LLVM 16 - add command to test.yml to fix the include path for LLVM includes (Bazel issue bazelbuild/bazel#17863). - add a macro definition to .bazelrc to prefer __builtin_offsetof (the offsetof macro without this is broken under LLVM16). - add enforced include path override to files including emmintrin.h. clang-cl.exe in LLVM15 picks up the LLVM version of this file, but LLVM16 was picking up the MSFT version and preventing the compiler from replacing intrinsics. It looks like there is a change in precedence between LLVM15 and LLVM16 for the include path setup by Bazel in the INCLUDE environment variable. Test: Install LLVM16, fix the LLVM include directory location for bazel, then run `bazel test //...`
4873b05
to
d9338a6
Compare
|
This is required due to actions/runner-images#8125
An assortment of changes to enable building with the LLVM16 toolchain on Windows:
(Bazel issue Wrong include path to Clang 16 on Windows bazelbuild/bazel#17863).
(the offsetof macro without this is broken under LLVM16).
clang-cl.exe in LLVM15 picks up the LLVM version of this file, but
LLVM16 was picking up the MSFT version and preventing the compiler
from replacing intrinsics. It looks like there is a change in
precedence between LLVM15 and LLVM16 for the include path setup by
Bazel in the INCLUDE environment variable.