We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c753b49 commit 2a5c188Copy full SHA for 2a5c188
nrfx-blink-sdk/CMakeLists.txt
@@ -34,7 +34,10 @@ add_compile_options(
34
35
target_sources(app PRIVATE Stubs.c)
36
37
-add_library(app_swift STATIC Main.swift)
+# The Swift code providing "main" needs to be in an OBJECT library (instead of STATIC library) to make sure it actually gets linker.
38
+# A STATIC library would get dropped from linking because Zephyr provides a default weak empty main definition.
39
+add_library(app_swift OBJECT Main.swift)
40
+
41
add_dependencies(app_swift syscall_list_h_target)
42
target_compile_options(app_swift PRIVATE
43
-parse-as-library
0 commit comments