2014-01-07 14:57:25 +04: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 16:42:17 +04:00
# Keep symbols for JIT resolution
set ( LLVM_NO_DEAD_STRIP 1 )
2016-07-22 01:29:10 +03:00
if ( BUILD_SHARED_LIBS )
set ( LIBS
L L V M S u p p o r t
2018-10-05 03:51:38 +03:00
2016-08-09 02:02:10 +03:00
c l a n g F r o n t e n d T o o l
2018-10-05 03:51:38 +03:00
2016-07-22 01:29:10 +03: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 12:42:47 +03:00
)
2016-07-22 01:29:10 +03:00
add_cling_executable ( cling
c l i n g . c p p
)
else ( )
set ( LIBS
L L V M S u p p o r t
2018-10-05 03:51:38 +03:00
c l a n g A S T M a t c h e r s
2016-08-09 02:02:10 +03:00
c l a n g F r o n t e n d T o o l
2018-10-05 03:51:38 +03:00
2016-07-22 01:29:10 +03: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 13:37:39 +04:00
2014-03-08 21:39:48 +04: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 12:42:47 +03:00
if ( MSVC )
2017-02-15 01:41:04 +03: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-02-15 13:01:42 +03:00
if ( "${CMAKE_GENERATOR_PLATFORM}" MATCHES "x64" )
# 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
? ? 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-15 01:41:04 +03:00
set ( cling_exports ${ cling_exports }
2022-02-15 13:01:42 +03: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
? ? 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-15 01:41:04 +03: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 12:42:47 +03:00
endif ( MSVC )
2020-04-15 11:54:41 +03:00
target_link_libraries ( cling PUBLIC ${ LIBS } )
2012-09-05 13:37:39 +04: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 )