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 ac93afb commit b16e887Copy full SHA for b16e887
test/cmake/whole_archive/CMakeLists.txt
@@ -2,6 +2,6 @@ cmake_minimum_required(VERSION 3.24)
2
3
project(whole)
4
5
-add_library(whole_lib STATIC lib.cpp)
6
-add_executable(whole main.cpp)
+add_library(whole_lib STATIC lib.c)
+add_executable(whole main.c)
7
target_link_libraries(whole $<LINK_LIBRARY:WHOLE_ARCHIVE,whole_lib>)
test/cmake/whole_archive/lib.c
@@ -0,0 +1,5 @@
1
+#include <stdio.h>
+
+__attribute__((constructor)) void init(void) {
+ printf("init\n");
+}
test/cmake/whole_archive/lib.cpp
test/cmake/whole_archive/main.c
+int main() {
+ printf("main\n");
test/cmake/whole_archive/main.cpp
0 commit comments