📜 ⬆️ ⬇️

CrystaX NDK 10.3.0 Released

The new version of CrystaX NDK 10.3.0 is available for download.

The most important changes in this release are:


')
In addition, many bugs were fixed and a huge amount of improvements were made. Below you can find more detailed information.


New GCC and LLVM / clang



In this release, we added new toolchains based on gcc-5.3 and llvm-3.7 . Old gcc-4.9 and llvm-3.6 are also present for compatibility, but will be removed in the next release.

Needless to say, this means for developers, especially in light of the actively developing gcc and clang in terms of supporting the new C, C ++ and Objective-C standards. Now you can use the most advanced language features for Android.

Also, in this release, we switched completely to our own GCC and LLVM / clang branches, which are based on upstream with minimal dot edits (previously gcc and clang in CrystaX NDK were branched from Google's gcc and clang). Such a decision was helped by the fact that we have accumulated a rather large “test mass”, which allows us to state with a certain degree of confidence that the compiler, coping with all our tests, is a good, working compiler.

Although this decision was difficult, it turned out to be very true, because Now the process of updating gcc and clang to new versions is very simple and happens in semi-automatic mode. So, the upgrade to gcc-5.3 took only three days, of which 20 minutes took the merger with upstream, the next 20 hours - building a new build and another two days - a full run of automatic tests. Of these, only the first part required manual work.

$ $NDK/toolchains/arm-linux-androideabi-5/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --version arm-linux-androideabi-gcc (GCC) 5.3 20151204 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ $NDK/toolchains/llvm-3.7/prebuilt/linux-x86_64/bin/clang -target armv7-none-linux-androideabi --version clang version 3.7 Target: armv7-none-linux-android Thread model: posix 


Improved Objective-C v2



We have greatly improved the Objective-C v2 runtime and this allowed us to include all the language features of the modern Objective-C - Automatic Reference Counting , Objective-C Literals syntax , etc. Also, in this release we added Objective-C frameworks CoreData, CoreText, CoreGraphics and CoreVideo, in addition to the previously added Foundation and CoreFoundation.

For convenience, an example was created showing how Objective-C can be used to develop a project right away for iOS and Android.

ATTENTION! All the declared features of modern Objective-C v2 are available only when using LLVM / clang. If you are using ndk-build, the easiest way to specify this is to add the following lines to Application.mk:

 # Application.mk NDK_TOOLCHAIN_VERSION := clang 


Python for Android



We provide compiled python-2.7 and python-3.5 binaries (executable files, libraries, and header files) for all supported Android ABIs. Like all other similar packages in the CrystaX NDK, Python was built from official sources, without a single change in its code. This is a direct consequence of our approach: when something is not collected, we do not rule the collected code. Instead, we are fixing CrystaX NDK, making the behavior of lower-level libraries compliant with standards (POSIX and de facto standards like GNU / Linux).

The CrystaX NDK's Python is still in experimental condition, although it works quite well, as far as we can see. However, it is not yet as well tested as other components, so there may be bugs or partially missing functionality. In case you find such flaws, feel free to tell us about them !

We want to say a big thank you to Vitaly Murashev ( @ vitaly-murashev ) - Python appeared in CrystaX NDK mainly thanks to his help. This is how open source works: do something for fun and share the results with the community. Vitaly, thanks again!

The compiled Python binaries are in the $ NDK / sources / python / 2.7 and $ NDK / sources / python / 3.5 directories. If you are using ndk-build, here is an example of using Python in your project:

 # Android.mk LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := mymodule LOCAL_SRC_FILES := ... LOCAL_SHARED_LIBRARIES := python_shared include $(BUILD_SHARED_LIBRARY) # Replace 3.5 by 2.7 if needed $(call import-module,python/3.5) 


POSIX support



We continue to improve POSIX support in the CrystaX NDK. In this release, we transferred even more POSIX interfaces to libcrystax.so (the heart of CrystaX NDK), so now it depends on Google libc even less. In fact, the only major part of POSIX not yet implemented in libcrystax.so is POSIX threads. This is what we are going to fix in the next release. Thus, we can get rid of the dependence on Google libc, completely replacing it with libcrystax.so.

As part of our work to improve POSIX support, we have integrated the Open POSIX Test Suite into the CrystaX NDK automated testing process. Because of this, we can be sure that libcrystax.so provides an implementation that is truly POSIX compliant.

Boost 1.59.0



We have included Boost 1.59.0 libraries and header files in CrystaX NDK. Now they are going in two versions - using GNU libstdc ++ and LLVM libc ++ implementations of the standard C ++ library. Previously, we provided Boost libraries compiled only with GNU libstdc ++, thereby forcing users to specify gnustl in their projects. Now you can specify any of the two: ndk-build will automatically determine the preferred option and connect the correct versions of the Boost libraries.

Also, due to the fact that we now have Python for Android, we began to build and test Boost.Python. This work has not yet been completed, but we continue to work on it and the situation will improve over time.

CrystaX is an officially approved tester for the Boost project. This means that we are continuously testing the Boost libraries by publishing the results on the official site ( master , develop ). This works to the benefit of both Boost and CrystaX NDK. Boost users get the opportunity to use the tested Boost libraries on Android, and CrystaX NDK users benefit from the fact that CrystaX NDK is in turn tested by Boost tests and thus practically demonstrates a good degree of compliance with POSIX and C ++ standards.

Total



In addition, a large number of minor improvements and fixes have been made in this release. A full list of closed tickets is here .

Source: https://habr.com/ru/post/273053/


All Articles