Skip to content

Commit 33fcbce

Browse files
authored
chore(build): strip debug symbols using strip -g (#652)
* chore(build): build dd-trace-py with release mode by default * does this make difference * debug print * try setting here * Revert "debug print" This reverts commit 07df11a. * Revert "try setting here" This reverts commit 6f06143. * comment * debug print * aggressively strip debug symbols * remove debug print * update comments * can this work too?
1 parent 3b5260d commit 33fcbce

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,11 @@ RUN find ./python/lib/$runtime/site-packages/ddtrace -name \*.h -delete
7272
RUN find ./python/lib/$runtime/site-packages/ddtrace -name \*.hpp -delete
7373
RUN find ./python/lib/$runtime/site-packages/ddtrace -name \*.pyx -delete
7474

75+
# Strip debug symbols using strip -g for all .so files in ddtrace. This is to
76+
# reduce the size when ddtrace is built from sources. The release wheels are
77+
# already stripped of debug symbols. We should revisit this when serverless
78+
# benchmark uses pre-built wheels instead of building from sources.
79+
RUN find ./python/lib/$runtime/site-packages/ddtrace -name "*.so" -exec strip -g {} \;
80+
7581
FROM scratch
7682
COPY --from=builder /build/python /

0 commit comments

Comments
 (0)