Skip to content

Add support for Windows in the Jupyter kernel for Cling #19369

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
61 changes: 60 additions & 1 deletion interpreter/cling/tools/Jupyter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,66 @@ set_target_properties(libclingJupyter

if(MSVC)
set_target_properties(libclingJupyter PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS 1)
endif()

# RTTI/C++ symbols
set(cling_exports ${cling_exports} ??_7type_info@@6B@
?__type_info_root_node@@3U__type_info_node@@A
?nothrow@std@@3Unothrow_t@1@B
)

# Compiler added symbols for static variables. NOT for VStudio < 2015
set(cling_exports ${cling_exports} _Init_thread_abort _Init_thread_epoch
_Init_thread_footer _Init_thread_header _tls_index
)

if(CMAKE_SIZEOF_VOID_P EQUAL 8)
# new/delete variants needed when linking to static msvc runtime (esp. Debug)
set(cling_exports ${cling_exports}
??2@YAPEAX_K@Z
??3@YAXPEAX@Z
??_U@YAPEAX_K@Z
??_V@YAXPEAX@Z
??3@YAXPEAX_K@Z
??2@YAPEAX_KAEBUnothrow_t@std@@@Z
??_U@YAPEAX_KAEBUnothrow_t@std@@@Z
??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@H@Z
??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@M@Z
??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@N@Z
??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEBX@Z
??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z
??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@D@Z
??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBD@Z
?_Facet_Register@std@@YAXPEAV_Facet_base@1@@Z
)
else()
set(cling_exports ${cling_exports}
??2@YAPAXI@Z
??3@YAXPAX@Z
??3@YAXPAXI@Z
??_U@YAPAXI@Z
??_V@YAXPAX@Z
??_V@YAXPAXI@Z
??2@YAPAXIABUnothrow_t@std@@@Z
??_U@YAPAXIABUnothrow_t@std@@@Z
??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z
??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@M@Z
??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@N@Z
??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PBX@Z
??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z
??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@D@Z
??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z
?_Facet_Register@std@@YAXPAV_Facet_base@1@@Z
)
endif()

# List to '/EXPORT:sym0 /EXPORT:sym1 /EXPORT:sym2 ...'
foreach(sym ${cling_exports})
set(cling_link_str "${cling_link_str} /EXPORT:${sym}")
endforeach(sym ${cling_exports})

set_property(TARGET libclingJupyter APPEND_STRING PROPERTY LINK_FLAGS ${cling_link_str})

endif(MSVC)

if(ENABLE_SHARED)
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
Expand Down
Loading