[Rom Size] Enable 'is_official_build' and disable 'COMPONENT_BUILD' 61/186961/6
authorYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 15 May 2018 07:42:33 +0000 (07:42 +0000)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Mon, 20 Aug 2018 14:11:13 +0000 (14:11 +0000)
This enables is_official_build and disables COMPONENT_BUILD for tizen port
to reduce libchromium-ewk.so binary size and to improve memory usage.

Improvement:
Code segement reduced by ~1MB
libchromium-ewk.so size reduced by ~1.56MB

Reference:
https://review.tizen.org/gerrit/#/c/147774/

Change-Id: Iec89b8c041841f7ad223f029fee6c1c14255eada
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
tizen_src/build/config/BUILD.gn
tizen_src/build/config/BUILDCONFIG.gn
tizen_src/build/config/tizen_features.gni
tizen_src/build/gn_chromiumefl.sh
tools/generate_shim_headers/generate_shim_headers.py

index 3ea8de3..1cdf851 100644 (file)
@@ -23,7 +23,6 @@ import("//build/config/ui.gni")
 config("tizen_feature_flags") {
   defines = [
     # TODO: Check if those defines are still necessary. If they are add an explanation why.
-    "COMPONENT_BUILD",
     "SKIA_DLL",
     "BUILDING_V8_SHARED",
     "V8_SHARED",
index 3efb33e..2ebb902 100644 (file)
@@ -311,7 +311,6 @@ if (current_os == "win" || current_os == "winrt_81" ||
   is_win = false
   is_tizen = true
   use_efl = true
-  is_official_build = false
 } else if (current_os == "nacl") {
   # current_os == "nacl" will be passed by the nacl toolchain definition.
   # It is not set by default or on the command line. We treat is as a
@@ -349,7 +348,6 @@ if (current_os == "win" || current_os == "winrt_81" ||
   is_win = false
   is_tizen = false
   use_efl = true
-  is_official_build = false
 }
 
 # =============================================================================
index bf77329..d89739b 100644 (file)
@@ -73,8 +73,6 @@ if (use_ozone) {
   external_ozone_platforms = [ "efl" ]
 }
 
-is_official_build = false
-
 treat_warnings_as_errors = werror
 
 use_x11 = false
index 5aab39b..aed4be5 100755 (executable)
@@ -117,6 +117,7 @@ add_tizen_flags() {
                              python_ver=\"$(getPythonVersion)\"
                              enable_basic_printing=true
                              is_clang=false
+                             is_official_build=true
                              linux_use_bundled_binutils=false
                              enable_nacl=false
                              tizen_multimedia_eme_support=false
index 1b8e27f..31a57e9 100755 (executable)
@@ -18,7 +18,7 @@ import sys
 
 
 SHIM_TEMPLATE = """
-#if defined(OFFICIAL_BUILD)
+#if defined(OFFICIAL_BUILD) && !defined(OS_TIZEN)
 #error shim headers must not be used in official builds!
 #endif
 """