File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -126,6 +126,12 @@ add_custom_target(jazzerjs_libafl_runtime ALL DEPENDS ${RUST_STATICLIB_PATH})
126126add_dependencies (${PROJECT_NAME } jazzerjs_libafl_runtime )
127127target_link_libraries (${PROJECT_NAME } ${RUST_STATICLIB_PATH} )
128128
129+ if (CMAKE_SYSTEM_NAME STREQUAL "Windows" )
130+ # Rust staticlibs do not propagate Windows import libraries to the final
131+ # Node addon target, so link the system APIs used by Rust std explicitly.
132+ target_link_libraries (${PROJECT_NAME } ntdll ws2_32 userenv )
133+ endif ()
134+
129135# We're not sure why but sometimes systems don't end up setting LLVM_TARGET_TRIPLE used in llvm's cmake to eventually
130136# set COMPILER_RT_DEFAULT_TARGET which is necessary for compiler-rt to build
131137# So this will either take it from an envvar or try to set it to a sane value until we can figure out why it's broken
You can’t perform that action at this time.
0 commit comments