diff options
| author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-10-23 14:16:34 +0900 |
|---|---|---|
| committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-10-23 15:28:07 +0900 |
| commit | 66ba2bc859ae2cfc85205318acfd5a9fff400946 (patch) | |
| tree | 5e5eadef290a6b591cc1a5fac9017e879a5b5162 | |
| parent | 8f8009e3c9b02324622f1e4d3460faace5e6e942 (diff) | |
| download | buildstream-66ba2bc859ae2cfc85205318acfd5a9fff400946.tar.gz | |
data/projectconfig.yaml: Issue #106 - Compress debug symbols by default
Deconstructed the default strip-commands to declare some objcopy and
strip arguments separately, so it's easier to override these in the
case that you are building with an older toolchain which does not
support compression of debug symbols (or if you want to strip them
with something in a more exotic way).
By default pass --compress-debug-sections to objcopy.
| -rw-r--r-- | buildstream/data/projectconfig.yaml | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/buildstream/data/projectconfig.yaml b/buildstream/data/projectconfig.yaml index 348fda357..f2ac83397 100644 --- a/buildstream/data/projectconfig.yaml +++ b/buildstream/data/projectconfig.yaml @@ -39,8 +39,17 @@ variables: # Indicates the build installation directory in the sandbox install-root: /buildstream/install - # Define some patterns which might be used in multiple - # elements + # Arguments for tooling used when stripping debug symbols + objcopy-link-args: --add-gnu-debuglink + objcopy-extract-args: | + + --only-keep-debug --compress-debug-sections + + strip-args: | + + --remove-section=.comment --remove-section=.note --strip-unneeded + + # Generic implementation for stripping debugging symbols strip-binaries: | find "%{install-root}" -type f \ @@ -53,15 +62,16 @@ variables: fi debugfile="%{install-root}%{debugdir}/$(basename "$1")" mkdir -p "$(dirname "$debugfile")" - objcopy --only-keep-debug "$1" "$debugfile" + objcopy %{objcopy-extract-args} "$1" "$debugfile" chmod 644 "$debugfile" - strip --remove-section=.comment --remove-section=.note --strip-unneeded "$1" - objcopy --add-gnu-debuglink "$debugfile" "$1"' - {} ';' + strip %{strip-args} "$1" + objcopy %{objcopy-link-args} "$debugfile" "$1"' - {} ';' + # Generic implementation for reproducible python builds fix-pyc-timestamps: | - find "%{install-root}" -name '*.pyc' \ - -exec dd if=/dev/zero of={} bs=1 count=4 seek=4 conv=notrunc ';' + find "%{install-root}" -name '*.pyc' -exec \ + dd if=/dev/zero of={} bs=1 count=4 seek=4 conv=notrunc ';' # Base sandbox environment, can be overridden by plugins @@ -75,7 +85,8 @@ environment: LC_ALL: C HOME: /tmp TZ: UTC - # For reproducible builds, lets use 2011-11-11 as a constant + + # For reproducible builds we use 2011-11-11 as a constant SOURCE_DATE_EPOCH: 1320937200 # List of environment variables which should not be taken into |
