Commit 53ccf815 authored by Phil Ringnalda's avatar Phil Ringnalda
Browse files

Backed out 5 changesets (bug 1318370) for mozilla-central Windows static-analysis bustage

Backed out changeset 196f9ddbf7aa (bug 1318370)
Backed out changeset 72f6eace33a1 (bug 1318370)
Backed out changeset c0c0e10ed613 (bug 1318370)
Backed out changeset a8032ae9cb2a (bug 1318370)
Backed out changeset 0848b3201c40 (bug 1318370)
parent e7d67b74
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -22,4 +22,4 @@
# changes to stick? As of bug 928195, this shouldn't be necessary! Please
# changes to stick? As of bug 928195, this shouldn't be necessary! Please
# don't change CLOBBER for WebIDL changes any more.
# don't change CLOBBER for WebIDL changes any more.


Trying to unbreak Windows static builds which switched from using ccache to not using it on mozilla-central, perhaps from bug 1318370
Touching clobber for Telemetry IPC refactor in bug 1339749.
+0 −31
Original line number Original line Diff line number Diff line
@@ -831,7 +831,6 @@ host_cxx_compiler = compiler('C++', host, c_compiler=host_c_compiler,
                             other_c_compiler=c_compiler)
                             other_c_compiler=c_compiler)


# Generic compiler-based conditions.
# Generic compiler-based conditions.
building_with_msvc = depends(c_compiler)(lambda info: info.type == 'msvc')
non_msvc_compiler = depends(c_compiler)(lambda info: info.type != 'msvc')
non_msvc_compiler = depends(c_compiler)(lambda info: info.type != 'msvc')
building_with_gcc = depends(c_compiler)(lambda info: info.type == 'gcc')
building_with_gcc = depends(c_compiler)(lambda info: info.type == 'gcc')


@@ -968,36 +967,6 @@ set_define('HAVE_VISIBILITY_ATTRIBUTE',
set_config('WRAP_SYSTEM_INCLUDES', wrap_system_includes)
set_config('WRAP_SYSTEM_INCLUDES', wrap_system_includes)
set_config('VISIBILITY_FLAGS', visibility_flags)
set_config('VISIBILITY_FLAGS', visibility_flags)


@depends(c_compiler, using_sccache)
def depend_cflags(c_compiler, using_sccache):
    if c_compiler.type in ('gcc', 'clang'):
        return '-MD -MP -MF $(MDDEPDIR)/$(@F).pp'
    elif c_compiler.type == 'msvc' and using_sccache:
        # sccache supports a special flag to create depfiles
        # by parsing MSVC's -showIncludes output.
        return '-deps$(MDDEPDIR)/$(@F).pp'

set_config('_DEPEND_CFLAGS', depend_cflags)

@depends(c_compiler, when=building_with_msvc)
@imports(_from='re', _import='compile', _as='re_compile')
def msvc_showincludes_prefix(c_compiler):
    pattern = re_compile(r'^([^:]*:.*[ :] )(.*\\stdio.h)$')
    output = try_invoke_compiler([c_compiler.compiler], 'C', '#include <stdio.h>\n',
                                 ['-nologo', '-c', '-Fonul', '-showIncludes'])
    for line in output.splitlines():
        if line.endswith('\\stdio.h'):
            m = pattern.match(line)
            if m:
                if not m.group(2):
                    die("Unable to parse cl -showIncludes prefix. " +
                        "This compiler's locale has an unsupported formatting.")
                return m.group(1)
    # We should have found the prefix and returned earlier
    die('Cannot find cl -showIncludes prefix.')

set_config('CL_INCLUDES_PREFIX', msvc_showincludes_prefix)

@depends(target)
@depends(target)
def is_windows(target):
def is_windows(target):
    return target.kernel == 'WINNT'
    return target.kernel == 'WINNT'
+20 −0
Original line number Original line Diff line number Diff line
@@ -113,11 +113,31 @@ else
        exit 1
        exit 1
    fi
    fi
    mk_add_options "export SCCACHE_BUCKET=$bucket"
    mk_add_options "export SCCACHE_BUCKET=$bucket"
    case "$master" in
    *us[ew][12].mozilla.com*|*euc1.mozilla.com*)
        mk_add_options "export SCCACHE_NAMESERVER=169.254.169.253"
        ;;
    esac
    ac_add_options "--with-ccache=$topsrcdir/sccache2/sccache${suffix}"
    ac_add_options "--with-ccache=$topsrcdir/sccache2/sccache${suffix}"
    export SCCACHE_VERBOSE_STATS=1
    export SCCACHE_VERBOSE_STATS=1
    mk_add_options MOZ_PREFLIGHT_ALL+=build/sccache.mk
    mk_add_options MOZ_PREFLIGHT_ALL+=build/sccache.mk
    mk_add_options MOZ_POSTFLIGHT_ALL+=build/sccache.mk
    mk_add_options MOZ_POSTFLIGHT_ALL+=build/sccache.mk
    mk_add_options "UPLOAD_EXTRA_FILES+=sccache.log.gz"
    mk_add_options "UPLOAD_EXTRA_FILES+=sccache.log.gz"
    case "$platform" in
    win*)
        # sccache supports a special flag to create depfiles.
        #TODO: bug 1318370 - move this all into toolchain.configure
        export _DEPEND_CFLAGS='-deps$(MDDEPDIR)/$(@F).pp'
        # Windows builds have a default wrapper that needs to be overridden
        mk_add_options "export CC_WRAPPER="
        mk_add_options "export CXX_WRAPPER="
        # For now, sccache doesn't support separate PDBs so force debug info to be
        # in object files.
        mk_add_options "export COMPILE_PDB_FLAG="
        mk_add_options "export HOST_PDB_FLAG="
        mk_add_options "export MOZ_DEBUG_FLAGS=-Z7"
        ;;
    esac
fi
fi


fi
fi
+4 −2
Original line number Original line Diff line number Diff line
@@ -120,10 +120,8 @@ CONFIG_TOOLS = $(MOZ_BUILD_ROOT)/config
AUTOCONF_TOOLS	= $(MOZILLA_DIR)/build/autoconf
AUTOCONF_TOOLS	= $(MOZILLA_DIR)/build/autoconf


ifdef _MSC_VER
ifdef _MSC_VER
ifndef MOZ_USING_SCCACHE
CC_WRAPPER ?= $(call py_action,cl)
CC_WRAPPER ?= $(call py_action,cl)
CXX_WRAPPER ?= $(call py_action,cl)
CXX_WRAPPER ?= $(call py_action,cl)
endif
endif # _MSC_VER
endif # _MSC_VER


CC := $(CC_WRAPPER) $(CC)
CC := $(CC_WRAPPER) $(CC)
@@ -625,3 +623,7 @@ endif
PLY_INCLUDE = -I$(MOZILLA_DIR)/other-licenses/ply
PLY_INCLUDE = -I$(MOZILLA_DIR)/other-licenses/ply


export CL_INCLUDES_PREFIX
export CL_INCLUDES_PREFIX
# Make sure that the build system can handle non-ASCII characters
# in environment variables to prevent it from breking silently on
# non-English systems.
export NONASCII
+0 −12
Original line number Original line Diff line number Diff line
@@ -156,10 +156,6 @@ ifndef GNU_CC
COMPILE_PDB_FLAG ?= -Fd$(basename $(@F)).pdb
COMPILE_PDB_FLAG ?= -Fd$(basename $(@F)).pdb
COMPILE_CFLAGS += $(COMPILE_PDB_FLAG)
COMPILE_CFLAGS += $(COMPILE_PDB_FLAG)
COMPILE_CXXFLAGS += $(COMPILE_PDB_FLAG)
COMPILE_CXXFLAGS += $(COMPILE_PDB_FLAG)
ifdef MOZ_USING_SCCACHE
# We remove the PDB file before compilation so that sccache knows it's safe to cache.
RM_PDB_FILE = -$(RM) $(basename $(@F)).pdb
endif


LINK_PDBFILE ?= $(basename $(@F)).pdb
LINK_PDBFILE ?= $(basename $(@F)).pdb
ifdef MOZ_DEBUG
ifdef MOZ_DEBUG
@@ -854,28 +850,23 @@ $(OBJS) $(HOST_OBJS) $(PROGOBJS) $(HOST_PROGOBJS): $(GLOBAL_DEPS)
# Rules for building native targets must come first because of the host_ prefix
# Rules for building native targets must come first because of the host_ prefix
$(HOST_COBJS):
$(HOST_COBJS):
	$(REPORT_BUILD_VERBOSE)
	$(REPORT_BUILD_VERBOSE)
	$(RM_PDB_FILE)
	$(ELOG) $(HOST_CC) $(HOST_OUTOPTION)$@ -c $(HOST_CPPFLAGS) $(HOST_CFLAGS) $(INCLUDES) $(NSPR_CFLAGS) $(_VPATH_SRCS)
	$(ELOG) $(HOST_CC) $(HOST_OUTOPTION)$@ -c $(HOST_CPPFLAGS) $(HOST_CFLAGS) $(INCLUDES) $(NSPR_CFLAGS) $(_VPATH_SRCS)


$(HOST_CPPOBJS):
$(HOST_CPPOBJS):
	$(REPORT_BUILD_VERBOSE)
	$(REPORT_BUILD_VERBOSE)
	$(call BUILDSTATUS,OBJECT_FILE $@)
	$(call BUILDSTATUS,OBJECT_FILE $@)
	$(RM_PDB_FILE)
	$(ELOG) $(HOST_CXX) $(HOST_OUTOPTION)$@ -c $(HOST_CPPFLAGS) $(HOST_CXXFLAGS) $(INCLUDES) $(NSPR_CFLAGS) $(_VPATH_SRCS)
	$(ELOG) $(HOST_CXX) $(HOST_OUTOPTION)$@ -c $(HOST_CPPFLAGS) $(HOST_CXXFLAGS) $(INCLUDES) $(NSPR_CFLAGS) $(_VPATH_SRCS)


$(HOST_CMOBJS):
$(HOST_CMOBJS):
	$(REPORT_BUILD_VERBOSE)
	$(REPORT_BUILD_VERBOSE)
	$(RM_PDB_FILE)
	$(ELOG) $(HOST_CC) $(HOST_OUTOPTION)$@ -c $(HOST_CPPFLAGS) $(HOST_CFLAGS) $(HOST_CMFLAGS) $(INCLUDES) $(NSPR_CFLAGS) $(_VPATH_SRCS)
	$(ELOG) $(HOST_CC) $(HOST_OUTOPTION)$@ -c $(HOST_CPPFLAGS) $(HOST_CFLAGS) $(HOST_CMFLAGS) $(INCLUDES) $(NSPR_CFLAGS) $(_VPATH_SRCS)


$(HOST_CMMOBJS):
$(HOST_CMMOBJS):
	$(REPORT_BUILD_VERBOSE)
	$(REPORT_BUILD_VERBOSE)
	$(RM_PDB_FILE)
	$(ELOG) $(HOST_CXX) $(HOST_OUTOPTION)$@ -c $(HOST_CPPFLAGS) $(HOST_CXXFLAGS) $(HOST_CMMFLAGS) $(INCLUDES) $(NSPR_CFLAGS) $(_VPATH_SRCS)
	$(ELOG) $(HOST_CXX) $(HOST_OUTOPTION)$@ -c $(HOST_CPPFLAGS) $(HOST_CXXFLAGS) $(HOST_CMMFLAGS) $(INCLUDES) $(NSPR_CFLAGS) $(_VPATH_SRCS)


$(COBJS):
$(COBJS):
	$(REPORT_BUILD_VERBOSE)
	$(REPORT_BUILD_VERBOSE)
	$(RM_PDB_FILE)
	$(ELOG) $(CC) $(OUTOPTION)$@ -c $(COMPILE_CFLAGS) $($(notdir $<)_FLAGS) $(_VPATH_SRCS)
	$(ELOG) $(CC) $(OUTOPTION)$@ -c $(COMPILE_CFLAGS) $($(notdir $<)_FLAGS) $(_VPATH_SRCS)


# DEFINES and ACDEFINES are needed here to enable conditional compilation of Q_OBJECTs:
# DEFINES and ACDEFINES are needed here to enable conditional compilation of Q_OBJECTs:
@@ -1007,17 +998,14 @@ $(SOBJS):
$(CPPOBJS):
$(CPPOBJS):
	$(REPORT_BUILD_VERBOSE)
	$(REPORT_BUILD_VERBOSE)
	$(call BUILDSTATUS,OBJECT_FILE $@)
	$(call BUILDSTATUS,OBJECT_FILE $@)
	$(RM_PDB_FILE)
	$(ELOG) $(CCC) $(OUTOPTION)$@ -c $(COMPILE_CXXFLAGS) $($(notdir $<)_FLAGS) $(_VPATH_SRCS)
	$(ELOG) $(CCC) $(OUTOPTION)$@ -c $(COMPILE_CXXFLAGS) $($(notdir $<)_FLAGS) $(_VPATH_SRCS)


$(CMMOBJS):
$(CMMOBJS):
	$(REPORT_BUILD_VERBOSE)
	$(REPORT_BUILD_VERBOSE)
	$(RM_PDB_FILE)
	$(ELOG) $(CCC) -o $@ -c $(COMPILE_CXXFLAGS) $(COMPILE_CMMFLAGS) $($(notdir $<)_FLAGS) $(_VPATH_SRCS)
	$(ELOG) $(CCC) -o $@ -c $(COMPILE_CXXFLAGS) $(COMPILE_CMMFLAGS) $($(notdir $<)_FLAGS) $(_VPATH_SRCS)


$(CMOBJS):
$(CMOBJS):
	$(REPORT_BUILD_VERBOSE)
	$(REPORT_BUILD_VERBOSE)
	$(RM_PDB_FILE)
	$(ELOG) $(CC) -o $@ -c $(COMPILE_CFLAGS) $(COMPILE_CMFLAGS) $($(notdir $<)_FLAGS) $(_VPATH_SRCS)
	$(ELOG) $(CC) -o $@ -c $(COMPILE_CFLAGS) $(COMPILE_CMFLAGS) $($(notdir $<)_FLAGS) $(_VPATH_SRCS)


$(filter %.s,$(CPPSRCS:%.cpp=%.s)): %.s: %.cpp $(call mkdir_deps,$(MDDEPDIR))
$(filter %.s,$(CPPSRCS:%.cpp=%.s)): %.s: %.cpp $(call mkdir_deps,$(MDDEPDIR))
Loading