third-party/README.md
All of the dependencies that hhvm needs which don't have distribution/homebrew packages.
Facebook dependencies (e.g. folly, thrift, proxygen) should all be updated simultaneously, to identical versions.
Some tips:
build/ or obj-x86_64-linux-gnu), as this lets you easily delete all the relevant build state/artifacts without deleting your changes to the source and cmake.patches/, and they are applied in the order listed in series. quilt can be used to manage these as a form of source control, and is usually worth configuring.
export HHVM_TP_QUILT=$(which quilt); you may need to delete $BUILD_DIR/third-party/ after setting that to get a clean build.cd to the extracted source directory, e.g. $BUILD_DIR/third-party/folly/bundled_folly-prefix/src/bundled_follyexport QUILT_PATCHES=$SOURCE_DIR/third-party/$PROJECT/patchesquilt push -aquilt delete PATCH_NAME_HERE.patch; if it is still needed but needs updates, use quilt push -f to produce a .rej (rejected changes) file, manually apply the changes, then run quilt refresh when you are donequilt add FILE before editing the file, then quilt refresh when you are donequilt new MY_PATCH.patch, quilt add FILE, quilt refreshquilt pop -a --refreshSome Facebook-employee-specific tips:
i opensource/ondemand/facebook/hhvm; when prompted, select the most recent successfully built for the oldest Ubuntu listed.brew uninstall --force --ignore-dependencies FOO; you can then install the same package used in the CI with yum install; find the package with yum search foo - you probably want the most recent nix2rpm package, though you can check exactly which is used in hphp/facebook/autobuild/cmake/mac/cmake.shOverall process:
vYYYY.MM.DD.00; full download URLs are listed in third-party/foo/CMakeLists.txt. Update these tags to the version you're targeting.vYYYY.MM.DD.00.tar.gz, rename to PROJECT-vYYYY.MM.DD.00.tar.gzthird-party/foo/CMakeLists.txt to match openssl dgst -sha256 *.tar.gzfor file in *; do manifold put $file hhvm_opensource_dependency_cache/flat/$file; doneSteps 2-4 can be done by update-first-party.sh
Step 5 can be done by upload-first-party-to-manifold.sh
Most things here have 3 targets:
foofoo_depsbundled_fooIf bundled_foo is used, foo depends on bundled_foo; for some projects (like folly), this is always the case, but for others (like boost), the system version of the library will be used instead if possible, and the foo target will be configured to point to it.
foo_deps is a fake target, that defines all of the direct dependencies; foo will always depend on foo_deps. This target is required because if myapp depends on foo and foo depends on bar, link order matters: the linker must know that foo depends on bar. myapp -> [foo, bar] is not sufficient.
Finally, we also frequently have a FOO_DEPS variable in addition to the foo_deps target; this is because:
foo_deps is an INTERFACE library in cmake; this means that the target is fake (.PHONY in gmake terms) - there is no .a/.so/.dylib output. it just tracks dependency informationbundled_foo is also a special target (defined by ExternalProject_Add); if given an INTERFACE dependency, it makes it part of its' own interface dependencies, but doesn't actually build-depend on it.INTERFACE targets are only allowed INTERFACE libraries; in particular, PUBLIC are not permitted by CMake, which is what would be correct herebundled_foo depend directly on ${FOO_DEPS}, rather than the interface foo_deps, even though they're otherwise equivalent.Various licenses are used in this project; see the notices in relevant files and subdirectories for details.