| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Review requested:
|
Sorry, something went wrong.
There was a problem hiding this comment.
It looks like a reasonable fix. Thank you!
Sorry, something went wrong.
|
I cherry-picked my commit from #46125 to test it. |
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
|
@eukarpov do you think the fix here is wrong? |
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
It is different than I proposed in my PR, however it looks good for me. |
Sorry, something went wrong.
|
I've tested this PR and it fixes x64 and x86 release builds nicely. However, when cross-compiling for ARM64 (eg. running vcbuild.bat release arm64 vs2022) I notice a new error: Microsoft (R) C/C++ Optimizing Compiler Version 19.34.31935 for ARM64 Copyright (C) Microsoft Corporation. All rights reserved. cl /c /P /Fi"..\..\out\Release\obj\v8_snapshot\embedded.S" /TC ..\..\out\Release\obj\v8_snapshot\\embedded.S embedded.S ..\..\out\Release\obj\v8_snapshot\\embedded.S : fatal error C1083: Cannot open compiler generated file: '..\..\out\Release\obj\v8_snapshot\embedded.S': Permission denied [E:\work\node\tools\v8_gypfiles\v8_snapshot.vcxproj] When cross-compiling on the main branch, I get the same linking errors as for the x64/x86 release builds: mksnapshot.obj : error LNK2001: unresolved external symbol "public: class v8::internal::Object __cdecl v8::internal::FixedArray::get(int)const " (?get@FixedArray@internal@v8@@QEBA?AVObject@23@H@Z) [E:\work\node\tools\v8_gypfiles\mksnapshot_host.vcxproj] platform-embedded-file-writer-aix.obj : error LNK2001: unresolved external symbol "public: class v8::internal::Object __cdecl v8::internal::FixedArray::get(int)const " (?get@FixedArray@internal@v8@@QEBA?AVObject@23@H@Z) [E:\work\node\tools\v8_gypfiles\mksnapshot_host.v cxproj] platform-embedded-file-writer-generic.obj : error LNK2001: unresolved external symbol "public: class v8::internal::Object __cdecl v8::internal::FixedArray::get(int)const " (?get@FixedArray@internal@v8@@QEBA?AVObject@23@H@Z) [E:\work\node\tools\v8_gypfiles\mksnapshot_ho st.vcxproj] platform-embedded-file-writer-mac.obj : error LNK2001: unresolved external symbol "public: class v8::internal::Object __cdecl v8::internal::FixedArray::get(int)const " (?get@FixedArray@internal@v8@@QEBA?AVObject@23@H@Z) [E:\work\node\tools\v8_gypfiles\mksnapshot_host.v cxproj] platform-embedded-file-writer-win.obj : error LNK2001: unresolved external symbol "public: class v8::internal::Object __cdecl v8::internal::FixedArray::get(int)const " (?get@FixedArray@internal@v8@@QEBA?AVObject@23@H@Z) [E:\work\node\tools\v8_gypfiles\mksnapshot_host.v cxproj] ..\..\out\Release\mksnapshot_host.exe : fatal error LNK1120: 1 unresolved externals [E:\work\node\tools\v8_gypfiles\mksnapshot_host.vcxproj] Could you please investigate this issue further and see what's the root cause? |
Sorry, something went wrong.
|
@StefanStojanovic PR #46231 should fix this issue |
Sorry, something went wrong.
Yes, it looks like it does. I tried building releases for all x86, x64, and ARM64 and all builds were successful. |
Sorry, something went wrong.
I played a little bit with it, and you are right: my solution worked fine for x86 and x64, but it failed for ARM64. Adding the metadata PreprocessedFileName for the MARMASM MSBuild items from #46231 implemented by @eukarpov fixes the problem. Though, I see that the solution is a bit incomplete: it generates save_registers_masm.S.pp file in the source folder instead of $(IntDir). The root cause of the access violation issue is that the embedded.S file is generated in the $(IntDir) folder while the preprocessed file name uses exactly the same path: <PreprocessedFileName Condition="'%(PreprocessedFileName)' == ''">$(IntDir)%(FileName)%(Extension)</PreprocessedFileName> from "c:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\BuildCustomizations\marmasm.props". My last commit implements the same fix as in PR #46231 by adding new directory.build.props file that locally overrides the marmasm.props definition by adding .pp extension. It also ensures that we always output .pp files to the $(IntDir). |
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM based on approval from Stefan from Microsoft team
Sorry, something went wrong.
PR-URL: #46228 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
PR-URL: #46228 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
Sorry, something went wrong.
PR-URL: #46228 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
PR-URL: #46228 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
Fixes Release build on VS2022 ARM64
| Back | FazBrowse Home | New Git URL |
This PR targets to address the Linker errors mentioned in Issue #43092 when we build Node.JS main branch in MSVC 2022 (Version 17.4.4).
Then, it fixes the VS2022 ARM64 build issue with file access violation originally fixed by PR #46231.
The fix adds PCH file to mksnapshot project in the v8.gyp file to solve #43092.
directory.build.props is added to override PreprocessedFileName output path to address the file access violation issue.
Details
When we build Node.JS Release in MSVC 2022 we see linker errors that mksnapshot cannot find FixedArray::get method. This is an example of the linker error from issue #43092:
It seemed that the inlined method FixedArray::get is optimized out.
We can either change V8 files and explicitly include fixed-array-inl.h file as in PR #46231, or we can use the forced file inclusion used by PCH files. Adding the MSVC specific PCH for mksnapshot project addresses the issue.
The root cause of the access violation issue is that the embedded.S file is generated in the $(IntDir) folder while the preprocessed file name uses exactly the same path: <PreprocessedFileName Condition="'%(PreprocessedFileName)' == ''">$(IntDir)%(FileName)%(Extension)</PreprocessedFileName> from "c:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\BuildCustomizations\marmasm.props". Thus, we are getting error because we try to change the embedded.S file while reading it.
In this PR we add new directory.build.props file that locally overrides the marmasm.props definition by adding .pp extension to the file name. It generates output file name that is different in from the input file name and addresses the file access violation issue.