Step 1 of opts_crc32 rollout.
authormtklein <mtklein@chromium.org>
Fri, 19 Aug 2016 15:07:51 +0000 (08:07 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 19 Aug 2016 15:07:51 +0000 (08:07 -0700)
  - This adds an crc32_sources variable to opts.gypi and hooks it into
    our GYP build with a dummy source file.

Step 2 will hook crc32_sources into Chrome's GN build.
Step 3 will actually land some code using CRC32 instructions.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2259233002

Review-Url: https://codereview.chromium.org/2259233002

gyp/opts.gyp
gyp/opts.gypi

index ad8da33..21edd85 100644 (file)
@@ -71,6 +71,7 @@
 
         [ 'skia_arch_type == "arm64"', {
           'sources': [ '<@(arm64_sources)' ],
+          'dependencies': [ 'opts_crc32' ]
         }],
 
         [ 'skia_android_framework', {
       ],
     },
     {
+      'target_name': 'opts_crc32',
+      'product_name': 'skia_opts_crc32',
+      'type': 'static_library',
+      'standalone_static_library': 1,
+      'dependencies': [ 'core.gyp:*' ],
+      'include_dirs': [
+          '../include/private',
+          '../src/core',
+          '../src/utils',
+      ],
+      'sources': [ '<@(crc32_sources)' ],
+      'conditions': [
+        [ 'not skia_android_framework', { 'cflags': [ '-march=armv8-a+crc' ] }],
+      ],
+    },
+    {
       'target_name': 'opts_ssse3',
       'product_name': 'skia_opts_ssse3',
       'type': 'static_library',
index e89334d..8538eec 100644 (file)
@@ -29,6 +29,9 @@
             '<(skia_src_path)/opts/SkBlitRow_opts_arm.cpp',
             '<(skia_src_path)/opts/SkBlitRow_opts_arm_neon.cpp',
         ],
+        'crc32_sources': [
+            '<(skia_src_path)/core/SkForceCPlusPlusLinking.cpp',
+        ],
 
         'mips_dsp_sources': [
             '<(skia_src_path)/opts/SkBitmapProcState_opts_mips_dsp.cpp',