diff --git a/Makefile.config b/Makefile.config index a119be7d2..3613a3c7e 100644 --- a/Makefile.config +++ b/Makefile.config @@ -110,6 +110,9 @@ CLANG_DEPS_NO_MODELS = $(INFER_BIN) CLANG_DEPS = $(CLANG_DEPS_NO_MODELS) $(MODELS_RESULTS_FILE) XCODE_ISYSROOT_SUFFIX = Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk +ifeq ($(wildcard $(XCODE_BASE)/$(XCODE_ISYSROOT_SUFFIX)),) + XCODE_ISYSROOT_SUFFIX = SDKs/MacOSX.sdk +endif ifeq ($(HAS_OBJC),yes) XCODE_ISYSROOT = $(XCODE_BASE)/$(XCODE_ISYSROOT_SUFFIX) diff --git a/facebook-clang-plugins/Makefile.config b/facebook-clang-plugins/Makefile.config index 8e9902988..b75513707 100644 --- a/facebook-clang-plugins/Makefile.config +++ b/facebook-clang-plugins/Makefile.config @@ -41,6 +41,9 @@ OCAML_CPP?=$(LOCAL_CLANG) -cc1 -E -P -x c -main-file-name - -o - # Which SDK to use (if any) SDKPATH?=$(shell ls -d "`xcode-select --print-path 2> /dev/null`"/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator*.sdk 2> /dev/null | sort -r | head -n 1 || true) +ifeq ($SDKPATH,) + SDKPATH?=$(shell ls -d "`xcode-select --print-path 2> /dev/null`"/SDKs/MacOSX.sdk 2> /dev/null | sort -r | head -n 1 || true) +endif ifeq ($(SDKPATH),) HAS_OBJC=no