[M67 Dev][Tizen] Use the x86_64 GN for all architectures 91/185291/4
authorSlava Barinov <v.barinov@samsung.com>
Tue, 11 Apr 2017 08:26:05 +0000 (11:26 +0300)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Thu, 2 Aug 2018 06:35:14 +0000 (23:35 -0700)
Enabling x86_64 GN instead of native ones dramatically speeds up ninja files
generation for arm/arm64 platforms.

This GN is built without tcmalloc and supports ASan builds.

Also, the GN is upgraded to support newly added functions
such as 'not_needed' and so on.

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

Change-Id: Idc9db604362eb464833fd7b0c34cf68aa7ed4ac0
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
tizen_src/build/gn_chromiumefl
tizen_src/build/gn_chromiumefl.sh
tizen_src/buildtools/arm/gn.arm [deleted file]
tizen_src/buildtools/gn [new file with mode: 0755]

index e2e47ee..a51f533 100755 (executable)
@@ -62,9 +62,12 @@ def GetOutputDirectory():
 if __name__ == '__main__':
   arg = 0
   args = []
+  target_os = 'linux'
   for i in range(len(sys.argv)):
     if arg > 0:
       args[arg] += " " + sys.argv[i];
+      if sys.argv[i] in ('target_os="tizen"'):
+        target_os = 'tizen'
       continue
     if sys.argv[i] in ("--args="):
       args.append(sys.argv[i])
@@ -135,11 +138,11 @@ if __name__ == '__main__':
       subdir = 'win'
     elif sys.platform == 'darwin':
       subdir = 'mac'
-    elif host_arch.startswith('arm'):
-      buildtools_path = os.path.join(buildtools_path, "../tizen_src/buildtools/")
-      subdir = 'arm'
-    elif sys.platform.startswith('linux'):
-        subdir = 'linux64'
+    elif target_os == 'linux':
+      subdir = 'linux64'
+    elif target_os == 'tizen':
+      buildtools_path = os.path.join(buildtools_path, "../tizen_src/")
+      subdir = 'buildtools'
     else:
       raise Error('Unknown platform: ' + sys.platform)
 
@@ -148,8 +151,8 @@ if __name__ == '__main__':
     exeSuffix = ''
     if sys.platform.startswith(('cygwin', 'win')):
       exeSuffix = '.exe'
-    elif host_arch.startswith('arm'):
-      exeSuffix = '.arm'
+    elif target_os == 'linux' or target_os == 'tizen':
+      exeSuffix = ''
 
     gn_path = os.path.join(bin_path, 'gn' + exeSuffix)
     if not os.path.exists(gn_path):
@@ -158,4 +161,3 @@ if __name__ == '__main__':
     else:
       print 'Updating projects from gn files...'
       sys.exit(subprocess.call([gn_path] + args[1:]))
-
index 3b7786d..4a64ab7 100755 (executable)
@@ -142,6 +142,9 @@ add_tizen_flags() {
                               enable_nacl=false
                               tizen_multimedia_eme_support=false
                               target_os="\"tizen\""
+                              current_cpu=\"${host_arch}\"
+                              host_cpu=\"${host_arch}\"
+                              target_cpu=\"${host_arch}\"
                              "
                               # We do not need it
                               # tizen=true
diff --git a/tizen_src/buildtools/arm/gn.arm b/tizen_src/buildtools/arm/gn.arm
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/tizen_src/buildtools/gn b/tizen_src/buildtools/gn
new file mode 100755 (executable)
index 0000000..ef22989
Binary files /dev/null and b/tizen_src/buildtools/gn differ