Skip to content

Commit 046d8f2

Browse files
committed
Remove libc from lib linkage
1 parent 3fec88e commit 046d8f2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

dinorunner/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,13 @@ else()
2020
endif()
2121

2222
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
23+
SET(CMAKE_C_STANDARD_LIBRARIES "")
24+
SET(CMAKE_C_STANDARD_LIBRARIES_INIT "")
2325
SET(CMAKE_CXX_STANDARD_LIBRARIES "")
2426
SET(CMAKE_CXX_STANDARD_LIBRARIES_INIT "")
2527
SET(CMAKE_BUILD_TYPE "Release")
28+
set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "")
29+
set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "")
2630
set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "")
2731
set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "")
2832
set(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR}/dinorunner
@@ -40,6 +44,8 @@ add_library(dinorunner_shared SHARED ${DINORUNNER_CORE_FILES})
4044
add_library(dinorunner_static STATIC ${DINORUNNER_CORE_FILES})
4145
target_include_directories(dinorunner_shared PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>)
4246
target_include_directories(dinorunner_static PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>)
47+
target_link_options(dinorunner_shared PUBLIC "-nostdlib")
48+
target_link_options(dinorunner_static PUBLIC "-nostdlib")
4349

4450
set_target_properties(dinorunner_shared
4551
PROPERTIES OUTPUT_NAME dinorunner

0 commit comments

Comments
 (0)