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

Use ANDROID_NDK_ROOT instead of ANDROID_NDK_HOME #448

Merged
merged 1 commit into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
targets: armv7-linux-androideabi
- name: Build
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }}
run: |
./android-build cargo build --target="armv7-linux-androideabi"

Expand Down
8 changes: 4 additions & 4 deletions android-build
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,16 @@ def set_toolchain_binaries_in_env(toolchain_dir: str, env: Dict[str, str]):

def create_environment_for_build() -> Dict[str, str]:
env = os.environ.copy()
if "ANDROID_NDK_HOME" not in env:
raise Exception("Please set the ANDROID_NDK_HOME environment variable.")
if "ANDROID_NDK_ROOT" not in env:
raise Exception("Please set the ANDROID_NDK_ROOT environment variable.")

ndk_home_dir = env["ANDROID_NDK_HOME"]
ndk_home_dir = env["ANDROID_NDK_ROOT"]

# Check if the NDK version is 21
if not os.path.isfile(os.path.join(ndk_home_dir, 'source.properties')):
raise Exception(
"ANDROID_NDK should have file `source.properties`.\n" +
"The environment variable ANDROID_NDK_HOME may be set at a wrong path."
"The environment variable ANDROID_NDK_ROOT may be set at a wrong path."
)

with open(os.path.join(ndk_home_dir, 'source.properties'), encoding="utf8") as ndk_properties:
Expand Down
2 changes: 1 addition & 1 deletion mozjs-sys/makefile.cargo
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ ifneq ($(HOST),$(TARGET))
# non-developer builds, but NDK r25c ships with only lld.
CONFIGURE_FLAGS += \
--without-system-zlib \
--with-android-ndk=$(ANDROID_NDK_HOME) \
--with-android-ndk=$(ANDROID_NDK_ROOT) \
--with-android-version=$(ANDROID_API_LEVEL) \
--enable-linker=lld \
$(NULL)
Expand Down
Loading