Skip to content

Commit dd54f66

Browse files
authored
Improve bazel builds (#53)
Improve Bazel build system of the UDFClient - Change the configuration of compiler flags to achieve similar compiler optimization for the UDFClient than with the old build bash script - Activate link time optimization which might allow the compiler more optimizations than before - Remove unnecessary shared libraries for java, because these increased the loading time of the UDFClient - Simplify the rpath workaround by moving it to the java_repository.bzl - The build system can now build two variants of the executable, one with hard coded paths and one with a wrapper script which sets the paths via environment variables. The executable with hard coded paths only runs in the container environment, but has a few percent faster startup than the wrapper script. The wrapper script can be used local debugging and testing outside of the container environment.
1 parent df5e38a commit dd54f66

File tree

44 files changed

+1028
-148
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1028
-148
lines changed

flavors/fancyr-EXASOL-6.0.0/flavor_base/base_test_build_run/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ RUN ldconfig
1212
RUN mkdir /exaudf_src /exaudf
1313
COPY src/ /exaudf_src/
1414

15-
#ENV VERBOSE_BUILD "--subcommands --verbose_failures"
16-
1715
WORKDIR /exaudf_src/
18-
RUN ["/bin/bash", "-c", "source /env && bash build.sh -c dbg --define r=true //:exaudfclient"]
16+
RUN ["/bin/bash", "-c", "source /env && bash build.sh --config no-tty -c dbg --config r --config slow-wrapper-py2"]
1917
RUN cp -r -L bazel-bin/* /exaudf
2018

19+
RUN ./test_udfclient.sh /exaudf/exaudfclient.sh
20+
2121
RUN mkdir /exasol_emulator
2222
COPY emulator/ /exasol_emulator
2323
COPY src/exaudflib/zmqcontainer.proto /exasol_emulator

flavors/fancyr-EXASOL-6.0.0/flavor_base/build_deps/packages/apt_get_packages

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ openjdk-8-jdk
77
build-essential
88
locales
99
libpcre3-dev
10-
protobuf-compiler
10+
protobuf-compiler
11+
chrpath

flavors/fancyr-EXASOL-6.0.0/flavor_base/build_run/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ RUN ldconfig
1212
RUN mkdir /exaudf_src /exaudf
1313
COPY src/ /exaudf_src/
1414

15-
#ENV VERBOSE_BUILD "--subcommands --verbose_failures"
16-
1715
WORKDIR /exaudf_src/
18-
RUN ["/bin/bash", "-c", "source /env && bash build.sh -c opt --define r=true //:exaudfclient"]
16+
RUN ["/bin/bash", "-c", "source /env && bash build.sh --config no-tty --config optimize --config optimize-r --config fast-binary-py2"]
1917
RUN cp -r -L bazel-bin/* /exaudf
2018

19+
RUN ./test_udfclient.sh /exaudf/exaudfclient
20+
2121
COPY --from={{build_deps}} /build_info /build_info

flavors/fancyr-EXASOL-6.1.0/flavor_base/base_test_build_run/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ RUN ldconfig
1212
RUN mkdir /exaudf_src /exaudf
1313
COPY src/ /exaudf_src/
1414

15-
#ENV VERBOSE_BUILD "--subcommands --verbose_failures"
16-
1715
WORKDIR /exaudf_src/
18-
RUN ["/bin/bash", "-c", "source /env && bash build.sh -c dbg --define r=true //:exaudfclient"]
16+
RUN ["/bin/bash", "-c", "source /env && bash build.sh --config no-tty -c dbg --config r --config slow-wrapper-py2"]
1917
RUN cp -r -L bazel-bin/* /exaudf
2018

19+
RUN ./test_udfclient.sh /exaudf/exaudfclient.sh
20+
2121
RUN mkdir /exasol_emulator
2222
COPY emulator/ /exasol_emulator
2323
COPY src/exaudflib/zmqcontainer.proto /exasol_emulator

flavors/fancyr-EXASOL-6.1.0/flavor_base/build_deps/packages/apt_get_packages

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ openjdk-8-jdk
77
build-essential
88
locales
99
libpcre3-dev
10-
protobuf-compiler
10+
protobuf-compiler
11+
chrpath

flavors/fancyr-EXASOL-6.1.0/flavor_base/build_run/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ RUN ldconfig
1212
RUN mkdir /exaudf_src /exaudf
1313
COPY src/ /exaudf_src/
1414

15-
#ENV VERBOSE_BUILD "--subcommands --verbose_failures"
16-
1715
WORKDIR /exaudf_src/
18-
RUN ["/bin/bash", "-c", "source /env && bash build.sh -c opt --define r=true //:exaudfclient"]
16+
RUN ["/bin/bash", "-c", "source /env && bash build.sh --config no-tty --config optimize --config optimize-r --config fast-binary-py2"]
1917
RUN cp -r -L bazel-bin/* /exaudf
2018

19+
RUN ./test_udfclient.sh /exaudf/exaudfclient
20+
2121
COPY --from={{build_deps}} /build_info /build_info

flavors/python3-ds-EXASOL-6.0.0/flavor_base/base_test_build_run/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ RUN ldconfig
1212
RUN mkdir /exaudf_src /exaudf
1313
COPY src/ /exaudf_src/
1414

15-
#ENV VERBOSE_BUILD "--subcommands --verbose_failures"
16-
1715
WORKDIR /exaudf_src/
18-
RUN ["/bin/bash", "-c", "source /env && bash build.sh -c dbg --define python=true //:exaudfclient_py3"]
16+
RUN ["/bin/bash", "-c", "source /env && bash build.sh --config no-tty -c dbg --config python --config slow-wrapper-py3"]
1917
RUN cp -r -L bazel-bin/* /exaudf
2018

19+
RUN ./test_udfclient.sh /exaudf/exaudfclient_py3.sh
20+
2121
RUN mkdir /exasol_emulator
2222
COPY emulator/ /exasol_emulator
2323
COPY src/exaudflib/zmqcontainer.proto /exasol_emulator

flavors/python3-ds-EXASOL-6.0.0/flavor_base/build_deps/packages/apt_get_packages

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ openjdk-8-jdk
77
build-essential
88
locales
99
libpcre3-dev
10-
protobuf-compiler
10+
protobuf-compiler
11+
chrpath

flavors/python3-ds-EXASOL-6.0.0/flavor_base/build_run/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ RUN ldconfig
1212
RUN mkdir /exaudf_src /exaudf
1313
COPY src/ /exaudf_src/
1414

15-
#ENV VERBOSE_BUILD "--subcommands --verbose_failures"
16-
1715
WORKDIR /exaudf_src/
18-
RUN ["/bin/bash", "-c", "source /env && bash build.sh -c opt --define python=true //:exaudfclient_py3"]
16+
RUN ["/bin/bash", "-c", "source /env && bash build.sh --config no-tty --config optimize --config python --config fast-binary-py3"]
1917
RUN cp -r -L bazel-bin/* /exaudf
2018

19+
RUN ./test_udfclient.sh /exaudf/exaudfclient_py3
20+
2121
COPY --from={{build_deps}} /build_info /build_info

flavors/python3-ds-EXASOL-6.1.0/flavor_base/base_test_build_run/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ RUN ldconfig
1212
RUN mkdir /exaudf_src /exaudf
1313
COPY src/ /exaudf_src/
1414

15-
#ENV VERBOSE_BUILD "--subcommands --verbose_failures"
16-
1715
WORKDIR /exaudf_src/
18-
RUN ["/bin/bash", "-c", "source /env && bash build.sh -c dbg --define python=true //:exaudfclient_py3"]
16+
RUN ["/bin/bash", "-c", "source /env && bash build.sh --config no-tty -c dbg --config python --config slow-wrapper-py3"]
1917
RUN cp -r -L bazel-bin/* /exaudf
2018

19+
RUN ./test_udfclient.sh /exaudf/exaudfclient_py3.sh
20+
2121
RUN mkdir /exasol_emulator
2222
COPY emulator/ /exasol_emulator
2323
COPY src/exaudflib/zmqcontainer.proto /exasol_emulator

0 commit comments

Comments
 (0)