Build custom allocator/tcmalloc respecting 'use_allocator' flag
authorAntonio Gomes <a1.gomes@samsung.com>
Thu, 26 Feb 2015 18:01:48 +0000 (10:01 -0800)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
Right now chromium-efl builds TCMalloc unconditonally for
all targets.
However, it is known that some targets, including ARM64,
are not yet supported by TCMalloc, and should be disabled.

Patch prepares the ground for this, only building allocator
the respecting 'use_allocator' GYP define. Now, it will
always build, but soon disabled for ARM64 builds.

Bug: web.sec.samsung.net/bugzilla/show_bug.cgi?id=11564
Reviewed by: Piotr Tworek, SeungSeop Park, arno renevier

Change-Id: I3c087d9782860c3645f4f7763b6e0ae2a4cec195
Signed-off-by: Antonio Gomes <a1.gomes@samsung.com>
tizen_src/build/gyp_chromiumefl.sh
tizen_src/impl/chromium-efl.gyp

index ebbc9b7..f9432c7 100755 (executable)
@@ -114,6 +114,7 @@ add_gbs_flags() {
   ADDITIONAL_GYP_PARAMETERS+="-Dtarget_arch=$host_arch
                               -Dhost_arch=$host_arch
                               -Dsysroot=
+                              -Duse_allocator=tcmalloc
                               --no-parallel
                              "
   # TODO(b.kelemen): ideally crosscompile should also support system libs.
index bd532c6..c369d14 100644 (file)
@@ -53,7 +53,6 @@
       'chromium-efl-deps.gyp:gstreamer',
       'theme/theme.gyp:tizen_theme',
       '../ewk/po_tizen/locale.gyp:locale_efl',
-      '<(chrome_src_dir)/base/allocator/allocator.gyp:allocator',
       '<(chrome_src_dir)/content/content.gyp:content',
       '<(chrome_src_dir)/content/content.gyp:content_app_browser',
       '<(chrome_src_dir)/content/content_shell_and_tests.gyp:content_shell_resources',
           'browser/notification/notification_controller_efl.h',
         ],
       }],
+      ['use_allocator=="tcmalloc"', {
+        'dependencies': [
+          '<(chrome_src_dir)/base/allocator/allocator.gyp:allocator',
+        ],
+      }],
     ],
   },
   {
       '<(chrome_src_dir)/breakpad/breakpad.gyp:minidump_stackwalk',
       '<(chrome_src_dir)/breakpad/breakpad.gyp:dump_syms',
       '<(chrome_src_dir)/tools/imagediff/image_diff.gyp:image_diff',
-      '<(chrome_src_dir)/base/allocator/allocator.gyp:allocator',
       '<(chrome_src_dir)/sandbox/sandbox.gyp:sandbox',
       'chromium-efl',
     ],
           '-Wl,--no-keep-memory',
         ],
       }],
+      ['use_allocator=="tcmalloc"', {
+        'dependencies': [
+          '<(chrome_src_dir)/base/allocator/allocator.gyp:allocator',
+        ],
+      }],
     ],
   },
   ],