1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

[CMake] Delete LLVM_RUNTIME_BUILD_ID_LINK_TARGETS

Announcement: https://lists.llvm.org/pipermail/llvm-dev/2021-February/148446.html

Differential Revision: https://reviews.llvm.org/D96360
This commit is contained in:
Fangrui Song 2021-02-15 11:06:23 -08:00
parent 84285b7cd9
commit b2c921ff85
2 changed files with 0 additions and 39 deletions

View File

@ -187,14 +187,6 @@ foreach(entry ${runtimes})
list(APPEND runtime_names ${projName})
endforeach()
if(LLVM_RUNTIME_BUILD_ID_LINK_TARGETS)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/llvm-strip-link.in
${CMAKE_CURRENT_BINARY_DIR}/llvm-strip-link
@ONLY
)
endif()
function(runtime_default_target)
cmake_parse_arguments(ARG "" "" "DEPENDS;PREFIXES" ${ARGN})
@ -329,10 +321,6 @@ function(runtime_register_target name target)
list(APPEND ${name}_extra_args -DLLVM_ENABLE_RUNTIMES=${LLVM_ENABLE_RUNTIMES_PASSTHROUGH})
endif()
if(target IN_LIST LLVM_RUNTIME_BUILD_ID_LINK_TARGETS)
list(APPEND EXTRA_ARGS STRIP_TOOL ${CMAKE_CURRENT_BINARY_DIR}/llvm-strip-link)
endif()
llvm_ExternalProject_Add(runtimes-${name}
${CMAKE_CURRENT_SOURCE_DIR}/../../runtimes
DEPENDS ${${name}_deps}

View File

@ -1,27 +0,0 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import subprocess
ELF_MAGIC = '\x7fELF'
with open(sys.argv[1], "rb") as f:
buf = f.read(len(ELF_MAGIC))
if buf != ELF_MAGIC:
sys.exit(0)
llvm_objcopy = os.path.join('@LLVM_RUNTIME_OUTPUT_INTDIR@', 'llvm-objcopy')
install_dir = os.path.join(os.getenv('DESTDIR', ''), '@CMAKE_INSTALL_PREFIX@')
link_dir = os.path.join(install_dir, 'lib', 'debug', '.build-id')
sys.exit(subprocess.call([
llvm_objcopy,
'--strip-all',
'--build-id-link-dir=' + link_dir,
'--build-id-link-input=.debug',
'--build-id-link-output=',
sys.argv[1],
]))