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 2
2
idf_component_register (
3
3
SRCS /dev/null # We don't have any C++ sources
4
4
PRIV_INCLUDE_DIRS "."
5
- LDFRAGMENTS "linker.lf"
6
5
)
7
6
8
7
idf_build_get_property (target IDF_TARGET )
@@ -42,7 +41,7 @@ endforeach()
42
41
target_compile_options (${COMPONENT_LIB} PUBLIC "$<$<COMPILE_LANGUAGE:Swift>:SHELL:
43
42
-target riscv32-none-none-eabi
44
43
-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
46
45
47
46
-pch-output-dir /tmp
48
47
-Xfrontend -enable-single-module-llvm-emission
@@ -65,3 +64,10 @@ target_sources(${COMPONENT_LIB}
65
64
Main.swift
66
65
Led.swift
67
66
)
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 2
2
idf_component_register (
3
3
SRCS /dev/null # We don't have any C++ sources
4
4
PRIV_INCLUDE_DIRS "."
5
- LDFRAGMENTS "linker.lf"
6
5
)
7
6
8
7
idf_build_get_property (target IDF_TARGET )
@@ -42,7 +41,7 @@ endforeach()
42
41
target_compile_options (${COMPONENT_LIB} PUBLIC "$<$<COMPILE_LANGUAGE:Swift>:SHELL:
43
42
-target riscv32-none-none-eabi
44
43
-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
46
45
47
46
-pch-output-dir /tmp
48
47
-Xfrontend -enable-single-module-llvm-emission
@@ -65,3 +64,10 @@ target_sources(${COMPONENT_LIB}
65
64
Main.swift
66
65
LedStrip.swift
67
66
)
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