tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

02_update_gyp.patch (2580B)


      1 # HG changeset patch
      2 # Parent  034c99a4c2010c8d60ff52daf0a183ac1fd05777
      3 Bug 1341543: Update libyuv gyp file with mozilla changes r=sotaro
      4 
      5 diff --git a/libyuv.gyp b/libyuv.gyp
      6 --- a/libyuv.gyp
      7 +++ b/libyuv.gyp
      8 @@ -47,17 +47,17 @@
      9     {
     10       'target_name': 'libyuv',
     11       # Change type to 'shared_library' to build .so or .dll files.
     12       'type': 'static_library',
     13       'variables': {
     14         'optimize': 'max',  # enable O2 and ltcg.
     15       },
     16       # Allows libyuv.a redistributable library without external dependencies.
     17 -      'standalone_static_library': 1,
     18 +      # 'standalone_static_library': 1,
     19       'conditions': [
     20        # Disable -Wunused-parameter
     21         ['clang == 1', {
     22           'cflags': [
     23             '-Wno-unused-parameter',
     24          ],
     25         }],
     26         ['build_neon != 0', {
     27 @@ -65,39 +65,55 @@
     28             'LIBYUV_NEON',
     29           ],
     30           'cflags!': [
     31             '-mfpu=vfp',
     32             '-mfpu=vfpv3',
     33             '-mfpu=vfpv3-d16',
     34             # '-mthumb',  # arm32 not thumb
     35           ],
     36 +          'cflags_mozilla!': [
     37 +            '-mfpu=vfp',
     38 +            '-mfpu=vfpv3',
     39 +            '-mfpu=vfpv3-d16',
     40 +          ],
     41           'conditions': [
     42             # Disable LTO in libyuv_neon target due to gcc 4.9 compiler bug.
     43             ['clang == 0 and use_lto == 1', {
     44               'cflags!': [
     45                 '-flto',
     46                 '-ffat-lto-objects',
     47               ],
     48             }],
     49             # arm64 does not need -mfpu=neon option as neon is not optional
     50             ['target_arch != "arm64"', {
     51               'cflags': [
     52                 '-mfpu=neon',
     53                 # '-marm',  # arm32 not thumb
     54               ],
     55 +              'cflags_mozilla': [
     56 +                '-mfpu=neon',
     57 +              ],
     58             }],
     59           ],
     60         }],
     61         ['build_msa != 0', {
     62           'defines': [
     63             'LIBYUV_MSA',
     64           ],
     65         }],
     66 -        ['OS != "ios" and libyuv_disable_jpeg != 1', {
     67 +        ['build_with_mozilla == 1', {
     68 +          'defines': [
     69 +            'HAVE_JPEG'
     70 +          ],
     71 +          'cflags_mozilla': [
     72 +            '$(MOZ_JPEG_CFLAGS)',
     73 +          ],
     74 +        }],
     75 +        ['OS != "ios" and libyuv_disable_jpeg != 1 and build_with_mozilla != 1', {
     76           'defines': [
     77             'HAVE_JPEG'
     78           ],
     79           'conditions': [
     80             # Caveat system jpeg support may not support motion jpeg
     81             [ 'use_system_libjpeg == 1', {
     82               'dependencies': [
     83                  '<(DEPTH)/third_party/libjpeg/libjpeg.gyp:libjpeg',