Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions tools/extract-debug-symbols.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,43 @@ STRIP="${STRIP:-strip}"

function extract_linux_or_android {

for input in $@ ; do
output="${input}${suffix}"
for input in "$@" ; do
output="${input}${suffix}"

# The --preserve-dates flag for strip and objcopy only has whole
# second resolution, so save the timestamps in a separate file
# instead.
touch -m -r "$input" "$input.timestamps"

# Extract a copy of the debugging information
$OBJCOPY --only-keep-debug "$input" "$output"

# Because we export symbols from the engine, only debug symbols
# should be stripped.
$STRIP -x --preserve-dates --strip-debug "$input"
$STRIP -x --strip-debug "$input"

# Add a hint for the debugger so it can find the debug info
$OBJCOPY --preserve-dates --remove-section=.gnu_debuglink "$input"
$OBJCOPY --preserve-dates --add-gnu-debuglink="$output" "$input"
$OBJCOPY --remove-section=.gnu_debuglink "$input"
$OBJCOPY --add-gnu-debuglink="$output" "$input"

# Restore the original modification time
touch -m -r "$input.timestamps" "$input"
rm "$input.timestamps" 2>&1
done

}

function extract_emscripten {

for input in $@ ; do
for input in "$@" ; do
touch "${input}${suffix}"
done

}

function extract_mac_or_ios {

for input in $@ ; do
for input in "$@" ; do
output="${input}${suffix}"

# If this is an app bundle, find the executable name
Expand Down
4 changes: 0 additions & 4 deletions util/build-extensions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,5 @@ build_order=$(${lc_compile} --modulepath ${module_dir} --deps changed-order -- $

# Loop over the extensions that need to be (re-)built
for ext in ${build_order} ; do
# Create the output directory
mkdir -p "${destination_dir}"/com.livecode.extensions.livecode.$(basename -s .lcb "${ext}")

# Build this extension
build_widget $(dirname "${ext}") "${destination_dir}" "${module_dir}" "${lc_compile}"
done