File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
clang/unittests/Interpreter Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,11 @@ add_distinct_clang_unittest(ClangReplInterpreterTests
4949 )
5050
5151if (EMSCRIPTEN)
52+ # Without the above you try to link to LLVMSupport twice, and end
53+ # up with a duplicate symbol error when creating the main module
54+ get_target_property (LINKED_LIBS ClangReplInterpreterTests LINK_LIBRARIES )
55+ list (REMOVE_ITEM LINKED_LIBS LLVMSupport)
56+ set_target_properties (ClangReplInterpreterTests PROPERTIES LINK_LIBRARIES "${LINKED_LIBS} " )
5257target_link_options (ClangReplInterpreterTests
5358 PUBLIC "SHELL: -s MAIN_MODULE=1"
5459 PUBLIC "SHELL: -s ALLOW_MEMORY_GROWTH=1"
Original file line number Diff line number Diff line change @@ -1764,9 +1764,7 @@ function(add_unittest test_suite test_name)
17641764 set (LLVM_REQUIRES_RTTI OFF )
17651765 endif ()
17661766
1767- if (NOT EMSCRIPTEN)
1768- list (APPEND LLVM_LINK_COMPONENTS Support) # gtest needs it for raw_ostream
1769- endif ()
1767+ list (APPEND LLVM_LINK_COMPONENTS Support) # gtest needs it for raw_ostream
17701768 add_llvm_executable(${test_name} IGNORE_EXTERNALIZE_DEBUGINFO NO_INSTALL_RPATH ${ARGN} )
17711769 get_subproject_title(subproject_title)
17721770 set_target_properties (${test_name} PROPERTIES FOLDER "${subproject_title} /Tests/Unit" )
You can’t perform that action at this time.
0 commit comments