2014-01-07 11:57:25 +01:00
#------------------------------------------------------------------------------
# CLING - the C++ LLVM-based InterpreterG :)
#
# This file is dual-licensed: you can choose to license it under the University
# of Illinois Open Source License or the GNU Lesser General Public License. See
# LICENSE.TXT for details.
#------------------------------------------------------------------------------
2014-03-08 13:42:17 +01:00
# Keep symbols for JIT resolution
set ( LLVM_NO_DEAD_STRIP 1 )
2023-01-20 17:46:13 +02:00
set ( LLVM_LINK_COMPONENTS Support )
2016-07-21 18:29:10 -04:00
if ( BUILD_SHARED_LIBS )
set ( LIBS
2018-10-05 02:51:38 +02:00
2016-08-08 19:02:10 -04:00
c l a n g F r o n t e n d T o o l
2018-10-05 02:51:38 +02:00
2016-07-21 18:29:10 -04:00
c l i n g I n t e r p r e t e r
c l i n g M e t a P r o c e s s o r
c l i n g U s e r I n t e r f a c e
c l i n g U t i l s
2016-07-21 11:42:47 +02:00
)
2016-07-21 18:29:10 -04:00
add_cling_executable ( cling
c l i n g . c p p
)
else ( )
set ( LIBS
2018-10-05 02:51:38 +02:00
c l a n g A S T M a t c h e r s
2016-08-08 19:02:10 -04:00
c l a n g F r o n t e n d T o o l
2018-10-05 02:51:38 +02:00
2016-07-21 18:29:10 -04:00
c l i n g U s e r I n t e r f a c e
)
add_cling_executable ( cling
c l i n g . c p p
$ < T A R G E T _ O B J E C T S : o b j . c l i n g I n t e r p r e t e r >
$ < T A R G E T _ O B J E C T S : o b j . c l i n g M e t a P r o c e s s o r >
$ < T A R G E T _ O B J E C T S : o b j . c l i n g U t i l s >
)
endif ( BUILD_SHARED_LIBS )
2012-09-05 09:37:39 +00:00
2014-03-08 18:39:48 +01:00
set_target_properties ( cling
P R O P E R T I E S E N A B L E _ E X P O R T S 1 )
2016-07-21 11:42:47 +02:00
if ( MSVC )
2017-02-14 17:41:04 -05:00
set_target_properties ( cling PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS 1 )
# RTTI/C++ symbols
set ( cling_exports ${ cling_exports } ??_7type_info@@6B@
? _ _ t y p e _ i n f o _ r o o t _ n o d e @ @ 3 U _ _ t y p e _ i n f o _ n o d e @ @ A
? n o t h r o w @ s t d @ @ 3 U n o t h r o w _ t @ 1 @ B
)
# Compiler added symbols for static variables. NOT for VStudio < 2015
set ( cling_exports ${ cling_exports } _Init_thread_abort _Init_thread_epoch
_ I n i t _ t h r e a d _ f o o t e r _ I n i t _ t h r e a d _ h e a d e r _ t l s _ i n d e x
)
2022-10-25 01:22:15 +02:00
if ( CMAKE_SIZEOF_VOID_P EQUAL 8 )
2022-02-15 11:01:42 +01:00
# new/delete variants needed when linking to static msvc runtime (esp. Debug)
set ( cling_exports ${ cling_exports }
? ? 2 @ Y A P E A X _ K @ Z
? ? 3 @ Y A X P E A X @ Z
? ? _ U @ Y A P E A X _ K @ Z
? ? _ V @ Y A X P E A X @ Z
? ? 3 @ Y A X P E A X _ K @ Z
2024-05-14 13:35:18 +02:00
? ? 2 @ Y A P E A X _ K A E B U n o t h r o w _ t @ s t d @ @ @ Z
? ? _ U @ Y A P E A X _ K A E B U n o t h r o w _ t @ s t d @ @ @ Z
2022-02-15 11:01:42 +01:00
? ? 6 ? $ b a s i c _ o s t r e a m @ D U ? $ c h a r _ t r a i t s @ D @ s t d @ @ @ s t d @ @ Q E A A A E A V 0 1 @ H @ Z
? ? 6 ? $ b a s i c _ o s t r e a m @ D U ? $ c h a r _ t r a i t s @ D @ s t d @ @ @ s t d @ @ Q E A A A E A V 0 1 @ M @ Z
? ? 6 ? $ b a s i c _ o s t r e a m @ D U ? $ c h a r _ t r a i t s @ D @ s t d @ @ @ s t d @ @ Q E A A A E A V 0 1 @ N @ Z
? ? 6 ? $ b a s i c _ o s t r e a m @ D U ? $ c h a r _ t r a i t s @ D @ s t d @ @ @ s t d @ @ Q E A A A E A V 0 1 @ P E B X @ Z
? ? 6 ? $ b a s i c _ o s t r e a m @ D U ? $ c h a r _ t r a i t s @ D @ s t d @ @ @ s t d @ @ Q E A A A E A V 0 1 @ P 6 A A E A V 0 1 @ A E A V 0 1 @ @ Z @ Z
? ? $ ? 6 U ? $ c h a r _ t r a i t s @ D @ s t d @ @ @ s t d @ @ Y A A E A V ? $ b a s i c _ o s t r e a m @ D U ? $ c h a r _ t r a i t s @ D @ s t d @ @ @ 0 @ A E A V 1 0 @ D @ Z
? ? $ ? 6 U ? $ c h a r _ t r a i t s @ D @ s t d @ @ @ s t d @ @ Y A A E A V ? $ b a s i c _ o s t r e a m @ D U ? $ c h a r _ t r a i t s @ D @ s t d @ @ @ 0 @ A E A V 1 0 @ P E B D @ Z
? _ F a c e t _ R e g i s t e r @ s t d @ @ Y A X P E A V _ F a c e t _ b a s e @ 1 @ @ Z
)
else ( )
2017-02-14 17:41:04 -05:00
set ( cling_exports ${ cling_exports }
2022-02-15 11:01:42 +01:00
? ? 2 @ Y A P A X I @ Z
? ? 3 @ Y A X P A X @ Z
? ? 3 @ Y A X P A X I @ Z
? ? _ U @ Y A P A X I @ Z
? ? _ V @ Y A X P A X @ Z
? ? _ V @ Y A X P A X I @ Z
2024-05-14 13:35:18 +02:00
? ? 2 @ Y A P A X I A B U n o t h r o w _ t @ s t d @ @ @ Z
? ? _ U @ Y A P A X I A B U n o t h r o w _ t @ s t d @ @ @ Z
2022-02-15 11:01:42 +01:00
? ? 6 ? $ b a s i c _ o s t r e a m @ D U ? $ c h a r _ t r a i t s @ D @ s t d @ @ @ s t d @ @ Q A E A A V 0 1 @ H @ Z
? ? 6 ? $ b a s i c _ o s t r e a m @ D U ? $ c h a r _ t r a i t s @ D @ s t d @ @ @ s t d @ @ Q A E A A V 0 1 @ M @ Z
? ? 6 ? $ b a s i c _ o s t r e a m @ D U ? $ c h a r _ t r a i t s @ D @ s t d @ @ @ s t d @ @ Q A E A A V 0 1 @ N @ Z
? ? 6 ? $ b a s i c _ o s t r e a m @ D U ? $ c h a r _ t r a i t s @ D @ s t d @ @ @ s t d @ @ Q A E A A V 0 1 @ P B X @ Z
? ? 6 ? $ b a s i c _ o s t r e a m @ D U ? $ c h a r _ t r a i t s @ D @ s t d @ @ @ s t d @ @ Q A E A A V 0 1 @ P 6 A A A V 0 1 @ A A V 0 1 @ @ Z @ Z
? ? $ ? 6 U ? $ c h a r _ t r a i t s @ D @ s t d @ @ @ s t d @ @ Y A A A V ? $ b a s i c _ o s t r e a m @ D U ? $ c h a r _ t r a i t s @ D @ s t d @ @ @ 0 @ A A V 1 0 @ D @ Z
? ? $ ? 6 U ? $ c h a r _ t r a i t s @ D @ s t d @ @ @ s t d @ @ Y A A A V ? $ b a s i c _ o s t r e a m @ D U ? $ c h a r _ t r a i t s @ D @ s t d @ @ @ 0 @ A A V 1 0 @ P B D @ Z
? _ F a c e t _ R e g i s t e r @ s t d @ @ Y A X P A V _ F a c e t _ b a s e @ 1 @ @ Z
2017-02-14 17:41:04 -05:00
)
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 cling APPEND_STRING PROPERTY LINK_FLAGS ${ cling_link_str } )
2016-07-21 11:42:47 +02:00
endif ( MSVC )
2020-04-15 11:54:41 +03:00
target_link_libraries ( cling PUBLIC ${ LIBS } )
2012-09-05 09:37:39 +00:00
install ( TARGETS cling
R U N T I M E D E S T I N A T I O N b i n )