Skip to content

Commit

Permalink
Add base for supporting weak symbols on node loader.
Browse files Browse the repository at this point in the history
  • Loading branch information
viferga committed Feb 3, 2025
1 parent 1f48816 commit ab80538
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions source/loaders/node_loader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,6 @@ target_link_libraries(${target}
PRIVATE
${META_PROJECT_NAME}::metacall # MetaCall library

# TODO: Implement workaround to the problem: "PE32 file format does not support weak linkage"
# $<$<BOOL:${WIN32}>:${NodeJS_LIBRARY}> # NodeJS library

PUBLIC
${DEFAULT_LIBRARIES}

Expand Down Expand Up @@ -200,8 +197,10 @@ target_compile_options(${target}

add_link_options(${target}
PRIVATE
# TODO: MacOS
# $<$<BOOL:${APPLE}>:-Wl,-undefined=dynamic_lookup>
$<$<CXX_COMPILER_ID:MSVC>:/IGNORE:4199>
$<$<CXX_COMPILER_ID:MSVC>:/DELAYLOAD:${NodeJS_LIBRARY_NAME}>
$<$<CXX_COMPILER_ID:MSVC>:/DELAYLOAD:${NodeJS_LIBRARY_NAME}>
$<$<AND:$<BOOL:${APPLE}>,$<CXX_COMPILER_ID:AppleClang,Clang>>:-undefined dynamic_lookup>

PUBLIC
${DEFAULT_LINKER_OPTIONS}
Expand Down

0 comments on commit ab80538

Please sign in to comment.