mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Add split-binary mode to packager
This commit is contained in:
parent
f4e9dab229
commit
7ec47da203
@ -52,7 +52,7 @@ def run_image_with_env(image_name, output, env_variables, ch_root):
|
||||
|
||||
subprocess.check_call(cmd, shell=True)
|
||||
|
||||
def parse_env_variables(build_type, compiler, sanitizer, package_type, cache, distcc_hosts, unbundled):
|
||||
def parse_env_variables(build_type, compiler, sanitizer, package_type, cache, distcc_hosts, unbundled, split_binary):
|
||||
result = []
|
||||
if package_type == "deb":
|
||||
result.append("DEB_CC={}".format(compiler))
|
||||
@ -77,6 +77,10 @@ def parse_env_variables(build_type, compiler, sanitizer, package_type, cache, di
|
||||
|
||||
if unbundled:
|
||||
result.append('CMAKE_FLAGS="-DUNBUNDLED=1 -DENABLE_MYSQL=0 -DENABLE_POCO_ODBC=0 -DENABLE_ODBC=0 $CMAKE_FLAGS"')
|
||||
|
||||
if split_binary:
|
||||
result.append('CMAKE_FLAGS="-DUSE_STATIC_LIBRARIES=0 -DSPLIT_SHARED_LIBRARIES=1 -DCLICKHOUSE_SPLIT_BINARY=1 $CMAKE_FLAGS"')
|
||||
|
||||
return result
|
||||
|
||||
if __name__ == "__main__":
|
||||
@ -89,6 +93,7 @@ if __name__ == "__main__":
|
||||
parser.add_argument("--compiler", choices=("clang-6.0", "clang-7", "gcc-7", "gcc-8"), default="gcc-7")
|
||||
parser.add_argument("--sanitizer", choices=("address", "thread", "memory", "undefined", ""), default="")
|
||||
parser.add_argument("--unbundled", action="store_true")
|
||||
parser.add_argument("--split-binary", action="store_true")
|
||||
parser.add_argument("--cache", choices=("", "ccache", "distcc"), default="")
|
||||
parser.add_argument("--distcc-hosts", nargs="+")
|
||||
parser.add_argument("--force-build-image", action="store_true")
|
||||
@ -108,6 +113,6 @@ if __name__ == "__main__":
|
||||
if not check_image_exists_locally(image_name) or args.force_build_image:
|
||||
if not pull_image(image_name) or args.force_build_image:
|
||||
build_image(image_name, dockerfile)
|
||||
env_prepared = parse_env_variables(args.build_type, args.compiler, args.sanitizer, args.package_type, args.cache, args.distcc_hosts, args.unbundled)
|
||||
env_prepared = parse_env_variables(args.build_type, args.compiler, args.sanitizer, args.package_type, args.cache, args.distcc_hosts, args.unbundled, args.split_binary)
|
||||
run_image_with_env(image_name, args.output_dir, env_prepared, ch_root)
|
||||
logging.info("Output placed into {}".format(args.output_dir))
|
||||
|
Loading…
Reference in New Issue
Block a user