Skip to content

Commit ac8c071

Browse files
committed
scripts: waifulib: xcompile: enable cross compilation automatically if CROSS_COMPILE environment variable is set
1 parent f5d79d8 commit ac8c071

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

scripts/waifulib/xcompile.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
23: 16,
3333
25: 19,
3434
27: 19,
35-
28: 19,
35+
28: 21,
3636
} # minimal API level ndk revision supports
3737

3838
ANDROID_STPCPY_API_MIN = 21 # stpcpy() introduced in SDK 21
@@ -541,16 +541,10 @@ def options(opt):
541541
help='enable building for Sailfish/Aurora')
542542
xc.add_option('--emscripten', action='store_true', dest='EMSCRIPTEN', default = None,
543543
help='enable building for Emscripten')
544-
xc.add_option('--enable-cross-compile-env', action='store_true', dest='CROSS_COMPILE_ENV', default=None,
545-
help='like Kbuild (Linux kernel buildsystem), set toolchain from CROSS_COMPILE variable [default: %(default)s]')
546544

547545
def configure(conf):
548-
if conf.options.CROSS_COMPILE_ENV:
549-
try:
550-
toolchain_path = conf.environ['CROSS_COMPILE']
551-
except KeyError:
552-
conf.fatal('Set CROSS_COMPILE environment variable to toolchain prefix (usually in form of path and triplet, ending with -)')
553-
546+
if 'CROSS_COMPILE' in conf.environ:
547+
toolchain_path = conf.environ['CROSS_COMPILE']
554548
conf.environ['CC'] = toolchain_path + 'cc'
555549
conf.environ['CXX'] = toolchain_path + 'c++'
556550
conf.environ['STRIP'] = toolchain_path + 'strip'

0 commit comments

Comments
 (0)