Enable clang in local and release builds for TV profile 09/284509/3
authoruzair <uzair.jaleel@samsung.com>
Fri, 18 Nov 2022 08:10:27 +0000 (13:40 +0530)
committerUzair Jaleel <uzair.jaleel@samsung.com>
Fri, 18 Nov 2022 09:05:31 +0000 (09:05 +0000)
This commit enables clang in both local and release
builds for TV profile.

Reference:
https://review.tizen.org/gerrit/c/272182

Change-Id: Icbabb3b2d567d218d3b7864bc6365836d345344f
Signed-off-by: uzair <uzair.jaleel@samsung.com>
build/config/compiler/BUILD.gn
tizen_src/build/common.sh

index 99167d9..c4f2a94 100644 (file)
@@ -2465,6 +2465,11 @@ config("symbols") {
         "-Xclang",
         "-debug-info-kind=limited",
       ]
+    } else if (is_tizen) {
+      cflags += [
+        "-Xclang",
+        "-debug-info-kind=constructor",
+      ]
     } else {
       # Use constructor homing for debug info. This option reduces debug info
       # by emitting class type info only when constructors are emitted.
index 01a73c6..6dc9bc6 100755 (executable)
@@ -225,6 +225,7 @@ function setupAndExecuteTargetBuild() {
   local NOINIT=0
   local MIRROR=0
   local LOCAL_BUILD=1
+  local RELEASE_BUILD=0
 
   # "|| :" means "or always succeeding built-in command"
   PROFILE=$(echo "$@" | grep -Po "(?<=\-P\s)[^\s]*" | head -1 || :)
@@ -269,8 +270,7 @@ function setupAndExecuteTargetBuild() {
     ;;
     --release)
         LOCAL_BUILD=0
-        ARGS+=(--define "_local_build 0")
-        ARGS+=(--define "_clang 0")
+        RELEASE_BUILD=1
     ;;
     --gcc)
         LOCAL_BUILD=0
@@ -300,10 +300,16 @@ function setupAndExecuteTargetBuild() {
     local _smp_mflags=-j$(if ((${_jobs} > 10)); then echo ${_jobs}; else echo 10; fi)
     ARGS+=(--define "_costomized_smp_mflags $_smp_mflags")
     # Default values
+    ARGS+=(--define "_clang 1")
+  fi
+
+  if [ "$RELEASE_BUILD" == "1" ]; then
+    ARGS+=(--define "_local_build 0")
     if [[ $platform == "tv" ]]; then
-      ARGS+=(--define "_clang 0")
-    else
       ARGS+=(--define "_clang 1")
+    else
+      ARGS+=(--define "_clang 0")
+      ARGS+=(--define "_no_lto 0")
     fi
   fi