Author: Jason Molenda
Date: 2019-12-10T18:48:40-08:00
New Revision: af3aac9a227eaf38b625137b7337365b32404068

URL: 
https://github.com/llvm/llvm-project/commit/af3aac9a227eaf38b625137b7337365b32404068
DIFF: 
https://github.com/llvm/llvm-project/commit/af3aac9a227eaf38b625137b7337365b32404068.diff

LOG: Change the mtc Makefile to check $SDKROOT value instead
of depending on it being set in the environment.  Fred's change
from October assumed that SDKROOT was set in the environment
so that 'xcrun --show-sdk-path' would print the path.  If it
was passed in as a Makefile variable, it wouldn't be set in
the environment and xcrun --show-sdk-path would always show the
macOS SDK path.  When running the lldb testsuite against an ios
device via lit, this seems to be the case.

Added: 
    

Modified: 
    lldb/packages/Python/lldbsuite/test/functionalities/mtc/simple/Makefile

Removed: 
    


################################################################################
diff  --git 
a/lldb/packages/Python/lldbsuite/test/functionalities/mtc/simple/Makefile 
b/lldb/packages/Python/lldbsuite/test/functionalities/mtc/simple/Makefile
index 1b231a5958d2..f27f57aeebf3 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/mtc/simple/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/mtc/simple/Makefile
@@ -1,9 +1,14 @@
 OBJC_SOURCES := main.m
-ifeq ($(findstring MacOSX.platform,$(shell xcrun 
--show-sdk-path)),MacOSX.platform)
 UI_FRAMEWORK = AppKit
-else
-UI_FRAMEWORK = UIKit
+
+ifneq ("$(SDKROOT)", "")
+       ifeq (,$(findstring macOS,$(SDKROOT)))
+               ifeq (,$(findstring MacOS,$(SDKROOT)))
+                       UI_FRAMEWORK = UIKit
+               endif
+       endif
 endif
+
 LD_EXTRAS = -lobjc -framework Foundation -framework $(UI_FRAMEWORK)
 
 include Makefile.rules


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to