mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 15:25:52 +00:00
Bug 1426176 - Add symbols file for Clang ASan runtime on Windows. r=ted
MozReview-Commit-ID: 4P3mwZNP8cY --HG-- extra : rebase_source : a06221ad62a6c763224378d93aeea7d2477f5226
This commit is contained in:
parent
4def48d158
commit
04589bf67b
@ -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-x86_64.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 New Issue
Block a user