Skip to content

Commit 0bbcd71

Browse files
committed
more cmake stuff to try
1 parent 450b6fb commit 0bbcd71

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

examples/models/voxtral/CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,11 @@ list(
8888
if(EXECUTORCH_BUILD_CUDA)
8989
find_package(CUDAToolkit REQUIRED)
9090
list(APPEND link_libraries aoti_cuda)
91-
# Handle both static library and shared library (.dll on Windows MSVC)
92-
executorch_target_link_options_shared_lib(aoti_cuda)
91+
# CMake will automatically use the import library on Windows
92+
if(NOT MSVC)
93+
# Only apply shared lib linking options on non-Windows platforms
94+
executorch_target_link_options_shared_lib(aoti_cuda)
95+
endif()
9396
endif()
9497

9598
if(EXECUTORCH_BUILD_METAL)
@@ -103,7 +106,7 @@ list(APPEND link_libraries tokenizers::tokenizers)
103106
add_executable(voxtral_runner ${_srcs})
104107
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
105108
target_link_options_gc_sections(voxtral_runner)
106-
if(NOT APPLE)
109+
if(NOT APPLE AND NOT MSVC)
107110
target_link_options(voxtral_runner PRIVATE "LINKER:-s")
108111
endif()
109112
endif()

0 commit comments

Comments
 (0)