2 # -*- coding: utf-8 -*-
11 with
open(sys
.argv
[1], "rb") as f
:
12 buf
= f
.read(len(ELF_MAGIC
))
16 llvm_objcopy
= os
.path
.join('@LLVM_RUNTIME_OUTPUT_INTDIR@', 'llvm-objcopy')
17 install_dir
= os
.path
.join(os
.getenv('DESTDIR', ''), '@CMAKE_INSTALL_PREFIX@')
18 link_dir
= os
.path
.join(install_dir
, 'lib', 'debug', '.build-id')
20 sys
.exit(subprocess
.call([
23 '--build-id-link-dir=' + link_dir
,
24 '--build-id-link-input=.debug',
25 '--build-id-link-output=',