@@ -22,10 +22,10 @@ RUN curl https://sh.rustup.rs -sSf | \
2222 sh -s -- --default-toolchain stable -y
2323ENV PATH=/root/.cargo/bin:$PATH
2424
25- # Compile mode is explicitly set here to strip the debug symbols from the
26- # native extensions in dd-trace-py . Otherwise, they will have debug symbols
27- # by default when built from sources. PyPI packages are stripped off of debug
28- # symbols. This is mainly to reduce the layer size at the cost of debuggability
25+ # Compile mode is explicitly set here to not build native extensions with
26+ # debug symbols . Otherwise, they will have debug symbols by default when built
27+ # from sources. PyPI packages are stripped off of debug symbols, using strip -g.
28+ # This is mainly to reduce the layer size at the cost of debuggability.
2929ENV DD_COMPILE_MODE=Release
3030
3131# Install datadog_lambda and dependencies from local
@@ -78,7 +78,10 @@ RUN find ./python/lib/$runtime/site-packages/ddtrace -name \*.h -delete
7878RUN find ./python/lib/$runtime/site-packages/ddtrace -name \* .hpp -delete
7979RUN find ./python/lib/$runtime/site-packages/ddtrace -name \* .pyx -delete
8080
81- # Strip debug symbols using strip -g for all .so files in ddtrace
81+ # Strip debug symbols using strip -g for all .so files in ddtrace. This is to
82+ # reduce the size when ddtrace is built from sources. The release wheels are
83+ # already stripped of debug symbols. We should revisit this when serverless
84+ # benchmark uses pre-built wheels instead of building from sources.
8285RUN find ./python/lib/$runtime/site-packages/ddtrace -name "*.so" -exec strip -g {} \;
8386
8487FROM scratch
0 commit comments