Skip to content
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: set node_arch to target_cpu in GN #55967

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

codebytere
Copy link
Member

When building Node.js using the GN build, it would fail when cross-compiling, e.g.

./tools/gn-gen.py out/Release --target_cpu=arm64

becuase node_arch was being improperly set to current_cpu in every case and thus the startup snapshot wouldn't match:

if (metadata.node_arch != per_process::metadata.arch) {
fprintf(stderr,
"Failed to load the startup snapshot because it was built with"
"architecture %s and the architecture is %s.\n",
metadata.node_arch.c_str(),
NODE_ARCH);
return false;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants