Skip to content

Commit 03ae072

Browse files
committed
[CMAKE] use single group for all libraries
1 parent c41bc91 commit 03ae072

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/arduino.cc/builder/create_cmake_rule.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ func (s *ExportProjectCMake) Run(ctx *types.Context) error {
194194

195195
// Compile and link project
196196
cmakelist += "add_executable (" + projectName + " ${SOURCES} ${SOURCES_LIBS})\n"
197-
cmakelist += "target_link_libraries( " + projectName + " -Wl,--as-needed " + strings.Join(libs, " ") + ")\n"
197+
cmakelist += "target_link_libraries( " + projectName + " -Wl,--as-needed -Wl,--start-group " + strings.Join(libs, " ") + " -Wl,--end-group)\n"
198198

199199
utils.WriteFile(cmakeFile, cmakelist)
200200

0 commit comments

Comments
 (0)