Bug 1642658 - Android SDK/NDK root should replace file separator with '/'. r=froydnj
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Wed, 03 Jun 2020 15:32:30 +0000
changeset 597919 e87e4800d332c50a117e8d0a879809db9eb965dc
parent 597918 a900282391e15be8a8f9ed9782a550ff6be11cc7
child 597920 6bb6a5cdc941eaa15c0e36dcaf8e4ad8509d4e90
push id13310
push userffxbld-merge
push dateMon, 29 Jun 2020 14:50:06 +0000
treeherdermozilla-beta@15a59a0afa5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1642658
milestone79.0a1
first release with
nightly linux32
e87e4800d332 / 79.0a1 / 20200604092907 / files
nightly linux64
e87e4800d332 / 79.0a1 / 20200604092907 / files
nightly mac
e87e4800d332 / 79.0a1 / 20200604092907 / files
nightly win32
e87e4800d332 / 79.0a1 / 20200604092907 / files
nightly win64
e87e4800d332 / 79.0a1 / 20200604092907 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1642658 - Android SDK/NDK root should replace file separator with '/'. r=froydnj When not using --with-android-ndk, NDK root is `~/.mozbuild/android-ndk-r20`. When building this NDK path, since we use `os.path.join`, so it may include "\" as file separator on Windows host. Then some options such as `-gcc-toolchain` become invalid path (ex. `C:/users/makoto.mozbuildandroid-ndk-r20/`..). So we should replace file separator with "/". Differential Revision: https://phabricator.services.mozilla.com/D77820
build/moz.configure/android-ndk.configure
build/moz.configure/android-sdk.configure
--- a/build/moz.configure/android-ndk.configure
+++ b/build/moz.configure/android-ndk.configure
@@ -1,21 +1,21 @@
 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 
 @depends(mozbuild_state_path, '--help')
-@imports('os')
+@imports(_from='os.path', _import='isdir')
 @imports(_from='mozboot.android', _import='NDK_VERSION')
 def default_android_ndk_root(mozbuild_state_path, _):
     path = os.path.join(mozbuild_state_path, 'android-ndk-%s' % NDK_VERSION)
-    if os.path.isdir(path):
+    if isdir(path):
         return path
 
 
 js_option('--with-android-ndk', nargs=1,
           default=default_android_ndk_root,
           help='location where the Android NDK can be found{|}')
 
 js_option('--with-android-toolchain', nargs=1,
--- a/build/moz.configure/android-sdk.configure
+++ b/build/moz.configure/android-sdk.configure
@@ -3,26 +3,26 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 # Ensure Android SDK and build-tools versions depending on mobile target.
 
 
 @depends(host, mozbuild_state_path, '--help')
-@imports('os')
+@imports(_from='os.path', _import='isdir')
 def default_android_sdk_root(host, mozbuild_state_path, _):
     sdk_basename = {
         'Darwin': 'android-sdk-macosx',
         'Linux': 'android-sdk-linux',
         'WINNT': 'android-sdk-windows',
     }.get(host.kernel)
     if sdk_basename:
         path = os.path.join(mozbuild_state_path, sdk_basename)
-        if os.path.isdir(path):
+        if isdir(path):
             return path
 
 
 option('--with-android-sdk', nargs=1,
        default=default_android_sdk_root,
        help='location where the Android SDK can be found (like ~/.mozbuild/android-sdk-linux){|}')