-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
build: build release/CI on non-Windows with code cache #22934
Conversation
This is the minimal change to enable code cache in CI/release builds on non-Windows. (Needs another PR to vcbuild.bat to enable it on Windows). The normal dev flow is unaltered because currently `make test` does not run configure automatically. To enable code cache locally (so that the tests run faster) one will need to run `make with-code-cache` first to persist the configure options to `./config.status`. If that target has never been run, the build flow is the same as before except that the code cache test will be skipped instead of being ignored.
The corss-compile job wasn't happy, could be the CONFIG_FLAGS in the CI is in conflict with the changes here in the Makefile. It maybe more viable to do this change in Jenkins. |
Given that the job is cross compiling, do we expect the compiled node binary to be runnable on the host? |
Based on https://ci.nodejs.org/job/node-cross-compile/18938/nodes=cross-compiler-armv6-gcc-4.9.4/console
From
So |
https://ci.nodejs.org/job/node-test-commit-linux-containered/nodes=ubuntu1604_sharedlibs_withoutintl_x64/7178/console also fails with:
(the inspector is not expected to be available with non-intl builds). |
Ah right, the cross-compile jobs runs build-ci in one go on the host... |
So..two (better?) solutions:
(Of course there is always the option of refactoring the node.cc so that we can build a separate executable to produce the code cache, but that's probably not going to happen anytime soon) |
Code cache is not platform-independent, since object layout is different between 32-bit and 64-bit platforms. That said, you can definite cross-compile since whatever your setup is, already configures the host to run V8 with simulator to be able to produce the correct startup snapshot. |
The V8 is build as such. There is I'm planning on PRing a similar structure for node (for example that way I'll put this high in the backlog. |
That's what I've been wondering about..like how we managed to run |
If you are for example cross-compiling V8 on your Intel desktop for arm32, then
|
Superseded by #27161 |
We still need to activate this for the ARM cross compiled binaries. I think it will just work, but it will need to build everything for the host as well as for the target, and I'm worried about CI times 🤷♂️ |
This is the minimal change to enable code cache in
CI/release builds on non-Windows.
(Needs another PR to vcbuild.bat to enable it on Windows).
The normal dev flow is unaltered because currently
make test
does not run configure automatically.To enable code cache locally (so that the tests run faster) one will
need to run
make with-code-cache
first to persist theconfigure options to
./config.status
. If that target hasnever been run, the build flow is the same as before except
that the code cache test will be skipped instead of being ignored.
Refs: #21563
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes