Skip to content

build: separate Android host and target compilers - #65772

Open
luoqianlin wants to merge 1 commit into
nodejs:mainfrom
luoqianlin:android-host-target-compilers
Open

build: separate Android host and target compilers#65772
luoqianlin wants to merge 1 commit into
nodejs:mainfrom
luoqianlin:android-host-target-compilers

Conversation

@luoqianlin

@luoqianlin luoqianlin commented Sep 4, 2026

Copy link
Copy Markdown

Fix Android cross-compilation by keeping host and target compilers separate.

The Android configure helper uses the Android compiler for configure.py's
target compiler detection and for GYP target rules, while host-side tools such
as ICU and V8 generators use a native compiler.

This change:

  • Keeps explicit CC_target/CXX_target values authoritative.
  • Treats conventional CC/CXX values as target compiler overrides when
    toolset-specific values are not set.
  • Uses native gcc/g++ (or the platform equivalent) as host defaults while
    preserving explicit CC_host/CXX_host overrides.
  • Accepts additional configure options and invokes configure without shell
    command concatenation.

NDK r29 with Android API 30 and arm64 is the current validation baseline.

Refs: #65771

Validation:

  • python3 -m py_compile android_configure.py
  • git diff --check
  • Android arm64/API 30 configure and build.

@MikeMcC399 MikeMcC399 added the android Issues and PRs related to the Android platform. label Sep 4, 2026
@luoqianlin
luoqianlin force-pushed the android-host-target-compilers branch from d420f3c to 64f6ade Compare September 4, 2026 12:33
@luoqianlin
luoqianlin requested a review from a team as a code owner September 4, 2026 12:33
@MikeMcC399

This comment was marked as resolved.

Signed-off-by: luoqianlin <qianlinluo@foxmail.com>
@luoqianlin
luoqianlin force-pushed the android-host-target-compilers branch from 64f6ade to 5eef8a0 Compare September 4, 2026 12:38
@aduh95
aduh95 removed the request for review from a team September 4, 2026 13:21
@luoqianlin

Copy link
Copy Markdown
Author

The branch has been corrected and force-pushed after the earlier bad-base update. It is now a single commit based on current main and changes only android_configure.py (33 insertions, 5 deletions). The current PR diff no longer includes the unrelated thousands of files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

android Issues and PRs related to the Android platform.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants