Index: lldb/packages/Python/lldbsuite/test/make/Makefile.rules =================================================================== --- lldb/packages/Python/lldbsuite/test/make/Makefile.rules +++ lldb/packages/Python/lldbsuite/test/make/Makefile.rules @@ -140,7 +140,10 @@ SDKROOT := $(shell xcrun --sdk $(SDK_NAME) --show-sdk-path) endif ifeq "$(TRIPLE_VERSION)" "" - TRIPLE_VERSION := $(shell echo $(notdir $(SDKROOT)) | grep -E -o -e '[0-9]+\.[0-9]') + ifeq "$(SDK_NAME)" "" + $(error "SDK_NAME is empty") + endif + TRIPLE_VERSION := $(shell xcrun --sdk $(SDK_NAME) --show-sdk-version) endif ifeq "$(TRIPLE_ENV)" "simulator" ARCH_CFLAGS := -m$(TRIPLE_OS)-simulator-version-min=$(TRIPLE_VERSION)