diff --git a/Makefile b/Makefile index 5138766f5f..7f05a84d73 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,11 @@ environment ?= .env include $(environment) export $(shell sed 's/=.*//' $(environment)) +# Uses the DocC executable from Xcode's default toolchain, as some Swift toolchains (e.g. 6.4.0) ship an x86_64-only one. +DOCC_EXEC ?= $(shell xcrun --toolchain com.apple.dt.toolchain.XcodeDefault --find docc 2>/dev/null) + +export DOCC_EXEC + # LIBRARY lib-build: ## Builds the library