File tree Expand file tree Collapse file tree 2 files changed +6
-39
lines changed
Expand file tree Collapse file tree 2 files changed +6
-39
lines changed Original file line number Diff line number Diff line change @@ -38,8 +38,12 @@ set(CMAKE_Swift_COMPILER
3838 "${swiftc_Path} "
3939)
4040set (CMAKE_Swift_FLAGS
41- # Whole-module optimization is always required for Embedded Swift.
42- "-enable-experimental-feature Embedded -wmo -target armv6m-none-none-eabi"
41+ # -wmo: Whole-module optimization is always required for Embedded Swift.
42+ # -Xfrontend -function-sections: enables dead stripping of unused runtime functions.
43+ "-target armv6m-none-none-eabi \
44+ -enable-experimental-feature Embedded \
45+ -wmo \
46+ -Xfrontend -function-sections"
4347)
4448# Disable CMake’s automatic Swift compiler check. The compiler check always
4549# fails for Embedded Swift because it tries to compile a Swift program that
@@ -62,7 +66,6 @@ endif()
6266
6367add_executable (SwiftPico
6468 main.c
65- swift-shims.c
6669)
6770
6871add_subdirectory (SwiftLib)
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments