From 5416cb4badba05eeecfdca8a855bdd5a579efc50 Mon Sep 17 00:00:00 2001 From: Evan Wilde Date: Mon, 13 May 2024 14:32:38 -0700 Subject: [PATCH] Set Swift clang-linker path The swift driver is picking up the system clang instead of using the clang set in `CC`. The system clang is attempting to use bfd to link Swift, which doesn't work due to Swift's protected symbol usage. Set the swift-driver tool directory based on the location of the clang in use to ensure that we're picking up a consistent set of tools across all of the tests. (cherry picked from commit 2c8a5e60bb402c0a4d3b8e1950a6f005786cda40) --- lldb/packages/Python/lldbsuite/test/make/Makefile.rules | 1 + 1 file changed, 1 insertion(+) diff --git a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules index 8a8297d7919f1..75a9c4841d771 100644 --- a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules +++ b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules @@ -616,6 +616,7 @@ ifeq "$(USESWIFTDRIVER)" "1" ifeq "$(OS)" "Darwin" SWIFTFLAGS += -sdk "$(SWIFTSDKROOT)" endif + SWIFTFLAGS += -tools-directory "$(shell dirname $(CC))" endif #----------------------------------------------------------------------