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: improve makefile to be os agnostic #52866

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

Conversation

anonrig
Copy link
Member

@anonrig anonrig commented May 6, 2024

For certain vsbuild.bat actions, it executes makefile and on PowerShell it was throwing error for me because uname doesn't exist. This pull-request doesn't solve all Windows related issues in makefile but makes the terminal output a lot cleaner.

cc @nodejs/platform-windows @nodejs/build

@anonrig anonrig requested review from targos and richardlau May 6, 2024 22:13
@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. needs-ci PRs that need a full CI run. labels May 6, 2024
@anonrig anonrig force-pushed the fix-windows-makefile branch 3 times, most recently from 4ca1542 to 9d29211 Compare May 7, 2024 00:44
@anonrig anonrig requested review from mcollina and jasnell May 7, 2024 01:08
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@anonrig anonrig requested a review from lemire May 8, 2024 00:14
@anonrig
Copy link
Member Author

anonrig commented May 8, 2024

cc @nodejs/platform-windows @lemire can you take a look?

ifeq ($(OS),Windows_NT)
OSTYPE := windows

ifeq ($(PROCESSOR_ARCHITEW6432),AMD64)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks wrong to me. You compare against AMD64 and if so, you set arm64, and so forth.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that this was meant to be ARM64?

ifeq ($(OS),Windows_NT)
OSTYPE := windows

ifeq ($(PROCESSOR_ARCHITEW6432),AMD64)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ifeq ($(PROCESSOR_ARCHITEW6432),AMD64)
ifeq ($(PROCESSOR_ARCHITEW6432),ARM64)

ARCHTYPE := arm64
else
ifeq ($(PROCESSOR_ARCHITECTURE),AMD64)
ARCHTYPE := arm64
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ARCHTYPE := arm64
ARCHTYPE := amd64

@lemire
Copy link
Member

lemire commented May 8, 2024

Unrelated to this PR, but do we build Node for Windows ARM64 in CI?

@targos
Copy link
Member

targos commented May 8, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants