Skip to content

Commit

Permalink
Fix stripping on macos. (#2394)
Browse files Browse the repository at this point in the history
  • Loading branch information
floitsch authored Jun 11, 2024
1 parent e9b4081 commit 5b1448c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ on:
release:
types: [published]
workflow_dispatch:
inputs:
strip:
description: "Strip executables"
required: false
type: boolean
default: false

env:
ESPTOOL_VERSION: v4.6
Expand Down Expand Up @@ -203,8 +209,8 @@ jobs:
echo "$TOITLSP" toitdoc -p $CPU_CORES --toitc=$TOITC "--sdk=$SDKDIR" "--out=$JSON_OUT_PATH" --version=$TOIT_VERSION lib
"$TOITLSP" toitdoc -p $CPU_CORES --toitc=$TOITC "--sdk=$SDKDIR" "--out=$JSON_OUT_PATH" --version=$TOIT_VERSION lib
- name: Strip executables
if: github.event_name == 'release'
- name: Strip executables - Linux/Windows
if: runner.os != 'macOS' && (github.event_name == 'release' || inputs.strip == 'true')
run: |
strip -s build/host/sdk/bin/*
strip -s build/host/sdk/tools/*
Expand Down
5 changes: 4 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,6 @@ if (NOT "${TOIT_SYSTEM_NAME}" MATCHES "esp32")
${BOOT_SNAPSHOT_CC}
${run_SRC}
)

target_link_libraries(
${VESSEL_TARGET} ${TOIT_LINK_LIBS}
)
Expand All @@ -336,6 +335,10 @@ if (NOT "${TOIT_SYSTEM_NAME}" MATCHES "esp32")
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/sdk/vessels"
)
set_target_properties(${VESSEL_TARGET}
PROPERTIES
LINK_FLAGS_RELEASE "-s"
)

# Unsign the vessel executables.
if ("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
Expand Down

0 comments on commit 5b1448c

Please sign in to comment.