aboutsummaryrefslogtreecommitdiffstats
path: root/build.py
diff options
context:
space:
mode:
Diffstat (limited to 'build.py')
-rwxr-xr-xbuild.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/build.py b/build.py
index 4cff80a50..34cc19f5b 100755
--- a/build.py
+++ b/build.py
@@ -25,10 +25,6 @@ import sys
def android_path(path=''):
top = os.getenv('ANDROID_BUILD_TOP', '')
- if not top:
- sys.exit('ANDROID_BUILD_TOP not set. Cannot continue.\n'
- 'Please set ANDROID_BUILD_TOP to point to the root of an '
- 'Android tree.')
return os.path.realpath(os.path.join(top, path))
@@ -98,6 +94,10 @@ def sysroot_path(toolchain):
def main():
args = ArgParser().parse_args()
+ if 'ANDROID_BUILD_TOP' not in os.environ:
+ top = os.path.join(os.path.dirname(__file__), '../..')
+ os.environ['ANDROID_BUILD_TOP'] = os.path.realpath(top)
+
os.chdir(android_path('toolchain/gcc'))
toolchain_path = android_path('toolchain')