Based on our tests SDClang 4.0 isn't ready yet,
as it breaks many important stuff like the camera.
We will use SDClang 3.9 as primary one.
Change-Id: Ia7de336f6f12ddb5fa67164f221599e88c4ed500
Signed-off-by: Hernán Castañón <herna@paranoidandroid.co>
* Refactored to work with CAF's build/soong
* Export necessary SDClang environment variables
* Set SDClang configs in the json files
* We can also add different device-specific SDClang configurations in sdclang.json
Change-Id: Id91cb4030f6e8d715203305d647cd440773898a2
Signed-off-by: joshuous <joshuous@gmail.com>
Automatic Vectorization is enabled by default
in SDCLANG at optimization level O2 or higher.
However we are forced to still use Os for thumb mode,
where our setting of O3 gets overriden.
This change explicitly passes the option to enable
automatic code vectorization in order to enable it
even if our main optimization level gets overriden.
Change-Id: I3e27d909ec0f9231686d5d97c0b2876cd33a07ae
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
* Some target modules might need their
LDFLAGS to be filtered in order to
be able to compile fine with QCLD/LTO.
* Since generally filtering these too is
potentially unsafe, because we don't know
where it gets filtered from:
-> Introduce a local flag, which is disabled
by default to enable such unsafe filtering.
Change-Id: I3d9ca17bdf9989e4bd5c853c5a4c23df063c7140
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
* We are using this one in build now too
* But it isn't supported by QCLD either
-> filter it out
Change-Id: I148d82f94dad67fdca286d03b8b71fd3846c87a3
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
This commit adds the needed bits for SDCLANG support.
SDCLANG is initialised as false currently,
however the implementation allows to override it from device.
The Path is currenly hardcoded to "prebuilts/clang/host/linux-x86/sdclang-3.8/bin"
since we cannot provide support for darwin currently.
The LTO definitions are added and the variable which
gets picked up by build system automatically is set.
Also a new configuration is introduced: SDCLANG_COMMON_FLAGS
These flags will be picked up for arm and arm64 targets.
We are using -O3 currently since SDCLANG defines the levels
of optimisation differently and O3 is a very safe level to use here.
The new configuration SDCLANG_FORCED is initialised
at false and can be overriden. It can be set
to true in order to force SDCLANG to be used
under the condition that it is requested.
Currently we don't want to do this globally,
however it might be useful for OEM builds.
Change-Id: I4f42be82a8a113fdf6406d9879d5586968030517
Signed-off-by: Alex Naidis <alex.naidis@linux.com>