File tree 4 files changed +18
-34
lines changed 4 files changed +18
-34
lines changed Original file line number Diff line number Diff line change @@ -240,17 +240,6 @@ macro(add_sourcekit_executable name)
240
240
target_link_libraries (${name} PRIVATE ${LLVM_COMMON_LIBS} )
241
241
242
242
set_target_properties (${name} PROPERTIES FOLDER "SourceKit executables" )
243
- if (NOT SWIFT_ASAN_BUILD)
244
- if ("${CMAKE_SYSTEM_NAME} " STREQUAL "Darwin" )
245
- set_target_properties (${name}
246
- PROPERTIES
247
- LINK_FLAGS "-Wl,-exported_symbol,_main" )
248
- endif ()
249
- if (SWIFT_ANALYZE_CODE_COVERAGE)
250
- set_property (TARGET "${name} " APPEND_STRING PROPERTY
251
- LINK_FLAGS " -fprofile-instr-generate -fcoverage-mapping" )
252
- endif ()
253
- endif ()
254
243
add_sourcekit_default_compiler_flags("${name} " )
255
244
endmacro ()
256
245
Original file line number Diff line number Diff line change @@ -13,19 +13,17 @@ if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
13
13
BlocksRuntime)
14
14
endif ()
15
15
16
- if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" )
17
- set_target_properties (complete-test
18
- PROPERTIES
19
- LINK_FLAGS "-Wl,-rpath -Wl,@executable_path/../lib" )
16
+ if (CMAKE_SYSTEM_NAME STREQUAL Darwin)
17
+ set_target_properties (complete-test PROPERTIES
18
+ INSTALL_RPATH "@executable_path/../lib" )
19
+ target_link_options (complete-test PRIVATE
20
+ "LINKER:-exported_symbol,_main" )
20
21
endif ()
21
-
22
22
if (SWIFT_ANALYZE_CODE_COVERAGE)
23
23
set_property (TARGET complete-test APPEND_STRING PROPERTY
24
24
LINK_FLAGS " -fprofile-instr-generate -fcoverage-mapping" )
25
25
endif ()
26
26
27
27
add_dependencies (tools complete-test )
28
28
swift_install_in_component(TARGETS complete-test
29
- RUNTIME
30
- DESTINATION bin
31
- COMPONENT tools)
29
+ RUNTIME DESTINATION bin COMPONENT tools)
Original file line number Diff line number Diff line change @@ -15,10 +15,11 @@ endif()
15
15
target_link_libraries (sourcekitd-repl PRIVATE
16
16
libedit)
17
17
18
- if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" )
19
- set_target_properties (sourcekitd-repl
20
- PROPERTIES
21
- LINK_FLAGS "-Wl,-rpath -Wl,@executable_path/../lib" )
18
+ if (CMAKE_SYSTEM_NAME STREQUAL Darwin)
19
+ set_target_properties (sourcekitd-repl PROPERTIES
20
+ INSTALL_RPATH "@executable_path/../lib" )
21
+ target_link_options (sourcekitd-repl PRIVATE
22
+ "LINKER:-exported_symbol,_main" )
22
23
endif ()
23
24
if (SWIFT_ANALYZE_CODE_COVERAGE)
24
25
set_property (TARGET sourcekitd-repl APPEND_STRING PROPERTY
@@ -27,6 +28,4 @@ endif()
27
28
28
29
add_dependencies (tools sourcekitd-repl)
29
30
swift_install_in_component(TARGETS sourcekitd-repl
30
- RUNTIME
31
- DESTINATION bin
32
- COMPONENT tools)
31
+ RUNTIME DESTINATION bin COMPONENT tools)
Original file line number Diff line number Diff line change @@ -25,19 +25,17 @@ endif()
25
25
26
26
add_dependencies (sourcekitd-test sourcekitdTestOptionsTableGen)
27
27
28
- if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" )
29
- set_target_properties (sourcekitd-test
30
- PROPERTIES
31
- LINK_FLAGS "-Wl,-rpath -Wl,@executable_path/../lib" )
28
+ if (CMAKE_SYSTEM_NAME STREQUAL Darwin)
29
+ set_target_properties (sourcekitd-test PROPERTIES
30
+ INSTALL_RPATH "@executable_path/../lib" )
31
+ target_link_options (sourcekitd-test PRIVATE
32
+ "LINKER:-exported_symbol,_main" )
32
33
endif ()
33
-
34
34
if (SWIFT_ANALYZE_CODE_COVERAGE)
35
35
set_property (TARGET sourcekitd-test APPEND_STRING PROPERTY
36
36
LINK_FLAGS " -fprofile-instr-generate -fcoverage-mapping" )
37
37
endif ()
38
38
39
39
add_dependencies (tools sourcekitd-test )
40
40
swift_install_in_component(TARGETS sourcekitd-test
41
- RUNTIME
42
- DESTINATION bin
43
- COMPONENT tools)
41
+ RUNTIME DESTINATION bin COMPONENT tools)
You can’t perform that action at this time.
0 commit comments