Commit Graph

8 Commits

Author SHA1 Message Date
Hernán Castañón c73236a6a1 common: sdclang: switch to SDClang 3.9
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>
2017-11-25 18:31:35 +01:00
joshuous 8164ac4970 common: sdclang: Refactor SDClang configuration and use SDClang 4.0
* 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>
2017-11-02 21:54:02 +01:00
Alex Naidis ecd625cb9d common: sdclang: Explicitly enable Automatic Vectorization
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>
2017-01-07 22:05:38 +01:00
Alex Naidis 2f8cdce267
common: sdclang-lto: filter cortex-a53-835769 workaround flags
* These are not directly supported by QCLD

Change-Id: I4c1a6b2db98b1ea975d65367f6c4e860a416dade
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2016-10-10 23:02:02 +02:00
Alex Naidis 1fb2480ead
common: sdclang-lto: support for unsafe filtering
* 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>
2016-10-07 22:41:41 +02:00
Alex Naidis 49995c8eb1 common: sdclang: Enable by default!
The Dragon unleashes the fire.

Change-Id: Ie00fffc245f83731324ab8a8de3469e54d8da3a4
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2016-10-05 00:40:34 +02:00
Alex Naidis 783f2d2b8f
common: sdclang: LTO: filter new no-erratum-fix flag
* 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>
2016-10-04 21:20:46 +02:00
Alex Naidis b2c1940140 common: add support for SDCLANG
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>
2016-10-02 01:35:14 +02:00