Skip to content

Normalize Android NDK download host tag#3636

Open
fallintoplace wants to merge 2 commits into
apple:mainfrom
fallintoplace:fix/android-ndk-host-tag
Open

Normalize Android NDK download host tag#3636
fallintoplace wants to merge 2 commits into
apple:mainfrom
fallintoplace:fix/android-ndk-host-tag

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

Motivation

The Android NDK download script builds the archive URL with the raw output of uname -s. The Android NDK downloads page documents lowercase host tags in archive names, for example android-ndk-r27d-linux.zip.

Google's download endpoint currently accepts the old Linux casing too, but using the documented host tag keeps the URL construction predictable and avoids relying on that behavior.

Modification

Map known host OS values to the Android NDK archive host tags before constructing the download URL:

  • Linux -> linux
  • Darwin -> darwin
  • MINGW/MSYS/CYGWIN/Windows_NT -> windows

Unknown host values now fail with a clear error instead of constructing a likely-bad URL.

Result

The installer uses documented Android NDK archive names across recognized hosts.

Validation

  • bash -n scripts/install_android_ndk.sh
  • git diff --check
  • Verified the current r27d download names from the Android NDK downloads page and checked the r27d linux/darwin/windows ZIP URLs with curl HEAD.

@jakepetroules jakepetroules left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks correct to me!

@simonjbeaumont

Copy link
Copy Markdown
Contributor

Thanks!

@simonjbeaumont simonjbeaumont enabled auto-merge (squash) July 2, 2026 17:30
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