Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 { | 5 { |
| 6 'targets': [ | 6 'targets': [ |
| 7 { | 7 { |
| 8 'target_name': 'libpng', | 8 'target_name': 'libpng', |
| 9 'dependencies': [ | 9 'dependencies': [ |
| 10 '../zlib/zlib.gyp:zlib', | 10 '../zlib/zlib.gyp:zlib', |
| 11 ], | 11 ], |
| 12 'variables': { | 12 'variables': { |
| 13 # Upstream uses self-assignment to avoid warnings. | 13 # Upstream uses self-assignment to avoid warnings. |
| 14 'clang_warning_flags': [ '-Wno-self-assign' ] | 14 'clang_warning_flags': [ |
| 15 '-Wno-self-assign', | |
|
Nico
2016/06/03 20:27:45
why does the gn file have that tautological-compar
msarett
2016/06/03 21:26:01
Possibly because we don't have a Windows/clang/gyp
Nico
2016/06/03 21:36:49
Ah, maybe that's the reason. You can send a try jo
msarett
2016/06/06 14:18:15
Sent a tryjob, will follow up on this.
msarett
2016/06/07 20:06:43
The flag is not needed on win_clang_x64_rel. Mayb
| |
| 16 ], | |
| 15 }, | 17 }, |
| 16 'defines': [ | |
| 17 'CHROME_PNG_WRITE_SUPPORT', | |
| 18 'PNG_USER_CONFIG', | |
| 19 ], | |
| 20 'sources': [ | 18 'sources': [ |
| 21 'png.c', | 19 'png.c', |
| 22 'png.h', | |
| 23 'pngconf.h', | |
| 24 'pngerror.c', | 20 'pngerror.c', |
| 25 'pnggccrd.c', | |
| 26 'pngget.c', | 21 'pngget.c', |
| 27 'pngmem.c', | 22 'pngmem.c', |
| 28 'pngpread.c', | 23 'pngpread.c', |
| 29 'pngread.c', | 24 'pngread.c', |
| 30 'pngrio.c', | 25 'pngrio.c', |
| 31 'pngrtran.c', | 26 'pngrtran.c', |
| 32 'pngrutil.c', | 27 'pngrutil.c', |
| 33 'pngset.c', | 28 'pngset.c', |
| 34 'pngtrans.c', | 29 'pngtrans.c', |
| 35 'pngusr.h', | |
| 36 'pngvcrd.c', | |
| 37 'pngwio.c', | 30 'pngwio.c', |
| 38 'pngwrite.c', | 31 'pngwrite.c', |
| 39 'pngwtran.c', | 32 'pngwtran.c', |
| 40 'pngwutil.c', | 33 'pngwutil.c', |
| 41 ], | 34 ], |
| 42 'direct_dependent_settings': { | 35 'direct_dependent_settings': { |
| 43 'include_dirs': [ | 36 'include_dirs': [ |
| 44 '.', | 37 '.', |
| 45 ], | 38 ], |
| 46 'defines': [ | |
| 47 'CHROME_PNG_WRITE_SUPPORT', | |
| 48 'PNG_USER_CONFIG', | |
| 49 ], | |
| 50 }, | 39 }, |
| 51 'export_dependent_settings': [ | 40 'export_dependent_settings': [ |
| 52 '../zlib/zlib.gyp:zlib', | 41 '../zlib/zlib.gyp:zlib', |
| 53 ], | 42 ], |
| 54 # TODO(jschuh): http://crbug.com/167187 | 43 # TODO(jschuh): http://crbug.com/167187 |
| 55 'msvs_disabled_warnings': [ 4267 ], | 44 'msvs_disabled_warnings': [ 4267 ], |
| 56 'conditions': [ | 45 'conditions': [ |
| 46 # Disable ARM optimizations on IOS. Can't find a way to get gyp to even try | |
| 47 # to compile the optimization files. This works fine on GN. | |
|
Nico
2016/06/03 20:27:45
what's the error if you don't do this?
msarett
2016/06/03 21:26:01
Seeing a lot of this on ios_device:
Undefined symb
Nico
2016/06/03 21:36:49
Hm, that sounds like maybe the prefix header isn't
msarett
2016/06/06 14:18:15
What makes you think it's the prefix header? FWIW
msarett
2016/06/07 20:06:43
Filed https://bugs.chromium.org/p/chromium/issues/
| |
| 48 [ 'OS=="ios"', { | |
| 49 'defines': [ | |
| 50 'PNG_ARM_NEON_OPT=0', | |
| 51 ], | |
| 52 }], | |
| 53 | |
| 54 # SSE optimizations | |
| 55 [ 'target_arch=="ia32" or target_arch=="x64"', { | |
| 56 'defines': [ | |
| 57 'PNG_INTEL_SSE_OPT=1', | |
| 58 ], | |
| 59 'sources': [ | |
| 60 'contrib/intel/intel_init.c', | |
| 61 'contrib/intel/filter_sse2_intrinsics.c', | |
| 62 ], | |
| 63 }], | |
| 64 | |
| 65 # ARM optimizations | |
| 66 [ 'target_arch=="arm" or target_arch=="arm64" and OS!="ios"', { | |
| 67 'defines': [ | |
| 68 'PNG_ARM_NEON_OPT=2', | |
| 69 'PNG_ARM_NEON_IMPLEMENTATION=1', | |
| 70 ], | |
| 71 'sources': [ | |
| 72 'arm/arm_init.c', | |
| 73 'arm/filter_neon_intrinsics.c', | |
|
Nico
2016/06/03 21:36:49
btw, don't you have to add the .S file here?
msarett
2016/06/06 14:18:16
filter_neon_intrinsics.c and filter_neon.S impleme
| |
| 74 ], | |
| 75 }], | |
| 76 | |
| 57 ['OS!="win"', {'product_name': 'png'}], | 77 ['OS!="win"', {'product_name': 'png'}], |
| 58 ['OS=="win"', { | 78 ['OS=="win"', { |
| 59 'type': '<(component)', | 79 'type': '<(component)', |
| 60 }, { | 80 }, { |
| 61 # Chromium libpng does not support building as a shared_library | 81 # Chromium libpng does not support building as a shared_library |
| 62 # on non-Windows platforms. | 82 # on non-Windows platforms. |
| 63 'type': 'static_library', | 83 'type': 'static_library', |
| 64 }], | 84 }], |
| 65 ['OS=="win" and component=="shared_library"', { | 85 ['OS=="win" and component=="shared_library"', { |
| 66 'defines': [ | 86 'defines': [ |
| 67 'PNG_BUILD_DLL', | 87 'PNG_BUILD_DLL', |
| 68 'PNG_NO_MODULEDEF', | 88 'PNG_NO_MODULEDEF', |
| 69 ], | 89 ], |
| 70 'direct_dependent_settings': { | 90 'direct_dependent_settings': { |
| 71 'defines': [ | 91 'defines': [ |
| 72 'PNG_USE_DLL', | 92 'PNG_USE_DLL', |
| 73 ], | 93 ], |
| 74 }, | 94 }, |
| 75 }], | 95 }], |
| 76 ['OS=="android" or chromecast==1', { | 96 ['OS=="android"', { |
| 77 'conditions': [ | 97 'toolsets': ['target', 'host'], |
|
Nico
2016/06/03 20:27:45
why is this no longer needed for chromecast==1?
msarett
2016/06/03 21:26:01
If you look closely at the base, these were only e
Nico
2016/06/03 21:36:49
Ah, thanks.
| |
| 78 ['OS=="android"', { | |
| 79 'toolsets': ['target', 'host'], | |
| 80 }], | |
| 81 ], | |
| 82 'defines': [ | |
| 83 'CHROME_PNG_READ_PACK_SUPPORT', # Required by freetype. | |
| 84 ], | |
| 85 'direct_dependent_settings': { | |
| 86 'defines': [ | |
| 87 'CHROME_PNG_READ_PACK_SUPPORT', | |
| 88 ], | |
| 89 }, | |
| 90 }], | 98 }], |
| 91 ], | 99 ], |
| 92 }, | 100 }, |
| 93 ] | 101 ] |
| 94 } | 102 } |
| OLD | NEW |