@@ -80,22 +80,8 @@ add_custom_command_target(unused_var
80
80
"${clang_headers_location} "
81
81
"${SWIFTLIB_DIR} /clang"
82
82
83
- # Create a broken symlink that points to '../clang/$VERSION'. It is not
84
- # used when running Swift tools from the build tree directly, but we will
85
- # install it in such a way that it points to Clang installation. If the
86
- # link can be resolved, CMake would try to follow it when installing the
87
- # project under certain conditions.
88
- COMMAND
89
- "${CMAKE_COMMAND} " "-E" "make_directory" "${SWIFTLIB_DIR} /install-tmp/install-tmp"
90
- COMMAND
91
- "${CMAKE_COMMAND} " "-E" "remove"
92
- "${SWIFTLIB_DIR} /install-tmp/install-tmp/clang"
93
- COMMAND
94
- "${CMAKE_COMMAND} " "-E" "create_symlink"
95
- "../clang/${CLANG_VERSION} "
96
- "${SWIFTLIB_DIR} /install-tmp/install-tmp/clang"
97
83
CUSTOM_TARGET_NAME "symlink_clang_headers"
98
- OUTPUT "${SWIFTLIB_DIR} /clang" " ${SWIFTLIB_DIR} /install-tmp/install-tmp/clang"
84
+ OUTPUT "${SWIFTLIB_DIR} /clang"
99
85
COMMENT "Symlinking Clang resource headers into ${SWIFTLIB_DIR} /clang" )
100
86
add_dependencies (copy_shim_headers symlink_clang_headers )
101
87
@@ -110,10 +96,10 @@ swift_install_in_component(clang-builtin-headers
110
96
DESTINATION "lib/swift/clang"
111
97
PATTERN "*.h" )
112
98
113
- # Alternatively, install a symbolic link to the Clang resource directory.
114
- swift_install_in_component ( clang-resource-dir-symlink
115
- DIRECTORY " ${CMAKE_BINARY_DIR} / ${CMAKE_CFG_INTDIR} /lib/swift/install-tmp/install-tmp/clang"
116
- DESTINATION "lib/swift" )
99
+ swift_install_symlink_component ( clang- resource-dir-symlink
100
+ LINK_NAME clang
101
+ TARGET ../clang/${CLANG_VERSION}
102
+ DESTINATION "lib/swift" )
117
103
118
104
# Possibly install Clang headers under Clang's resource directory in case we
119
105
# need to use a different version of the headers than the installed Clang. This
0 commit comments