提交 6cc2f8da 编写于 作者: I Ivan Lezhankin

Add 'clang-8-darwin' choise and update Docker build image.

上级 ce2fb6d3
......@@ -57,7 +57,23 @@ RUN apt-get update -y \
gperf \
cmake \
gdb \
rename
rename \
wget
# Build and install tools for cross-linking to Darwin
ENV CC=clang-8
ENV CXX=clang++-8
# libtapi is required to support .tbh format from recent MacOS SDKs
RUN git clone https://github.com/tpoechtrager/apple-libtapi.git
RUN cd apple-libtapi && INSTALLPREFIX=/cctools ./build.sh && ./install.sh
RUN git clone https://github.com/tpoechtrager/cctools-port.git
RUN cd cctools-port/cctools && ./configure --prefix=/cctools --with-libtapi=/cctools --target=x86_64-apple-darwin && make install
RUN wget https://github.com/phracker/MacOSX-SDKs/releases/download/10.14-beta4/MacOSX10.14.sdk.tar.xz
RUN tar xJf MacOSX10.14.sdk.tar.xz -C /cctools
COPY build.sh /
CMD ["/bin/bash", "/build.sh"]
......@@ -118,6 +118,13 @@ def parse_env_variables(build_type, compiler, sanitizer, package_type, cache, di
cmake_flags.append('-DCMAKE_C_COMPILER=`which {}`'.format(cc))
cmake_flags.append('-DCMAKE_CXX_COMPILER=`which {}`'.format(cxx))
if "darwin" in compiler:
cmake_flags.append("-DCMAKE_AR:FILEPATH=/cctools/bin/x86_64-apple-darwin-ar") \
.append("-DCMAKE_RANLIB:FILEPATH=/cctools/bin/x86_64-apple-darwin-ranlib") \
.append("-DCMAKE_SYSTEM_NAME=Darwin") \
.append("-DSDK_PATH=/cctools/MacOSX10.14.sdk") \
.append("-DLINKER_NAME=/cctools/bin/x86_64-apple-darwin-ld")
if sanitizer:
result.append("SANITIZER={}".format(sanitizer))
if build_type:
......@@ -166,12 +173,12 @@ def parse_env_variables(build_type, compiler, sanitizer, package_type, cache, di
if __name__ == "__main__":
logging.basicConfig(level=logging.INFO, format='%(asctime)s %(message)s')
parser = argparse.ArgumentParser(description="ClickHouse building script via virtualization mechanisms")
parser = argparse.ArgumentParser(description="ClickHouse building script using prebuilt Docker image")
parser.add_argument("--package-type", choices=IMAGE_MAP.keys(), required=True)
parser.add_argument("--clickhouse-repo-path", default="../../")
parser.add_argument("--output-dir", required=True)
parser.add_argument("--build-type", choices=("debug", ""), default="")
parser.add_argument("--compiler", choices=("clang-6.0", "clang-7", "gcc-7", "clang-8", "gcc-8", "gcc-9"), default="gcc-7")
parser.add_argument("--compiler", choices=("clang-6.0", "clang-7", "gcc-7", "clang-8", "clang-8-darwin", "gcc-8", "gcc-9"), 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")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册