tor-browser

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

README_MOZILLA (2822B)


      1 This directory contains build files for dav1d. The actual library
      2 source is in $TOPSRCDIR/third_party/dav1d/
      3 
      4 Any patches or additional configuration to be applied to the
      5 upstream source should be kept here in the media/libdav1d
      6 directory.
      7 
      8 To update the library source and build config files, execute
      9 
     10   ./mach vendor media/libdav1d/moz.yaml
     11 
     12 To update to a specific upstream git tag or commit, use
     13 
     14   ./mach vendor media/libdav1d/moz.yaml -r <commit>
     15 
     16 The upstream git repository is https://code.videolan.org/videolan/dav1d
     17 
     18 To update to a fork, use
     19 
     20   ./mach vendor media/libdav1d/moz.yaml --repo <repository url> [-r <commit>]
     21 
     22 
     23 The rough steps are:
     24 - Execute ./mach vendor media/libdav1d/moz.yaml -r {tag-name}  # ex: ./mach vendor media/libdav1d/moz.yaml -r 0.6.0
     25 - Update ./moz.build and ./asm/moz.build to add new files and remove deleted ones using
     26   third_party/dav1d/src/meson.build as a guide (confirm with the diff) (note the
     27   empty .asm file in x86_64)
     28 - Some assembly files (notably avx2-specific ones) will generate no code on win32 builds,
     29   leading to a nasm failure like:
     30   "panic: assertion cv8_state.source_files != NULL failed at output/codeview.c:517"
     31   These files can be identified by the `%if ARCH_X86_64` conditional around the entire contents.
     32   To work around this error, move the sources to the moz.build block with the
     33   `if CONFIG['TARGET_CPU'] == 'x86_64'` conditional.
     34   See https://bugzilla.mozilla.org/show_bug.cgi?id=1712832 and
     35       https://bugzilla.nasm.us/show_bug.cgi?id=3392658
     36 - Some files will be automatically added to the various autovendored_sources.mozbuild files.
     37   In the case of the asm dir, these may cause build failures on particular platforms which
     38   can be resolved by moving those out of autovendored_sources.mozbuild and into the regular
     39   moz.build which has a condition on CONFIG['TARGET_CPU'].
     40 - Files ending in _tmpl.c may be automatically added to SOURCES, resulting in build failures.
     41   To fix this, the file must be moved to the appropriate bitdepth_basenames list where
     42   generate_source.py will generate the templates into buildable source files. In general,
     43   all *_tmpl.c files require BITDEPTH to be defined.
     44 - Clone the tag from the dav1d repo and build a stand-alone libdav1d following the steps here:
     45   https://code.videolan.org/videolan/dav1d#compile
     46 - Copy vcs_version.h from the local build/include/vcs_version.h
     47   to media/libdav1d/vcs_version.h
     48 - Copy version.h from local build/include/dav1d/version.h to
     49   media/libdav1d/version.h
     50 - Add new options, if any, in moz.build or config.h
     51 
     52 Tips:
     53 - If you see build failures in build-linux64-base-toolchains (or
     54   similar jobs) dav1d may now require a higher minimum nasm version
     55   than our base toolchains currently support.  A bug updating the
     56   minimum nasm version will probably be necessary.