1
0
mirror of https://github.com/facebook/proxygen.git synced 2025-08-07 07:02:53 +03:00

add freebsd support

Summary: Add some basic support for FreeBSD to getdeps.

Reviewed By: ahornby

Differential Revision: D33989129

fbshipit-source-id: 42ff5f160b7e19c12196bb2e52a726f7815487bd
This commit is contained in:
Chad Austin
2022-02-08 18:06:55 -08:00
committed by Facebook GitHub Bot
parent 6926f90e05
commit 5cd35796ba
10 changed files with 76 additions and 9 deletions

View File

@@ -100,10 +100,23 @@ class BuilderBase(object):
@property
def num_jobs(self) -> int:
# 1.5 GiB is a lot to assume, but it's typical of Facebook-style C++.
# Some manifests are even heavier and should override.
# This is a hack, but we don't have a "defaults manifest" that we can
# customize per platform.
# TODO: Introduce some sort of defaults config that can select by
# platform, just like manifest contexts.
if sys.platform.startswith("freebsd"):
# clang on FreeBSD is quite memory-efficient.
default_job_weight = 512
else:
# 1.5 GiB is a lot to assume, but it's typical of Facebook-style C++.
# Some manifests are even heavier and should override.
default_job_weight = 1536
return self.build_opts.get_num_jobs(
int(self.manifest.get("build", "job_weight_mib", 1536, ctx=self.ctx))
int(
self.manifest.get(
"build", "job_weight_mib", default_job_weight, ctx=self.ctx
)
)
)
def run_tests(