Backed out changeset 14243af871cc (bug 1475562) for causing build bustages. CLOSED TREE

--HG--
extra : amend_source : 858dc1c318dbd011a262188720b4a4646a8c389e
This commit is contained in:
Cosmin Sabou 2018-10-12 20:43:40 +03:00
Родитель 386468ce92
Коммит 7832ecfb51
9 изменённых файлов: 10 добавлений и 58 удалений

Просмотреть файл

@ -30,7 +30,6 @@ ac_add_options --target=i686-w64-mingw32
ac_add_options --with-toolchain-prefix=i686-w64-mingw32-
ac_add_options --disable-warnings-as-errors
MOZ_COPY_PDBS=1
# Temporary config settings until we get these working on mingw
ac_add_options --disable-accessibility # https://sourceforge.net/p/mingw-w64/bugs/648/

Просмотреть файл

@ -30,7 +30,6 @@ ac_add_options --target=x86_64-w64-mingw32
ac_add_options --with-toolchain-prefix=x86_64-w64-mingw32-
ac_add_options --disable-warnings-as-errors
MOZ_COPY_PDBS=1
# Temporary config settings until we get these working on mingw
ac_add_options --disable-accessibility # https://sourceforge.net/p/mingw-w64/bugs/648/

Просмотреть файл

@ -1142,13 +1142,11 @@ def bindgen_cflags(value):
add_old_configure_assignment('_BINDGEN_CFLAGS', bindgen_cflags)
@depends(c_compiler, target)
def default_debug_flags(compiler_info, target):
@depends(c_compiler)
def default_debug_flags(compiler_info):
# Debug info is ON by default.
if compiler_info.type in ('msvc', 'clang-cl'):
return '-Zi'
elif target.kernel == 'WINNT' and compiler_info.type == 'clang':
return '-g -gcodeview'
return '-g'
@ -1995,16 +1993,11 @@ add_old_configure_assignment('LIBFUZZER_FLAGS', libfuzzer_flags.use_flags)
@depends(target, c_compiler)
def make_shared_library(target, compiler):
if target.os == 'WINNT':
if compiler.type == 'gcc':
if compiler.type in ('gcc', 'clang'):
return namespace(
mkshlib=['$(CXX)', '$(DSO_LDOPTS)', '-o', '$@'],
mkcshlib=['$(CC)', '$(DSO_LDOPTS)', '-o', '$@'],
)
elif compiler.type == 'clang':
return namespace(
mkshlib=['$(CXX)', '$(DSO_LDOPTS)', '-Wl,-pdb,$(LINK_PDBFILE)', '-o', '$@'],
mkcshlib=['$(CC)', '$(DSO_LDOPTS)', '-Wl,-pdb,$(LINK_PDBFILE)', '-o', '$@'],
)
else:
linker = [
'$(LINKER)',

Просмотреть файл

@ -7,7 +7,6 @@ if [ -d "$topsrcdir/clang" ]; then
mk_export_correct_style LIB
export LDFLAGS="clang_rt.asan_dynamic-x86_64.lib clang_rt.asan_dynamic_runtime_thunk-x86_64.lib"
export MOZ_COPY_PDBS=1
export LLVM_SYMBOLIZER="$topsrcdir/clang/bin/llvm-symbolizer.exe"
export MOZ_CLANG_RT_ASAN_LIB_PATH="${CLANG_LIB_DIR}/clang_rt.asan_dynamic-x86_64.dll"
fi

Просмотреть файл

@ -126,9 +126,6 @@ endif # MKSHLIB
endif # FORCE_SHARED_LIB
ifeq ($(OS_ARCH),WINNT)
LINK_PDBFILE ?= $(basename $(@F)).pdb
ifndef GNU_CC
#
@ -150,6 +147,7 @@ endif
COMPILE_CFLAGS += $(COMPILE_PDB_FLAG)
COMPILE_CXXFLAGS += $(COMPILE_PDB_FLAG)
LINK_PDBFILE ?= $(basename $(@F)).pdb
ifdef MOZ_DEBUG
CODFILE=$(basename $(@F)).cod
endif
@ -163,12 +161,6 @@ MOZ_PROGRAM_LDFLAGS += -Wl,-rpath -Wl,@executable_path/Frameworks
endif
endif
ifeq ($(OS_ARCH),WINNT)
ifeq ($(CC_TYPE),clang)
MOZ_PROGRAM_LDFLAGS += -Wl,-pdb,$(dir $@)/$(LINK_PDBFILE)
endif
endif
ifeq ($(HOST_OS_ARCH),WINNT)
HOST_PDBFILE=$(basename $(@F)).pdb
HOST_PDB_FLAG ?= -Fd$(HOST_PDBFILE)
@ -827,13 +819,13 @@ DUMP_SYMS_TARGETS :=
endif
endif
ifdef MOZ_COPY_PDBS
ifdef MOZ_CRASHREPORTER
$(foreach file,$(DUMP_SYMS_TARGETS),$(eval $(call syms_template,$(file),$(notdir $(file))_syms.track)))
else ifneq (,$(and $(LLVM_SYMBOLIZER),$(filter WINNT,$(OS_ARCH)),$(MOZ_AUTOMATION)))
PDB_FILES = $(addsuffix .pdb,$(basename $(DUMP_SYMS_TARGETS)))
PDB_DEST ?= $(FINAL_TARGET)
PDB_TARGET = syms
INSTALL_TARGETS += PDB
else ifdef MOZ_CRASHREPORTER
$(foreach file,$(DUMP_SYMS_TARGETS),$(eval $(call syms_template,$(file),$(notdir $(file))_syms.track)))
endif
cargo_host_flag := --target=$(RUST_HOST_TARGET)

Просмотреть файл

@ -39,12 +39,6 @@ def imply_disable_compile_environment(value):
if value:
return False
option(env='MOZ_COPY_PDBS',
help='For builds that do not support symbols in the normal fashion,'
' generate and copy them into the resulting build archive.')
set_config('MOZ_COPY_PDBS', depends_if('MOZ_COPY_PDBS')(lambda _: True))
imply_option('--enable-compile-environment', imply_disable_compile_environment)
option('--disable-compile-environment',

Просмотреть файл

@ -39,7 +39,6 @@ TARGET = {
'readelf': '{}readelf'.format(
buildconfig.substs.get('TOOLCHAIN_PREFIX', '')),
'nm': '{}nm'.format(buildconfig.substs.get('TOOLCHAIN_PREFIX', '')),
'readobj': '{}readobj'.format(buildconfig.substs.get('TOOLCHAIN_PREFIX', '')),
}
if buildconfig.substs.get('HAVE_64BIT_BUILD'):
@ -191,24 +190,7 @@ def check_nsmodules(target, binary):
symbols.append((int(data[2], 16), GUESSED_NSMODULE_SIZE,
name))
else:
# MinGW-Clang, when building pdbs, doesn't include the symbol table into
# the final module. To get the NSModule info, we can look at the exported
# symbols. (#1475562)
if buildconfig.substs['OS_ARCH'] == 'WINNT' and \
buildconfig.substs['HOST_OS_ARCH'] != 'WINNT':
readobj_output = get_output(target['readobj'], '-coff-exports', binary)
# Transform the output of readobj into nm-like output
output = []
for line in readobj_output:
if "Name" in line:
name = line.replace("Name:", "").strip()
elif "RVA" in line:
rva = line.replace("RVA:", "").strip()
output.append("%s r %s" % (name, rva))
else:
output = get_output(target['nm'], '-P', binary)
for line in output:
for line in get_output(target['nm'], '-P', binary):
data = line.split()
# Some symbols may not have a size listed at all.
if len(data) == 3:

Просмотреть файл

@ -275,11 +275,6 @@ build_windres() {
# Manually install only nm and windres
cp binutils/windres $INSTALL_DIR/bin/$machine-w64-mingw32-windres
cp binutils/nm-new $INSTALL_DIR/bin/$machine-w64-mingw32-nm
pushd $INSTALL_DIR/bin/
ln -s llvm-readobj $machine-w64-mingw32-readobj
popd
popd
}

Просмотреть файл

@ -311,9 +311,8 @@ def main():
LibSignFile(os.path.join(args.destination,
libname)))
# If a pdb file is present and we were instructed to copy it, include it.
# Run on all OSes to capture MinGW builds
if buildconfig.substs['MOZ_COPY_PDBS']:
# Include pdb files for llvm-symbolizer to resolve symbols.
if buildconfig.substs.get('LLVM_SYMBOLIZER') and mozinfo.isWin:
for p, f in copier:
if isinstance(f, ExecutableFile):
pdbname = os.path.splitext(f.inputs()[0])[0] + '.pdb'