[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.
This commit is contained in:
Muhammad Omair Javaid 2022-06-29 13:24:26 +04:00
parent 0d9e51ea42
commit 9c6e043592
1 changed files with 6 additions and 6 deletions

View File

@ -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)"