Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions lldb/packages/Python/lldbsuite/test/lldbplatformutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,28 @@ def match_android_device(device_arch, valid_archs=None, valid_api_levels=None):


def finalize_build_dictionary(dictionary):
# Provide uname-like platform name
platform_name_to_uname = {
"linux": "Linux",
"netbsd": "NetBSD",
"freebsd": "FreeBSD",
"windows": "Windows_NT",
"macosx": "Darwin",
"darwin": "Darwin",
}

if dictionary is None:
dictionary = {}
if target_is_android():
if dictionary is None:
dictionary = {}
dictionary["OS"] = "Android"
dictionary["PIE"] = 1
elif platformIsDarwin():
dictionary["OS"] = "Darwin"
else:
dictionary["OS"] = platform_name_to_uname[getPlatform()]

dictionary["HOST_OS"] = platform_name_to_uname[getHostPlatform()]

return dictionary


Expand Down
5 changes: 4 additions & 1 deletion lldb/packages/Python/lldbsuite/test/make/Makefile.rules
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ LLDB_BASE_DIR := $(THIS_FILE_DIR)/../../../../../
# When running tests from Visual Studio, the environment variable isn't
# inherited all the way down to the process spawned for make.
#----------------------------------------------------------------------
HOST_OS := $(shell uname -s)
ifeq "$(HOST_OS)" ""
HOST_OS := $(shell uname -s)
endif

ifneq (,$(findstring windows32,$(HOST_OS)))
HOST_OS := Windows_NT
endif
Expand Down