saker.android Documentation TaskDoc JavaDoc Packages
Creates a clang configuration preset for compiling and linking Android native binaries. The task can be used to create a configuration object that can be passed to saker.clang.compile() and saker.clang.link() build tasks for their CompilerOptions and LinkerOptions parameters. The created configuration includes the default arguments for the compilers and sets up the include and library paths, and sysroots for the compilation.
Summary
Parameters
ABISpecifies the Application Binary Interface for which the compilation should be done.
APISpecifies the target API level for which the compilation should be done.
IdentifierCompilation identifier that specifies for which compilations this preset can be applied to.
LibrariesSpecifies the libraries that should be linked.
ReleaseSpecifies the optimization options that should be added when compiling and linking.
RuntimeFeaturesSpecifies which runtime features can be used in the application.
StaticStdLibSpecifies if the standard library should be linked statically to the application.
VisibilitySpecifies the default visibility of symbols in your application.
Parameters
Collection of AndroidAbi
Specifies the Application Binary Interface for which the compilation should be done. Each combination of CPU and instruction set has its own Application Binary Interface (ABI). See https://developer.android.com/ndk/guides/abis for more information.
Specifies the target API level for which the compilation should be done. The target API level is used to set up the proper roots for the compilation. It determines which APIs are available for your application. Generally it should be the latest Android release version, however, you should still make sure not to call any APIs that aren't available during runtime.
Compilation identifier that specifies for which compilations this preset can be applied to.
Specifies the libraries that should be linked. Each specified library will be added as a -l<LIB> argument to the clang linker. If this parameter is not specified, it will only contain "android". However, if you specify it, you need to add "android" in addition to the other libraries you want. See https://developer.android.com/ndk/guides/stable_apis for the available libraries.
Specifies the optimization options that should be added when compiling and linking. This value is false by default. You should set it to true when producing the release APK for your application. Setting this to null will result in no optimization related configuration to be included.
Specifies which runtime features can be used in the application. The parameter accepts "exceptions" and "rtti" values to enable the usage of exceptions and run-time type information when compiling C++ sources. None of these features are enabled by default.
Specifies if the standard library should be linked statically to the application. Specifying true will cause the -nostdlib++, -lc++_static and -lc++abi arguments to be added to clang for linking. This is false by default.
Specifies the default visibility of symbols in your application. The argument corresponds to the -fvisibility=<VALUE> clang parameter. Can be set to null to don't use it.This is "hidden" by default.