make/linux/makefiles/defs.make

changeset 3725
744728c16316
parent 3724
d652a62d6e03
child 3726
74c359c4a9e5
     1.1 --- a/make/linux/makefiles/defs.make	Fri Mar 23 11:50:33 2012 -0700
     1.2 +++ b/make/linux/makefiles/defs.make	Tue Apr 03 09:48:34 2012 -0700
     1.3 @@ -130,9 +130,37 @@
     1.4  
     1.5  ifeq ($(JDK6_OR_EARLIER),0)
     1.6    # Full Debug Symbols is supported on JDK7 or newer.
     1.7 -  # Default is enabled with .debuginfo files ZIP'ed to save space.
     1.8 +  # The Full Debug Symbols (FDS) default for BUILD_FLAVOR == product
     1.9 +  # builds is enabled with debug info files ZIP'ed to save space. For
    1.10 +  # BUILD_FLAVOR != product builds, FDS is always enabled, after all a
    1.11 +  # debug build without debug info isn't very useful.
    1.12 +  # The ZIP_DEBUGINFO_FILES option only has meaning when FDS is enabled.
    1.13 +  #
    1.14 +  # If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be
    1.15 +  # disabled for a BUILD_FLAVOR == product build.
    1.16 +  #
    1.17 +  # Note: Use of a different variable name for the FDS override option
    1.18 +  # versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS
    1.19 +  # versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass
    1.20 +  # in options via environment variables, use of distinct variables
    1.21 +  # prevents strange behaviours. For example, in a BUILD_FLAVOR !=
    1.22 +  # product build, the FULL_DEBUG_SYMBOLS environment variable will be
    1.23 +  # 0, but the ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If
    1.24 +  # the same variable name is used, then different values can be picked
    1.25 +  # up by different parts of the build. Just to be clear, we only need
    1.26 +  # two variable names because the incoming option value can be
    1.27 +  # overridden in some situations, e.g., a BUILD_FLAVOR != product
    1.28 +  # build.
    1.29  
    1.30 -  ENABLE_FULL_DEBUG_SYMBOLS ?= 1
    1.31 +  ifeq ($(BUILD_FLAVOR), product)
    1.32 +    FULL_DEBUG_SYMBOLS ?= 1
    1.33 +    ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
    1.34 +  else
    1.35 +    # debug variants always get Full Debug Symbols (if available)
    1.36 +    ENABLE_FULL_DEBUG_SYMBOLS = 1
    1.37 +  endif
    1.38 +  _JUNK_ := $(shell \
    1.39 +    echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")
    1.40    # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
    1.41  
    1.42    ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
    1.43 @@ -159,6 +187,8 @@
    1.44      _JUNK_ := $(shell \
    1.45        echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.")
    1.46      ENABLE_FULL_DEBUG_SYMBOLS=0
    1.47 +    _JUNK_ := $(shell \
    1.48 +      echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")
    1.49    else
    1.50      _JUNK_ := $(shell \
    1.51        echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.")

mercurial