Skip to content

Android.mk: guard with NDK_ROOT - #6925

Merged
s-perron merged 1 commit into
KhronosGroup:mainfrom
rjodinchr:ndk-root
Oct 2, 2026
Merged

s-perron merged 1 commit into
KhronosGroup:mainfrom
rjodinchr:ndk-root

Conversation

@rjodinchr

Copy link
Copy Markdown
Contributor

Wrap the contents of Android.mk in ifdef NDK_ROOT ... endif.

Android.mk in this repository is intended solely for standalone Android NDK builds (ndk-build). When the repository is vendored or imported into an Android platform tree (AOSP / Soong), the platform build system (Kati) discovers and evaluates this file. This can cause build failures, such as module name collisions with Soong's Android.bp (e.g. duplicate definitions for SPIRV-Tools) and missing NDK-specific variables.

Because NDK_ROOT is set by the NDK's core build scripts during ndk-build but is unset during Android platform builds, this guard ensures the file is treated as a no-op during platform builds while keeping ndk-build functional.

Wrap the contents of Android.mk in `ifdef NDK_ROOT ... endif`.

Android.mk in this repository is intended solely for standalone Android
NDK builds (`ndk-build`). When the repository is vendored or imported into
an Android platform tree (AOSP / Soong), the platform build system (Kati)
discovers and evaluates this file. This can cause build failures, such as
module name collisions with Soong's Android.bp (e.g. duplicate definitions
for `SPIRV-Tools`) and missing NDK-specific variables.

Because `NDK_ROOT` is set by the NDK's core build scripts during `ndk-build`
but is unset during Android platform builds, this guard ensures the file
is treated as a no-op during platform builds while keeping `ndk-build`
functional.
@rjodinchr

Copy link
Copy Markdown
Contributor Author

@s-perron could you please take a look?

@CLAassistant

CLAassistant commented Oct 2, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@enh-google enh-google left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

thanks!

@s-perron
s-perron enabled auto-merge (squash) October 2, 2026 13:34
@s-perron
s-perron merged commit 1ba1f5b into KhronosGroup:main Oct 2, 2026
25 of 27 checks passed
@rjodinchr
rjodinchr deleted the ndk-root branch October 2, 2026 14:35
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.

5 participants