Skip to content

Commit d5ba975

Browse files
kateinoigakukunrunner
authored andcommitted
[static-stdlib] Move static-executable-args.lnk under stdlib/public/Resources/linux
This is a preparatory change for adding a static executable support for WASI
1 parent 760b317 commit d5ba975

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

stdlib/public/runtime/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,18 +113,19 @@ set(sdk "${SWIFT_HOST_VARIANT_SDK}")
113113
if(SWIFT_BUILD_STATIC_STDLIB AND "${sdk}" STREQUAL "LINUX")
114114
set(static_binary_lnk_file_list)
115115
string(TOLOWER "${sdk}" lowercase_sdk)
116+
set(static_binary_lnk_src "${SWIFT_SOURCE_DIR}/stdlib/public/Resources/${lowercase_sdk}/static-executable-args.lnk")
116117

117118
# Generate the static-executable-args.lnk file used for ELF systems (eg linux)
118119
set(linkfile "${lowercase_sdk}/static-executable-args.lnk")
119120
add_custom_command_target(swift_static_binary_${sdk}_args
120121
COMMAND
121122
"${CMAKE_COMMAND}" -E copy
122-
"${SWIFT_SOURCE_DIR}/utils/static-executable-args.lnk"
123+
"${static_binary_lnk_src}"
123124
"${SWIFTSTATICLIB_DIR}/${linkfile}"
124125
OUTPUT
125126
"${SWIFTSTATICLIB_DIR}/${linkfile}"
126127
DEPENDS
127-
"${SWIFT_SOURCE_DIR}/utils/static-executable-args.lnk")
128+
"${static_binary_lnk_src}")
128129

129130
list(APPEND static_binary_lnk_file_list ${swift_static_binary_${sdk}_args})
130131
swift_install_in_component(FILES "${SWIFTSTATICLIB_DIR}/${linkfile}"

0 commit comments

Comments
 (0)