@@ -28,6 +28,8 @@ target_include_directories (ch
2828 ../ChakraCore
2929 ../../lib/Common
3030 ../../lib/Jsrt
31+ ../../lib/Runtime
32+ ../../lib/Parser
3133 )
3234
3335set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fPIE" )
@@ -38,73 +40,40 @@ endif()
3840
3941if (STATIC_LIBRARY)
4042 if (CMAKE_SYSTEM_NAME STREQUAL Linux )
41- set (lib_target
42- -Wl,--no -undefined
43- -Wl,--start-group
44- -Wl,--whole-archive
45- Chakra.Jsrt
46- Chakra.Jsrt.Core
47- -Wl,--no -whole-archive
48- Chakra.Pal
49- )
50- elseif (CMAKE_SYSTEM_NAME STREQUAL Darwin)
51- set (lib_target
52- -Wl,-undefined,error
53- Chakra.Jsrt
54- Chakra.Jsrt.Core
55- Chakra.Pal
56- )
57- else ()
58- message ("This platform is not yet supported" )
59- endif () # Linux ?
60-
61- # make sure to include Common.Core before others
62- # this will help linker on some platforms for correct
63- # initialization order
64- set (lib_target "${lib_target} "
65- Chakra.Common.Core
66- )
43+ set (LINKER_START_GROUP -Wl,--start-group)
44+ set (LINKER_END_GROUP -Wl,--end-group)
45+ endif ()
6746
6847 # common link deps
6948 set (lib_target "${lib_target} "
70- Chakra.Runtime.Types
71- Chakra.Runtime.Math
72- Chakra.Runtime.Library
73- Chakra.Runtime.Language
74- Chakra.Runtime.Debug
75- Chakra.Runtime.ByteCode
76- Chakra.Runtime.PlatformAgnostic
77- Chakra.Runtime.Base
78- Chakra.Parser
79- Chakra.Common.Util
80- Chakra.Common.Memory
81- Chakra.Common.Common
82- Chakra.Common.DataStructures
83- Chakra.Common.Exceptions
84- Chakra.Common.Codex
85- )
49+ -Wl,-undefined,error
50+ ${LINKER_START_GROUP}
51+ Chakra.Pal
52+ Chakra.Common.Core
53+ Chakra.Jsrt
54+ ${LINKER_END_GROUP}
55+ pthread
56+ stdc++
57+ dl
58+ )
8659
87- if (CMAKE_SYSTEM_NAME STREQUAL Linux )
88- set (lib_target "${lib_target} "
89- -Wl,--end-group
90- pthread
91- stdc++
92- dl
93- icuuc
94- )
95- elseif (CMAKE_SYSTEM_NAME STREQUAL Darwin)
96- set (lib_target "${lib_target} "
97- pthread
98- stdc++
99- dl
100- icucore
101- )
102- endif () # Linux ?
60+ if (CMAKE_SYSTEM_NAME STREQUAL Linux )
61+ set (lib_target "${lib_target} "
62+ icuuc
63+ unwind-x86_64
64+ )
65+ elseif (CMAKE_SYSTEM_NAME STREQUAL Darwin)
66+ set (lib_target "${lib_target} "
67+ icucore
68+ "-framework CoreFoundation"
69+ "-framework Security"
70+ )
71+ endif () # Linux ?
10372else () # // !from shared library
10473 set (lib_target
10574 PRIVATE Chakra.Pal
106- PRIVATE Chakra.Common.Codex
107- PRIVATE Chakra.Runtime.PlatformAgnostic
75+ PRIVATE Chakra.Common.Codex.Singular
76+ PRIVATE Chakra.Runtime.PlatformAgnostic.Singular
10877 )
10978endif ()
11079
0 commit comments