https://github.com/dzhidzhoev created https://github.com/llvm/llvm-project/pull/96654
Makefile.rules uses HOST_OS and OS variables for determining host and target OSes for API tests compilation. When lldb's target is set to remote-linux, Makefile.rules script should be executed with the target OS variable set to Linux. This is useful for the case of Windows-to-Linux cross-testing. >From c1cb536d2dddd1c221d4e67ba66c68d7902aedd9 Mon Sep 17 00:00:00 2001 From: Vladislav Dzhidzhoev <vdzhidzh...@accesssoftek.com> Date: Wed, 19 Jun 2024 23:50:18 +0000 Subject: [PATCH] [lldb][test] Set target OS for API tests in case of remote testing Makefile.rules uses HOST_OS and OS variables for determining host and target OSes for API tests compilation. When lldb's target is set to remote-linux, Makefile.rules script should be executed with the target OS variable set to Linux. This is useful for the case of Windows-to-Linux cross-testing. --- lldb/packages/Python/lldbsuite/test/lldbplatformutil.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lldb/packages/Python/lldbsuite/test/lldbplatformutil.py b/lldb/packages/Python/lldbsuite/test/lldbplatformutil.py index 21f2095db90f8..c39d297a78f8f 100644 --- a/lldb/packages/Python/lldbsuite/test/lldbplatformutil.py +++ b/lldb/packages/Python/lldbsuite/test/lldbplatformutil.py @@ -56,6 +56,10 @@ def target_is_android(): return configuration.lldb_platform_name == "remote-android" +def target_is_remote_linux(): + return configuration.lldb_platform_name == "remote-linux" + + def android_device_api(): if not hasattr(android_device_api, "result"): assert configuration.lldb_platform_url is not None @@ -97,6 +101,9 @@ def finalize_build_dictionary(dictionary): dictionary = {} dictionary["OS"] = "Android" dictionary["PIE"] = 1 + elif target_is_remote_linux(): + dictionary = dictionary or {} + dictionary["OS"] = "Linux" return dictionary _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits