[PATCH] D96360: [CMake] Delete LLVM_RUNTIME_BUILD_ID_LINK_TARGETS

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 9 11:24:04 PST 2021


MaskRay created this revision.
MaskRay added reviewers: beanz, phosek, smeenai.
Herald added a subscriber: mgorny.
Herald added a reviewer: alexshap.
MaskRay requested review of this revision.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D96360

Files:
  clang/cmake/caches/Fuchsia-stage2.cmake
  llvm/runtimes/CMakeLists.txt
  llvm/runtimes/llvm-strip-link.in


Index: llvm/runtimes/llvm-strip-link.in
===================================================================
--- 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],
-]))
Index: llvm/runtimes/CMakeLists.txt
===================================================================
--- llvm/runtimes/CMakeLists.txt
+++ llvm/runtimes/CMakeLists.txt
@@ -187,14 +187,6 @@
   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 @@
     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}
Index: clang/cmake/caches/Fuchsia-stage2.cmake
===================================================================
--- clang/cmake/caches/Fuchsia-stage2.cmake
+++ clang/cmake/caches/Fuchsia-stage2.cmake
@@ -249,7 +249,6 @@
 
 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 "")


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96360.322455.patch
Type: text/x-patch
Size: 2338 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210209/89078dd8/attachment-0001.bin>


More information about the cfe-commits mailing list