forked from mirrors/gecko-dev
Bug 1426176 - Add symbols file for Clang ASan runtime on Windows. r=ted
MozReview-Commit-ID: 4P3mwZNP8cY --HG-- extra : histedit_source : ef086a01cdb2d228b93ee1be018033f7390fa055%2C1454c0f70d38a56f9c78e4d9b29107409c18726b
This commit is contained in:
parent
b64ad562af
commit
75e5225c77
2 changed files with 17 additions and 0 deletions
|
|
@ -134,6 +134,21 @@ def install_import_library(build_dir, clang_dir):
|
|||
os.path.join(clang_dir, "lib"))
|
||||
|
||||
|
||||
def install_asan_symbols(build_dir, clang_dir):
|
||||
lib_path_pattern = os.path.join("lib", "clang", "*.*.*", "lib", "windows")
|
||||
src_path = glob.glob(os.path.join(build_dir, lib_path_pattern,
|
||||
"clang_rt.asan_dynamic-*.pdb"))
|
||||
dst_path = glob.glob(os.path.join(clang_dir, lib_path_pattern))
|
||||
|
||||
if len(src_path) != 1:
|
||||
raise Exception("Source path pattern did not resolve uniquely")
|
||||
|
||||
if len(src_path) != 1:
|
||||
raise Exception("Destination path pattern did not resolve uniquely")
|
||||
|
||||
shutil.copy2(src_path[0], dst_path[0])
|
||||
|
||||
|
||||
def svn_co(source_dir, url, directory, revision):
|
||||
run_in(source_dir, ["svn", "co", "-q", "-r", revision, url, directory])
|
||||
|
||||
|
|
@ -226,6 +241,7 @@ def build_one_stage(cc, cxx, asm, ld, ar, ranlib, libtool,
|
|||
# installed, so we copy it by ourselves.
|
||||
if is_windows():
|
||||
install_import_library(build_dir, inst_dir)
|
||||
install_asan_symbols(build_dir, inst_dir)
|
||||
|
||||
|
||||
# Return the absolute path of a build tool. We first look to see if the
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ OBJDIR_FILES += ['!/dist/bin/.gdbinit_python']
|
|||
# Install the clang-cl runtime library for ASAN next to the binaries we produce.
|
||||
if CONFIG['MOZ_ASAN'] and CONFIG['CC_TYPE'] == 'clang-cl':
|
||||
FINAL_TARGET_FILES += ['%' + CONFIG['MOZ_CLANG_RT_ASAN_LIB_PATH']]
|
||||
FINAL_TARGET_FILES += ['%' + CONFIG['MOZ_CLANG_RT_ASAN_LIB_PATH'].replace(".dll", ".pdb")]
|
||||
|
||||
if CONFIG['LLVM_SYMBOLIZER']:
|
||||
FINAL_TARGET_FILES += ['/' + CONFIG['LLVM_SYMBOLIZER']]
|
||||
|
|
|
|||
Loading…
Reference in a new issue