From cc1f88a747729034ca4d2dd112f30bd2f332579c Mon Sep 17 00:00:00 2001 From: Josh Berdine Date: Mon, 24 Jun 2019 09:06:58 -0700 Subject: [PATCH] [sledge] Fix macos build of models Reviewed By: ngorogiannis Differential Revision: D15965940 fbshipit-source-id: a50882a70 --- sledge/model/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sledge/model/Makefile b/sledge/model/Makefile index 6302ccd5b..51fedef79 100644 --- a/sledge/model/Makefile +++ b/sledge/model/Makefile @@ -14,8 +14,13 @@ LLVM=$(ROOT)/llvm/_install/$(SWITCH) LIBCXXABI=$(ROOT)/llvm/projects/libcxxabi +PLATFORM=$(shell uname) +ifeq ($(PLATFORM),Linux) +CLANG_ARGS += --sysroot=/usr +endif + cxxabi.bc : cxxabi.cpp - $(LLVM)/bin/clang --sysroot=/usr $(CLANG_ARGS) -I$(LLVM)/include/c++/v1 -I$(LIBCXXABI)/include -I$(LIBCXXABI)/src -c -emit-llvm cxxabi.cpp + $(LLVM)/bin/clang $(CLANG_ARGS) -I$(LLVM)/include/c++/v1 -I$(LIBCXXABI)/include -I$(LIBCXXABI)/src -c -emit-llvm cxxabi.cpp lib_fuzzer_main.bc : lib_fuzzer_main.c $(LLVM)/bin/clang $(CLANG_ARGS) -c -emit-llvm -o $@ $<