mirror of
https://github.com/facebook/proxygen.git
synced 2025-08-08 18:02:05 +03:00
Add --shared-libs arg to getdeps.py
Summary: This diffs adds * `--shared-libs` command line argument to the `build` command which enables building shared libraries for supported projects (cmake-based projects, boost, libevent) * this flag overrides `BUILD_SHARED_LIBS` cmake flags in manifest files and from `--extra-cmake-defines` * adds `shared_libs=on` expression support in manifest files * for boost, the flag enables building shared libraries **in addition to** statically linked ones Reviewed By: simonmar Differential Revision: D27462289 fbshipit-source-id: d22ab434f7228c30472611bc323830d88efba0a5
This commit is contained in:
committed by
Facebook GitHub Bot
parent
fa4dbed8a7
commit
10216910e9
@@ -486,6 +486,8 @@ if __name__ == "__main__":
|
||||
if extra_cmake_defines:
|
||||
self.defines.update(extra_cmake_defines)
|
||||
self.loader = loader
|
||||
if build_opts.shared_libs:
|
||||
self.defines["BUILD_SHARED_LIBS"] = "ON"
|
||||
|
||||
def _invalidate_cache(self):
|
||||
for name in [
|
||||
@@ -968,7 +970,7 @@ class Boost(BuilderBase):
|
||||
def _build(self, install_dirs, reconfigure):
|
||||
env = self._compute_env(install_dirs)
|
||||
linkage = ["static"]
|
||||
if self.build_opts.is_windows():
|
||||
if self.build_opts.is_windows() or self.build_opts.shared_libs:
|
||||
linkage.append("shared")
|
||||
|
||||
args = []
|
||||
@@ -1118,7 +1120,7 @@ install(FILES sqlite3.h sqlite3ext.h DESTINATION include)
|
||||
|
||||
defines = {
|
||||
"CMAKE_INSTALL_PREFIX": self.inst_dir,
|
||||
"BUILD_SHARED_LIBS": "OFF",
|
||||
"BUILD_SHARED_LIBS": "ON" if self.build_opts.shared_libs else "OFF",
|
||||
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
|
||||
}
|
||||
define_args = ["-D%s=%s" % (k, v) for (k, v) in defines.items()]
|
||||
|
Reference in New Issue
Block a user