From 2b4b32e073475b18593f82dfad37a727ba273a5b Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Thu, 25 Jul 2019 09:59:52 -0700 Subject: [PATCH] test: only pass `-sdk` on Darwin targets On non-Darwin targets, the `-sdk` parameter may or may not contain the sysroot which is needed to enable the use of `-sdk` to allow cross-compilation. This SDK contains the swift modules and the swift runtime registrar. Setting the SDKROOT to `/` on Linux requires that the Swift SDK contents are installed to `/`. --- packages/Python/lldbsuite/test/make/Makefile.rules | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/Python/lldbsuite/test/make/Makefile.rules b/packages/Python/lldbsuite/test/make/Makefile.rules index f2e285d863f7..f3d02b431610 100644 --- a/packages/Python/lldbsuite/test/make/Makefile.rules +++ b/packages/Python/lldbsuite/test/make/Makefile.rules @@ -538,7 +538,9 @@ ifeq "$(USESWIFTDRIVER)" "1" ifneq "$(TRIPLE)" "" SWIFTFLAGS += -target $(TRIPLE) endif - SWIFTFLAGS += -sdk "$(SWIFTSDKROOT)" + ifeq "$(OS)" "Darwin" + SWIFTFLAGS += -sdk "$(SWIFTSDKROOT)" + endif endif #----------------------------------------------------------------------