mirror of
https://github.com/facebook/proxygen.git
synced 2025-08-05 19:55:47 +03:00
improve crate vendoring (#110)
Summary: Pull Request resolved: https://github.com/facebookexperimental/eden/pull/110 Pull Request resolved: https://github.com/facebookexperimental/rust-shed/pull/27 Make it so that changes to rust-shed or other common rust source are used locally vendored, so they don't need to be pushed to github before they are visible in a build. There was already some support for cargo vendoring in getdeps, but it was limited to dependencies between manifests built with cargo builder. This wasn't enough to build something like eden (cmake is main entry point, with later calls cargo) or eden_scm (make is main entry point, with later calls to cargo), so this diff adds a cargo prepare step for getdeps other primary build systems. The cargo vendoring is done by using a cargo config file to point to the source files used by getdeps. It has two modes: 1. per crate, existing mode which is already automatic for cargo to cargo manifest dependencies. To use it for a non cargo build manifest, add crate.pathmap 2. per git url, existing mode which was only use for crates.io third-party crates, now can be enabled by setting cargo.cargo_config_file Reviewed By: yancouto Differential Revision: D33895469 fbshipit-source-id: 7b13c0b679532492a336ce217de875c25fe1be90
This commit is contained in:
committed by
Facebook GitHub Bot
parent
234713f961
commit
fa26d2a99b
@@ -599,6 +599,18 @@ class BuildCmd(ProjectCmdBase):
|
||||
if os.path.exists(built_marker):
|
||||
os.unlink(built_marker)
|
||||
src_dir = fetcher.get_src_dir()
|
||||
# Prepare builders write out config before the main builder runs
|
||||
prepare_builders = m.create_prepare_builders(
|
||||
loader.build_opts,
|
||||
ctx,
|
||||
src_dir,
|
||||
build_dir,
|
||||
inst_dir,
|
||||
loader,
|
||||
)
|
||||
for preparer in prepare_builders:
|
||||
preparer.prepare(install_dirs, reconfigure=reconfigure)
|
||||
|
||||
builder = m.create_builder(
|
||||
loader.build_opts,
|
||||
src_dir,
|
||||
|
Reference in New Issue
Block a user