Skip to content

Commit a349077

Browse files
authored
Refactor AS flags extraction in copy-libs.sh
Updated extraction of AS flags to include both CXX and C flags.
1 parent ca252c4 commit a349077

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tools/copy-libs.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,13 @@ done
322322

323323
mkdir -p "$AR_SDK"
324324

325-
# Extract AS flags with "-m"
326-
PIO_AS_FLAGS+=$(echo "$AS_FLAGS" | grep -o '\-m[^[:space:]]*')
325+
# Extract flags with "-m"
326+
PIO_AS_FLAGS=$(
327+
{
328+
echo "$PIO_CXX_FLAGS" | grep -o '\-m[^[:space:]]*'
329+
echo "$PIO_C_FLAGS" | grep -o '\-m[^[:space:]]*'
330+
} | awk '!seen[$0]++' | tr '\n' ' '
331+
)
327332

328333
# start generation of pioarduino-build.py
329334
AR_PLATFORMIO_PY="$AR_SDK/pioarduino-build.py"

0 commit comments

Comments
 (0)