Skip to content
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
10 changes: 8 additions & 2 deletions esp32-led-blink-sdk/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
idf_component_register(
SRCS /dev/null # We don't have any C++ sources
PRIV_INCLUDE_DIRS "."
LDFRAGMENTS "linker.lf"
)

idf_build_get_property(target IDF_TARGET)
Expand Down Expand Up @@ -42,7 +41,7 @@ endforeach()
target_compile_options(${COMPONENT_LIB} PUBLIC "$<$<COMPILE_LANGUAGE:Swift>:SHELL:
-target riscv32-none-none-eabi
-Xfrontend -function-sections -enable-experimental-feature Embedded -wmo -parse-as-library -Osize
-Xcc -march=${march_flag} -Xcc -mabi=${mabi_flag}
-Xcc -march=${march_flag} -Xcc -mabi=${mabi_flag} -Xcc -fno-pic -Xcc -fno-pie

-pch-output-dir /tmp
-Xfrontend -enable-single-module-llvm-emission
Expand All @@ -65,3 +64,10 @@ target_sources(${COMPONENT_LIB}
Main.swift
Led.swift
)

add_custom_command(
TARGET ${COMPONENT_LIB}
POST_BUILD
COMMAND ${CMAKE_OBJCOPY} --remove-section .swift_modhash
$<TARGET_FILE:${COMPONENT_LIB}> $<TARGET_FILE:${COMPONENT_LIB}>
)
20 changes: 0 additions & 20 deletions esp32-led-blink-sdk/main/linker.lf

This file was deleted.

10 changes: 8 additions & 2 deletions esp32-led-strip-sdk/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
idf_component_register(
SRCS /dev/null # We don't have any C++ sources
PRIV_INCLUDE_DIRS "."
LDFRAGMENTS "linker.lf"
)

idf_build_get_property(target IDF_TARGET)
Expand Down Expand Up @@ -42,7 +41,7 @@ endforeach()
target_compile_options(${COMPONENT_LIB} PUBLIC "$<$<COMPILE_LANGUAGE:Swift>:SHELL:
-target riscv32-none-none-eabi
-Xfrontend -function-sections -enable-experimental-feature Embedded -wmo -parse-as-library -Osize
-Xcc -march=${march_flag} -Xcc -mabi=${mabi_flag}
-Xcc -march=${march_flag} -Xcc -mabi=${mabi_flag} -Xcc -fno-pic -Xcc -fno-pie

-pch-output-dir /tmp
-Xfrontend -enable-single-module-llvm-emission
Expand All @@ -65,3 +64,10 @@ target_sources(${COMPONENT_LIB}
Main.swift
LedStrip.swift
)

add_custom_command(
TARGET ${COMPONENT_LIB}
POST_BUILD
COMMAND ${CMAKE_OBJCOPY} --remove-section .swift_modhash
$<TARGET_FILE:${COMPONENT_LIB}> $<TARGET_FILE:${COMPONENT_LIB}>
)
20 changes: 0 additions & 20 deletions esp32-led-strip-sdk/main/linker.lf

This file was deleted.