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

getdeps: add --build-type option to build in Debug or RelWithDebInfo mode

Summary:
X-link: https://github.com/facebookincubator/zstrong/pull/653

getdeps: add --build-type option to build in Debug or RelWithDebInfo mode

Adds a --build-type option so one can force RelWithDebInfo or Debug explicity

Default remains RelWithDebInfo for cmake.

cargo default is updated to --release to match cmake more closely, if you don't want release use --build-type Debug.

If you want to run github CI in Debug mode (faster build, but tests will run slower), then can pass --build-type Debug to getdeps.py generate-github-actions

X-link: https://github.com/facebook/sapling/pull/786

Reviewed By: mitrandir77

Differential Revision: D51564770

Pulled By: bigfootjon

fbshipit-source-id: ef30332ca193d9805bce005d12b5dbc9f58fcafc
This commit is contained in:
Alex Hornby
2023-12-19 12:24:39 -08:00
committed by Facebook GitHub Bot
parent 7cdc5c8108
commit f15e30b787
4 changed files with 47 additions and 11 deletions

View File

@@ -52,6 +52,7 @@ class BuildOptions(object):
shared_libs: bool = False,
facebook_internal=None,
free_up_disk: bool = False,
build_type: Optional[str] = None,
) -> None:
"""fbcode_builder_dir - the path to either the in-fbsource fbcode_builder dir,
or for shipit-transformed repos, the build dir that
@@ -67,6 +68,7 @@ class BuildOptions(object):
vcvars_path - Path to external VS toolchain's vsvarsall.bat
shared_libs - whether to build shared libraries
free_up_disk - take extra actions to save runner disk space
build_type - CMAKE_BUILD_TYPE, used by cmake and cargo builders
"""
if not install_dir:
@@ -107,6 +109,11 @@ class BuildOptions(object):
self.shared_libs = shared_libs
self.free_up_disk = free_up_disk
if build_type is None:
build_type = "RelWithDebInfo"
self.build_type = build_type
lib_path = None
if self.is_darwin():
lib_path = "DYLD_LIBRARY_PATH"
@@ -606,6 +613,7 @@ def setup_build_options(args, host_type=None) -> BuildOptions:
"lfs_path",
"shared_libs",
"free_up_disk",
"build_type",
}
}