Skip to content

[LLDB][test] Drop OS/HOST_OS detection code from Makefile.rules #99535

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 18, 2024

Conversation

dzhidzhoev
Copy link
Member

Remove commands for OS/HOST_OS detection from Makefile.rules to simplify it, since logic for these variables has been implemented in lldb/packages/Python/lldbsuite/test/lldbplatformutil.py (7021e44).

Remove commands for OS/HOST_OS detection from Makefile.rules
to simplify it, since logic for these variables has been implemented in
lldb/packages/Python/lldbsuite/test/lldbplatformutil.py
(llvm@7021e44).
@llvmbot
Copy link
Member

llvmbot commented Jul 18, 2024

@llvm/pr-subscribers-lldb

Author: Vladislav Dzhidzhoev (dzhidzhoev)

Changes

Remove commands for OS/HOST_OS detection from Makefile.rules to simplify it, since logic for these variables has been implemented in lldb/packages/Python/lldbsuite/test/lldbplatformutil.py (7021e44).


Full diff: https://github.com/llvm/llvm-project/pull/99535.diff

1 Files Affected:

  • (modified) lldb/packages/Python/lldbsuite/test/make/Makefile.rules (-25)
diff --git a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
index 3d562285ce9cc..597aa94566c24 100644
--- a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
+++ b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
@@ -46,31 +46,6 @@ LLDB_BASE_DIR := $(THIS_FILE_DIR)/../../../../../
 # according to variable values).
 .DEFAULT_GOAL := all
 
-#----------------------------------------------------------------------
-# If OS is not defined, use 'uname -s' to determine the OS name.
-#
-# GNUWin32 uname gives "windows32" or "server version windows32" while
-# some versions of MSYS uname return "MSYS_NT*", 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 "$(HOST_OS)" ""
-  HOST_OS := $(shell uname -s)
-endif
-
-ifneq (,$(findstring windows32,$(HOST_OS)))
-	HOST_OS := Windows_NT
-endif
-
-ifneq (,$(findstring MSYS_NT,$(HOST_OS)))
-	HOST_OS := Windows_NT
-endif
-
-ifeq "$(OS)" ""
-	OS := $(HOST_OS)
-endif
-
 #----------------------------------------------------------------------
 # If OS is Windows, force SHELL to be cmd
 #

@dzhidzhoev dzhidzhoev merged commit 78e3bfc into llvm:main Jul 18, 2024
6 of 7 checks passed
@labath
Copy link
Collaborator

labath commented Jul 19, 2024

🥳

yuxuanchen1997 pushed a commit that referenced this pull request Jul 25, 2024
Summary:
Remove commands for OS/HOST_OS detection from Makefile.rules to simplify
it, since logic for these variables has been implemented in
`lldb/packages/Python/lldbsuite/test/lldbplatformutil.py`
(7021e44).

Test Plan: 

Reviewers: 

Subscribers: 

Tasks: 

Tags: 


Differential Revision: https://phabricator.intern.facebook.com/D60250890
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants