mirror of
https://github.com/facebook/proxygen.git
synced 2025-08-07 07:02:53 +03:00
eden/scm: provide getdeps.py way of building eden/scm on GitHub
Summary: In order to do what the title says, this diff does: 1. Add the `eden/oss/.../third-party/rust/.../Cargo.toml` files. As mentioned in the previous diff, those are required by GitHub so that the third party dependencies that are local in fbsource are properly defined with a "git" dependency in order for Cargo to "link" crates properly. 2. Changes to `eden/scm/Makefile` to add build/install commands for getdeps to invoke. Those command knowing that they are called from withing getdeps context they link the dependencies brought by getdeps into their proper places that match their folder layout in fbsource. Those Makefile commands also pass a GETDEPS_BUILD env to the setup.py invocations so that it knows it is being called withing a getdeps build. 3. Changes to `eden/scm/setup.py` that add "thriftasset" that makes use of the getdeps.py provided "thrift" binary to build .py files out of thrift files. 4. Changes to `distutils_rust` to use the vendored crates dir provided by getdeps. 5. Changes to `getdeps/builder.py` and `getdeps/manifest.py` that enable more fine-grained configuratior of how Makefile builds are invoked. 6. Changes to `getdeps/buildopts.py` and `getdeps/manifest.py` to disable overriding PATH and pkgconfig env, so that "eden/scm" builds in getdeps using system libraries rather than getdeps-provided ones (NOTE: I've tried to use getdeps provided libraries, but the trickiest bit was that Rust links with Python, which is currently not providable by getdeps, so if you try to build everything the system provided Python libraries will collide with getdeps provided ones) 7. Added `opensource/fbcode_builder/manifests/eden_scm` for the getdeps build. Reviewed By: quark-zju Differential Revision: D22336485 fbshipit-source-id: 244d10c9e06ee83de61e97e62a1f2a2184d2312f
This commit is contained in:
committed by
Facebook GitHub Bot
parent
538e973ed1
commit
b1f77bce82
@@ -67,6 +67,8 @@ SCHEMA = {
|
||||
"builder": REQUIRED,
|
||||
"subdir": OPTIONAL,
|
||||
"build_in_src_dir": OPTIONAL,
|
||||
"disable_env_override_pkgconfig": OPTIONAL,
|
||||
"disable_env_override_path": OPTIONAL,
|
||||
},
|
||||
},
|
||||
"msbuild": {"optional_section": True, "fields": {"project": REQUIRED}},
|
||||
@@ -80,7 +82,8 @@ SCHEMA = {
|
||||
"debs": {"optional_section": True},
|
||||
"preinstalled.env": {"optional_section": True},
|
||||
"b2.args": {"optional_section": True},
|
||||
"make.args": {"optional_section": True},
|
||||
"make.build_args": {"optional_section": True},
|
||||
"make.install_args": {"optional_section": True},
|
||||
"header-only": {"optional_section": True, "fields": {"includedir": REQUIRED}},
|
||||
"shipit.pathmap": {"optional_section": True},
|
||||
"shipit.strip": {"optional_section": True},
|
||||
@@ -94,7 +97,8 @@ ALLOWED_EXPR_SECTIONS = [
|
||||
"build",
|
||||
"cmake.defines",
|
||||
"dependencies",
|
||||
"make.args",
|
||||
"make.build_args",
|
||||
"make.install_args",
|
||||
"b2.args",
|
||||
"download",
|
||||
"git",
|
||||
@@ -234,8 +238,8 @@ class ManifestParser(object):
|
||||
return defval
|
||||
|
||||
def get_section_as_args(self, section, ctx=None):
|
||||
""" Intended for use with the make.args and autoconf.args
|
||||
sections, this method collects the entries and returns an
|
||||
""" Intended for use with the make.[build_args/install_args] and
|
||||
autoconf.args sections, this method collects the entries and returns an
|
||||
array of strings.
|
||||
If the manifest contains conditional sections, ctx is used to
|
||||
evaluate the condition and merge in the values.
|
||||
@@ -421,8 +425,18 @@ class ManifestParser(object):
|
||||
print("build_dir is %s" % build_dir) # just to quiet lint
|
||||
|
||||
if builder == "make":
|
||||
args = self.get_section_as_args("make.args", ctx)
|
||||
return MakeBuilder(build_options, ctx, self, src_dir, None, inst_dir, args)
|
||||
build_args = self.get_section_as_args("make.build_args", ctx)
|
||||
install_args = self.get_section_as_args("make.install_args", ctx)
|
||||
return MakeBuilder(
|
||||
build_options,
|
||||
ctx,
|
||||
self,
|
||||
src_dir,
|
||||
None,
|
||||
inst_dir,
|
||||
build_args,
|
||||
install_args,
|
||||
)
|
||||
|
||||
if builder == "autoconf":
|
||||
args = self.get_section_as_args("autoconf.args", ctx)
|
||||
|
Reference in New Issue
Block a user