Author: Muhammad Omair Javaid
Date: 2022-06-29T23:24:18+04:00
New Revision: 9c6e04359282e9051f7b2744b99266ece32db001

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

LOG: [LLDB] Allow API tests to override -gdwarf on Windows

This patch fixes LLDB API tests MakeFile.rules to allow overriding of
debug symbol flags when compiling tests for Windows.
Previously windows tests were forced to emit only dwarf debug symbols
as majority of the tests rely on dwarf debug info. After this patch
any test can override debug symbol flag by setting DEBUG_INFO_FLAG
variable in its make file.

Added: 
    

Modified: 
    lldb/packages/Python/lldbsuite/test/make/Makefile.rules

Removed: 
    


################################################################################
diff  --git a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules 
b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
index 9023128067f5e..b065a43cb1934 100644
--- a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
+++ b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
@@ -212,6 +212,12 @@ ifneq (,$(findstring clang,$(CC)))
    MODULE_DEBUG_INFO_FLAGS += -gmodules
 endif
 
+# If the OS is Windows, we need to pass -gdwarf to clang, otherwise it will 
build
+# with codeview by default but all the tests rely on dwarf.
+ifeq "$(OS)" "Windows_NT"
+       DEBUG_INFO_FLAG ?= -gdwarf
+endif
+
 DEBUG_INFO_FLAG ?= -g
 
 CFLAGS ?= $(DEBUG_INFO_FLAG) -O0
@@ -236,12 +242,6 @@ endif
 
 CFLAGS += $(NO_LIMIT_DEBUG_INFO_FLAGS) $(ARCH_CFLAGS)
 
-# If the OS is Windows, we need to pass -gdwarf to clang, otherwise it will 
build
-# with codeview by default but all the tests rely on dwarf.
-ifeq "$(OS)" "Windows_NT"
-       CFLAGS += -gdwarf
-endif
-
 # Use this one if you want to build one part of the result without debug 
information:
 ifeq "$(OS)" "Darwin"
        CFLAGS_NO_DEBUG = -O0 $(ARCHFLAG) $(ARCH) $(FRAMEWORK_INCLUDES) 
$(ARCH_CFLAGS) $(CFLAGS_EXTRAS) -isysroot "$(SDKROOT)"


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

Reply via email to