Skip to content

Commit e166267

Browse files
committed
remove
1 parent 5ccdb15 commit e166267

2 files changed

Lines changed: 7 additions & 21 deletions

File tree

swift/internal/extensions/swift_sdks.bzl

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -252,24 +252,7 @@ def static_linux_linkopts_from_args(
252252
if include_swiftrt:
253253
linkopts.append("{}/{}/swiftrt.o".format(linux_static_dir, arch))
254254
linkopts.append("-L{}".format(linux_static_dir))
255-
256-
linker_arg_expected = False
257-
for arg in args:
258-
if linker_arg_expected:
259-
if arg.startswith("-undefined=") and arg != "-undefined=":
260-
linkopts.append("-Wl,-u," + arg.removeprefix("-undefined="))
261-
else:
262-
linkopts.extend(["-Xlinker", arg])
263-
linker_arg_expected = False
264-
elif arg == "-Xlinker":
265-
linker_arg_expected = True
266-
else:
267-
linkopts.append(arg)
268-
269-
if linker_arg_expected:
270-
linkopts.append("-Xlinker")
271-
272-
return linkopts
255+
return linkopts + args
273256

274257
def _static_linux_linkopts_from_sdk(
275258
repository_ctx,

test/utils_tests.bzl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,12 @@ def _static_linux_linkopts_from_args_test(ctx):
254254
"-static",
255255
"-lswiftCore",
256256
"-lswift_RegexParser",
257-
"-Wl,-u,pthread_self",
258-
"-Wl,-u,pthread_once",
259-
"-Wl,-u,pthread_key_create",
257+
"-Xlinker",
258+
"-undefined=pthread_self",
259+
"-Xlinker",
260+
"-undefined=pthread_once",
261+
"-Xlinker",
262+
"-undefined=pthread_key_create",
260263
"-ldispatch",
261264
"-lBlocksRuntime",
262265
"-lpthread",

0 commit comments

Comments
 (0)