[M69 Dev][Public][Rom Size][Build Speed] Support clang build for chromium-efl 69/195169/5
authorChandan Padhi <c.padhi@samsung.com>
Tue, 11 Dec 2018 07:01:37 +0000 (23:01 -0800)
committerBot Blink <blinkbot@samsung.com>
Fri, 14 Dec 2018 08:47:41 +0000 (08:47 +0000)
commit9d1218e7ab7293f53cd2d2b10ebf641c83c152f2
treec7b303382c9d03374420e5672fb4e7313939f78f
parent4af0f31b72eeef90177f72525e9d5c681acc897a
[M69 Dev][Public][Rom Size][Build Speed] Support clang build for chromium-efl

This patch enables support for use of clang compiler and lld linker
to reduce binary size and to improve build speed for public profile
and desktop.

Note that platform llvm v3.8 does NOT support thin lto option and
there's no gain for binary size optimization. So, this utilizes
upgraded home-built llvm v7.0.

Clang is used as default for standard profile and desktop builds.
In case of standard profile, clang build is currently supported
for arm(armv7l) achitecture target only.

Below commands can be used to build with gcc.
$./tizen_src/build/build_standard_armv7l.sh --gcc
$./tizen_src/build/build_desktop.sh --gcc

We have not decided yet on default use of clang for product tv.
Below command can be used to build with clang.
$./tizen_src/build/build_tv.sh --clang

Binary Size of libchromium-ewk.so:

Note that product tv obs does NOT allow to strip section .symtab
and .strtab but public obs allows to strip those sections by default.
That's why released product tv binary size(91 MB) is much larger than
public target binary size(41 MB).

1) Product TV
w/o clang: 104.6 MB
with clang: 91 MB

2) Public Target
w/o clang: 47.6 MB
with clang: 41.7 MB

Also, build speed has been improved by about 10% and no regression has
been found, comparing to gcc built-chromium-efl.

Change-Id: I3318fbb69b441769c3905431e665fbd4ac3aa4c9
Signed-off-by: Chandan Padhi <c.padhi@samsung.com>
17 files changed:
build/config/clang/clang.gni
build/config/compiler/BUILD.gn
device/fido/BUILD.gn
device/fido/fido_discovery.cc
native_client/src/trusted/service_runtime/linux/BUILD.gn
packaging/chromium-efl.spec
tizen_src/build/BUILD.gn
tizen_src/build/common.sh
tizen_src/build/config/compiler/BUILD.gn
tizen_src/build/config/tizen/BUILD.gn
tizen_src/build/config/tizen_features.gni
tizen_src/build/gn_chromiumefl.sh
tizen_src/build/toolchain/tizen/BUILD.gn
tizen_src/ewk/efl_integration/BUILD.gn
tizen_src/ewk/efl_webview_app/BUILD.gn
tizen_src/ewk/efl_webview_app/mini_browser.c
tizen_src/ewk/ubrowser/BUILD.gn