Revert "Revert "Work around missing __mulodi4() on ARMv7 + Clang builds.""
authorMatthew Leibowitz <mattleibow@live.com>
Mon, 11 Jul 2016 13:38:49 +0000 (15:38 +0200)
committerMatthew Leibowitz <mattleibow@live.com>
Mon, 11 Jul 2016 13:38:49 +0000 (15:38 +0200)
This reverts commit 50876c22fa75cb0d64129b8d0c87d00f2486351f.

gyp/dng_sdk.gyp

index 3d42624..be0c0f9 100644 (file)
     ['skia_os != "linux"', {
       'sources': ['<@(headers)'],
     }],
+    ['skia_arch_type == "arm" and skia_clang_build', {
+      # DNG SDK uses __builtin_smulll_overflow() to detect 64x64 bit multiply overflow.
+      # On ARMv7, Clang implements this with __mulodi4() in libclang_rt.
+      # I can't quite figure out how to link that here, so instead here's a shim for
+      # __builtin_smulll_overflow() that multiplies normally assuming no overflow.
+      # Tracked in b/29412086.
+      'defines': [ '__builtin_smulll_overflow(x,y,p)=(*(p)=(x)*(y), false)' ],
+    }],
   ],
   'dependencies': [
     'libjpeg-turbo-selector.gyp:libjpeg-turbo-selector',