summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/test/make/Makefile.rules20
1 files changed, 15 insertions, 5 deletions
diff --git a/lldb/test/make/Makefile.rules b/lldb/test/make/Makefile.rules
index 91bb6eaac44..efad0ec8034 100644
--- a/lldb/test/make/Makefile.rules
+++ b/lldb/test/make/Makefile.rules
@@ -30,8 +30,22 @@ THIS_FILE_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))/
LLDB_BASE_DIR := $(THIS_FILE_DIR)../../
#----------------------------------------------------------------------
-# If ARCH is not defined, default to x86_64.
# If OS is not defined, use 'uname -s' to determine the OS name.
+#
+# uname on Windows gives "windows32", but most environments standardize
+# on "Windows_NT", so we'll make it consistent here. When running
+# tests from Visual Studio, the environment variable isn't inherited
+# all the way down to the process spawned for make.
+#----------------------------------------------------------------------
+ifeq "$(OS)" ""
+ OS = $(shell uname -s)
+endif
+ifeq "$(OS)" "windows32"
+ OS = Windows_NT
+endif
+
+#----------------------------------------------------------------------
+# If ARCH is not defined, default to x86_64.
#----------------------------------------------------------------------
ifeq "$(ARCH)" ""
ifeq "$(OS)" "Windows_NT"
@@ -41,10 +55,6 @@ else
endif
endif
-ifeq "$(OS)" ""
- OS = $(shell uname -s)
-endif
-
#----------------------------------------------------------------------
# CC defaults to clang.
#
OpenPOWER on IntegriCloud