Skip to content

Commit 56e3760

Browse files
author
Krzysztof Parzyszek
authored
Don't use alternative linker for static libraries (#10870)
Otherwise we may end up with things like this (make VERBOSE=1): /usr/bin/ar qc libtvm_runtime.a -fuse-ld=lld CMakeFiles/tvm_runtime_ob... /usr/bin/ar: invalid option -- 'e' Usage: /usr/bin/ar [emulation options] [-]{dmpqrstx}[abcDfilMNoPsSTuvV]... /usr/bin/ar -M [<mri-script] ...
1 parent c663aba commit 56e3760

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

cmake/utils/Linker.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ function(find_and_set_linker use_alternative_linker)
2929

3030
macro(add_to_linker_flags flag)
3131
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${flag}" PARENT_SCOPE)
32-
set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} ${flag}" PARENT_SCOPE)
3332
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${flag}" PARENT_SCOPE)
3433
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${flag}" PARENT_SCOPE)
3534
message(STATUS "Added \"${flag}\" to linker flags " ${CMAKE_SHARED_LINKER_FLAGS})

0 commit comments

Comments
 (0)