File tree Expand file tree Collapse file tree 4 files changed +18
-34
lines changed Expand file tree Collapse file tree 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)
240240 target_link_libraries (${name} PRIVATE ${LLVM_COMMON_LIBS} )
241241
242242 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 ()
254243 add_sourcekit_default_compiler_flags("${name} " )
255244endmacro ()
256245
Original file line number Diff line number Diff line change @@ -13,19 +13,17 @@ if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
1313 BlocksRuntime)
1414endif ()
1515
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" )
2021endif ()
21-
2222if (SWIFT_ANALYZE_CODE_COVERAGE)
2323 set_property (TARGET complete-test APPEND_STRING PROPERTY
2424 LINK_FLAGS " -fprofile-instr-generate -fcoverage-mapping" )
2525endif ()
2626
2727add_dependencies (tools complete-test )
2828swift_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()
1515target_link_libraries (sourcekitd-repl PRIVATE
1616 libedit)
1717
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" )
2223endif ()
2324if (SWIFT_ANALYZE_CODE_COVERAGE)
2425 set_property (TARGET sourcekitd-repl APPEND_STRING PROPERTY
@@ -27,6 +28,4 @@ endif()
2728
2829add_dependencies (tools sourcekitd-repl)
2930swift_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()
2525
2626add_dependencies (sourcekitd-test sourcekitdTestOptionsTableGen)
2727
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" )
3233endif ()
33-
3434if (SWIFT_ANALYZE_CODE_COVERAGE)
3535 set_property (TARGET sourcekitd-test APPEND_STRING PROPERTY
3636 LINK_FLAGS " -fprofile-instr-generate -fcoverage-mapping" )
3737endif ()
3838
3939add_dependencies (tools sourcekitd-test )
4040swift_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