[clang] 02413b0 - [CMake] Delete LLVM_RUNTIME_BUILD_ID_LINK_TARGETS
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 15 11:06:30 PST 2021
Author: Fangrui Song
Date: 2021-02-15T11:06:23-08:00
New Revision: 02413b097e72a3aab17e0504af135a95c0d300a1
URL: https://github.com/llvm/llvm-project/commit/02413b097e72a3aab17e0504af135a95c0d300a1
DIFF: https://github.com/llvm/llvm-project/commit/02413b097e72a3aab17e0504af135a95c0d300a1.diff
LOG: [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
Added:
Modified:
clang/cmake/caches/Fuchsia-stage2.cmake
llvm/runtimes/CMakeLists.txt
Removed:
llvm/runtimes/llvm-strip-link.in
################################################################################
diff --git a/clang/cmake/caches/Fuchsia-stage2.cmake b/clang/cmake/caches/Fuchsia-stage2.cmake
index 973629e09da1..1c14d2fec404 100644
--- a/clang/cmake/caches/Fuchsia-stage2.cmake
+++ b/clang/cmake/caches/Fuchsia-stage2.cmake
@@ -249,7 +249,6 @@ endif()
set(LLVM_BUILTIN_TARGETS "${BUILTIN_TARGETS}" CACHE STRING "")
set(LLVM_RUNTIME_TARGETS "${RUNTIME_TARGETS}" CACHE STRING "")
-set(LLVM_RUNTIME_BUILD_ID_LINK_TARGETS "${RUNTIME_BUILD_ID_LINK}" CACHE STRING "")
# Setup toolchain.
set(LLVM_INSTALL_TOOLCHAIN_ONLY ON CACHE BOOL "")
diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt
index 243d6ceb2202..1681cd959e07 100644
--- a/llvm/runtimes/CMakeLists.txt
+++ b/llvm/runtimes/CMakeLists.txt
@@ -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}
diff --git a/llvm/runtimes/llvm-strip-link.in b/llvm/runtimes/llvm-strip-link.in
deleted file mode 100755
index a7b8c567faf6..000000000000
--- a/llvm/runtimes/llvm-strip-link.in
+++ /dev/null
@@ -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],
-]))
More information about the cfe-commits
mailing list