Chromium provided version of clang has certain adventages over GCC:
* The compiler checks the code for coding style violations. It treats
them as warnings.
* Diagnostic messages displayed by the compiler are much more readable.
They use colors to signify the type of problem (red - error, yellow -
warning, etc), add custom ASCI art like indicators showing where the
problem is, display tips how the problem can be fixed.
* Chromium.org has switched to clang as the default compiler some time
around M38.
This patch makes it easy to build chromium-efl using clang. It's enough
to pass --clang flag to build_desktop.sh. The feature uses clang version
shipped together with chromium sources so the user does not need to
install anything on his/her system.
Reviewed by: Antonio Gomes, SeungSeop Park (OOO ~ 4/Jan/2015), Viatcheslav Ostapenko
Reviewed by: Antonio Gomes, Daniel Waślicki, Kamil Klimek, SeungSeop Park
Change-Id: I2e3966098aa397b6712c761709880ed9a5fa5294
Signed-off-by: Piotr Tworek <p.tworek@samsung.com>
*.o
+*.dwo
*.orig
/*.list
/out.*
export CHROME_SRC="${TOPDIR}/src"
fi
+export CLANG_DIR="${TOPDIR}/src/third_party/llvm-build/Release+Asserts/"
+
function applyPatch {
directory=$1
shift
-h, --help Show this message
--build-ewk-unittests Build ewk unittests
--ccache Configure ccache installed in your system
+ --clang Use chromium's clang compiler to build the sources
--content-shell Build content_shell application
--debug Build debug version of chromium-efl (out.${host_arch}/Debug instead of out.${host_arch}/Release)
-jN Set number of jobs, just like with make or ninja
export SKIP_GYP=0
export USE_CCACHE=0
+ export USE_CLANG=0
export FORCE_JHBUILD=0
export SKIP_NINJA=0
export BUILD_EWK_UNITTESTS=0
export USE_CCACHE=1
source $TOPDIR/build/ccache_env.sh ${platform}
;;
+ --clang)
+ export USE_CLANG=1
+ ;;
--content-shell)
export BUILD_CONTENT_SHELL=1
;;
COMMON_GYP_PARAMETERS="
-Duse_libjpeg_turbo=1
-Dproprietary_codecs=1
- -Dclang=0
-Dtizen_multimedia_support=1
-Duse_aura=0
-Duse_efl=1
fi
add_desktop_flags() {
- ADDITIONAL_GYP_PARAMETERS+="-Dbuilding_for_tizen=0"
+ ADDITIONAL_GYP_PARAMETERS+="-Dbuilding_for_tizen=0
+ -Dclang=${USE_CLANG}
+ -Dmake_clang_dir=${CLANG_DIR}
+ "
}
add_arm_flags() {
-Duse_kerberos=0
-Duse_gconf=0
-Duse_alsa=0
+ -Dclang=0
-Dlinux_use_bundled_gold=0
-Dlinux_use_bundled_binutils=0
-Dprebuilt_ld_gold_dir=${TOPDIR}/build/prebuild