Skip to content

Commit 4021215

Browse files
debbs061targos
authored andcommittedOct 2, 2024
doc: clarify useCodeCache setting for cross-platform SEA generation
PR-URL: #53994 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
1 parent b25563d commit 4021215

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
 

‎doc/api/single-executable-applications.md

+7
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,13 @@ If the paths are not absolute, Node.js will use the path relative to the
190190
current working directory. The version of the Node.js binary used to produce
191191
the blob must be the same as the one to which the blob will be injected.
192192
193+
Note: When generating cross-platform SEAs (e.g., generating a SEA
194+
for `linux-x64` on `darwin-arm64`), `useCodeCache` and `useSnapshot`
195+
must be set to false to avoid generating incompatible executables.
196+
Since code cache and snapshots can only be loaded on the same platform
197+
where they are compiled, the generated executable might crash on startup when
198+
trying to load code cache or snapshots built on a different platform.
199+
193200
### Assets
194201
195202
Users can include assets by adding a key-path dictionary to the configuration

0 commit comments

Comments
 (0)
Please sign in to comment.