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 @@ -245,17 +245,6 @@ macro(add_sourcekit_executable name)
245
245
target_link_libraries (${name} PRIVATE ${LLVM_COMMON_LIBS} )
246
246
247
247
set_target_properties (${name} PROPERTIES FOLDER "SourceKit executables" )
248
- if (NOT SWIFT_ASAN_BUILD )
249
- if ("${CMAKE_SYSTEM_NAME} " STREQUAL "Darwin" )
250
- set_target_properties (${name}
251
- PROPERTIES
252
- LINK_FLAGS "-Wl,-exported_symbol,_main" )
253
- endif ()
254
- if (SWIFT_ANALYZE_CODE_COVERAGE )
255
- set_property (TARGET "${name} " APPEND_STRING PROPERTY
256
- LINK_FLAGS " -fprofile-instr-generate -fcoverage-mapping" )
257
- endif ()
258
- endif ()
259
248
add_sourcekit_default_compiler_flags ("${name} " )
260
249
endmacro ()
261
250
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 @@ -17,10 +17,11 @@ target_include_directories(sourcekitd-repl PRIVATE
17
17
target_link_libraries (sourcekitd-repl PRIVATE
18
18
${LibEdit_LIBRARIES} )
19
19
20
- if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" )
21
- set_target_properties (sourcekitd-repl
22
- PROPERTIES
23
- LINK_FLAGS "-Wl,-rpath -Wl,@executable_path/../lib" )
20
+ if (CMAKE_SYSTEM_NAME STREQUAL Darwin )
21
+ set_target_properties (sourcekitd-repl PROPERTIES
22
+ INSTALL_RPATH "@executable_path/../lib" )
23
+ target_link_options (sourcekitd-repl PRIVATE
24
+ "LINKER:-exported_symbol,_main" )
24
25
endif ()
25
26
if (SWIFT_ANALYZE_CODE_COVERAGE )
26
27
set_property (TARGET sourcekitd-repl APPEND_STRING PROPERTY
@@ -29,6 +30,4 @@ endif()
29
30
30
31
add_dependencies (tools sourcekitd-repl )
31
32
swift_install_in_component (TARGETS sourcekitd-repl
32
- RUNTIME
33
- DESTINATION bin
34
- COMPONENT tools )
33
+ 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