diff options
author | Adrian Prantl <aprantl@apple.com> | 2019-03-11 17:24:10 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2019-03-11 17:24:10 +0000 |
commit | 5cc2790410b53a38cdcf544a5b9c5de0c41141da (patch) | |
tree | 565e234f4418c445748ae10273442531a9b13441 /lldb/packages/Python/lldbsuite | |
parent | 90819cdb1b611bc11cefeb6ad03a121979a9e1b9 (diff) | |
download | bcm5719-llvm-5cc2790410b53a38cdcf544a5b9c5de0c41141da.tar.gz bcm5719-llvm-5cc2790410b53a38cdcf544a5b9c5de0c41141da.zip |
Makefile.rules: Upstream SDKROOT handling code for Darwin.
llvm-svn: 355843
Diffstat (limited to 'lldb/packages/Python/lldbsuite')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/make/Makefile.rules | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules index bee67ed0341..fc72bceb195 100644 --- a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules +++ b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules @@ -167,6 +167,17 @@ ifeq "$(CC)" "cc" endif #---------------------------------------------------------------------- +# Handle SDKROOT on Darwin +#---------------------------------------------------------------------- + +ifeq "$(OS)" "Darwin" + ifeq "$(SDKROOT)" "" + # We haven't otherwise set the SDKROOT, so set it now to macosx + SDKROOT := $(shell xcrun --sdk macosx --show-sdk-path) + endif +endif + +#---------------------------------------------------------------------- # ARCHFLAG is the flag used to tell the compiler which architecture # to compile for. The default is the flag that clang accepts. #---------------------------------------------------------------------- @@ -248,6 +259,13 @@ endif DEBUG_INFO_FLAG ?= -g CFLAGS ?= $(DEBUG_INFO_FLAG) -O0 -fno-builtin + +ifeq "$(OS)" "Darwin" + ifneq "$(SDKROOT)" "" + CFLAGS += -isysroot "$(SDKROOT)" + endif +endif + ifeq "$(OS)" "Darwin" CFLAGS += $(ARCHFLAG) $(ARCH) $(FRAMEWORK_INCLUDES) -I$(LLDB_BASE_DIR)include else |