File tree Expand file tree Collapse file tree 4 files changed +16
-44
lines changed
Expand file tree Collapse file tree 4 files changed +16
-44
lines changed Original file line number Diff line number Diff line change 22idf_component_register(
33 SRCS /dev/null # We don't have any C++ sources
44 PRIV_INCLUDE_DIRS "."
5- LDFRAGMENTS "linker.lf"
65)
76
87idf_build_get_property(target IDF_TARGET)
@@ -42,7 +41,7 @@ endforeach()
4241target_compile_options (${COMPONENT_LIB} PUBLIC "$<$<COMPILE_LANGUAGE:Swift>:SHELL:
4342 -target riscv32-none-none-eabi
4443 -Xfrontend -function-sections -enable-experimental-feature Embedded -wmo -parse-as-library -Osize
45- -Xcc -march=${march_flag} -Xcc -mabi=${mabi_flag}
44+ -Xcc -march=${march_flag} -Xcc -mabi=${mabi_flag} -Xcc -fno-pic -Xcc -fno-pie
4645
4746 -pch-output-dir /tmp
4847 -Xfrontend -enable-single-module-llvm-emission
@@ -65,3 +64,10 @@ target_sources(${COMPONENT_LIB}
6564 Main.swift
6665 Led.swift
6766)
67+
68+ add_custom_command (
69+ TARGET ${COMPONENT_LIB}
70+ POST_BUILD
71+ COMMAND ${CMAKE_OBJCOPY} --remove-section .swift_modhash
72+ $<TARGET_FILE:${COMPONENT_LIB} > $<TARGET_FILE:${COMPONENT_LIB} >
73+ )
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 22idf_component_register(
33 SRCS /dev/null # We don't have any C++ sources
44 PRIV_INCLUDE_DIRS "."
5- LDFRAGMENTS "linker.lf"
65)
76
87idf_build_get_property(target IDF_TARGET)
@@ -42,7 +41,7 @@ endforeach()
4241target_compile_options (${COMPONENT_LIB} PUBLIC "$<$<COMPILE_LANGUAGE:Swift>:SHELL:
4342 -target riscv32-none-none-eabi
4443 -Xfrontend -function-sections -enable-experimental-feature Embedded -wmo -parse-as-library -Osize
45- -Xcc -march=${march_flag} -Xcc -mabi=${mabi_flag}
44+ -Xcc -march=${march_flag} -Xcc -mabi=${mabi_flag} -Xcc -fno-pic -Xcc -fno-pie
4645
4746 -pch-output-dir /tmp
4847 -Xfrontend -enable-single-module-llvm-emission
@@ -65,3 +64,10 @@ target_sources(${COMPONENT_LIB}
6564 Main.swift
6665 LedStrip.swift
6766)
67+
68+ add_custom_command (
69+ TARGET ${COMPONENT_LIB}
70+ POST_BUILD
71+ COMMAND ${CMAKE_OBJCOPY} --remove-section .swift_modhash
72+ $<TARGET_FILE:${COMPONENT_LIB} > $<TARGET_FILE:${COMPONENT_LIB} >
73+ )
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments