Mercurial > hg > graal-jvmci-8
comparison make/linux/makefiles/defs.make @ 6021:744728c16316
7158067: FDS: ENABLE_FULL_DEBUG_SYMBOLS flag should only affect product builds
Summary: Build option FULL_DEBUG_SYMBOLS=0 only affects product builds.
Reviewed-by: ohair, jmelvin, sspitsyn
author | dcubed |
---|---|
date | Tue, 03 Apr 2012 09:48:34 -0700 |
parents | d652a62d6e03 |
children | 74c359c4a9e5 |
comparison
equal
deleted
inserted
replaced
6020:d652a62d6e03 | 6021:744728c16316 |
---|---|
128 endif | 128 endif |
129 endif | 129 endif |
130 | 130 |
131 ifeq ($(JDK6_OR_EARLIER),0) | 131 ifeq ($(JDK6_OR_EARLIER),0) |
132 # Full Debug Symbols is supported on JDK7 or newer. | 132 # Full Debug Symbols is supported on JDK7 or newer. |
133 # Default is enabled with .debuginfo files ZIP'ed to save space. | 133 # The Full Debug Symbols (FDS) default for BUILD_FLAVOR == product |
134 | 134 # builds is enabled with debug info files ZIP'ed to save space. For |
135 ENABLE_FULL_DEBUG_SYMBOLS ?= 1 | 135 # BUILD_FLAVOR != product builds, FDS is always enabled, after all a |
136 # debug build without debug info isn't very useful. | |
137 # The ZIP_DEBUGINFO_FILES option only has meaning when FDS is enabled. | |
138 # | |
139 # If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be | |
140 # disabled for a BUILD_FLAVOR == product build. | |
141 # | |
142 # Note: Use of a different variable name for the FDS override option | |
143 # versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS | |
144 # versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass | |
145 # in options via environment variables, use of distinct variables | |
146 # prevents strange behaviours. For example, in a BUILD_FLAVOR != | |
147 # product build, the FULL_DEBUG_SYMBOLS environment variable will be | |
148 # 0, but the ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If | |
149 # the same variable name is used, then different values can be picked | |
150 # up by different parts of the build. Just to be clear, we only need | |
151 # two variable names because the incoming option value can be | |
152 # overridden in some situations, e.g., a BUILD_FLAVOR != product | |
153 # build. | |
154 | |
155 ifeq ($(BUILD_FLAVOR), product) | |
156 FULL_DEBUG_SYMBOLS ?= 1 | |
157 ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS) | |
158 else | |
159 # debug variants always get Full Debug Symbols (if available) | |
160 ENABLE_FULL_DEBUG_SYMBOLS = 1 | |
161 endif | |
162 _JUNK_ := $(shell \ | |
163 echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)") | |
136 # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later | 164 # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later |
137 | 165 |
138 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) | 166 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) |
139 # Default OBJCOPY comes from GNU Binutils on Linux: | 167 # Default OBJCOPY comes from GNU Binutils on Linux: |
140 DEF_OBJCOPY=/usr/bin/objcopy | 168 DEF_OBJCOPY=/usr/bin/objcopy |
157 | 185 |
158 ifeq ($(OBJCOPY),) | 186 ifeq ($(OBJCOPY),) |
159 _JUNK_ := $(shell \ | 187 _JUNK_ := $(shell \ |
160 echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.") | 188 echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.") |
161 ENABLE_FULL_DEBUG_SYMBOLS=0 | 189 ENABLE_FULL_DEBUG_SYMBOLS=0 |
190 _JUNK_ := $(shell \ | |
191 echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)") | |
162 else | 192 else |
163 _JUNK_ := $(shell \ | 193 _JUNK_ := $(shell \ |
164 echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.") | 194 echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.") |
165 | 195 |
166 # Library stripping policies for .debuginfo configs: | 196 # Library stripping policies for .debuginfo configs: |