mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[android] A few tweaks for native compilation and to get more tests working
Now that CMAKE_HOST_SYSTEM_NAME and CMAKE_SYSTEM_NAME are set by default to Android in the Termux app, make the needed tweaks. Some tests were adapted to work natively on Android too, adds sys/cdefs.h to the Bionic modulemap, and includes the start of native Android platform support in the build-script.
This commit is contained in:
@@ -402,9 +402,18 @@ def main():
|
||||
xfails = json.load(xfails_file)
|
||||
|
||||
make_dirs_if_needed(args.output_dir, args.dry_run)
|
||||
shared_output_lock = multiprocessing.Lock()
|
||||
pool = multiprocessing.Pool(args.jobs, set_up_child,
|
||||
(args, shared_output_lock))
|
||||
if 'ANDROID_DATA' not in os.environ:
|
||||
shared_output_lock = multiprocessing.Lock()
|
||||
pool = multiprocessing.Pool(args.jobs, set_up_child,
|
||||
(args, shared_output_lock))
|
||||
else:
|
||||
# Android doesn't support Python's multiprocessing as it doesn't have
|
||||
# sem_open, so switch to a ThreadPool instead.
|
||||
import threading
|
||||
shared_output_lock = threading.Lock()
|
||||
from multiprocessing.pool import ThreadPool
|
||||
pool = ThreadPool(args.jobs, set_up_child,
|
||||
(args, shared_output_lock))
|
||||
|
||||
interface_framework_dirs = (args.interface_framework_dirs or
|
||||
DEFAULT_FRAMEWORK_INTERFACE_SEARCH_PATHS)
|
||||
|
||||
Reference in New Issue
Block a user