[Lldb-commits] [lldb] [lldb][test] Remove objcopy detection from API tests' CMakeLists.txt (PR #111977)

Vladislav Dzhidzhoev via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 11 03:48:38 PDT 2024


https://github.com/dzhidzhoev created https://github.com/llvm/llvm-project/pull/111977

This commit essentially reverts https://reviews.llvm.org/D30453.

In #109961, objcopy util search code was added to dotest.py. dotest.py should use llvm-X by default if no path to a utility X is provided externally.

However, it doesn't work out for llvm-objcopy, since objcopy path is always overridden with the lines being removed here. It causes a problem with cross-platform testing when objcopy used by cmake doesn't support targets/executable file formats other than native.

I suppose these lines are unnecessary after #109961, so they can be safely removed.

>From fe6e4b9e119f5d11270a59bf7ecab253dc1a394b Mon Sep 17 00:00:00 2001
From: Vladislav Dzhidzhoev <vdzhidzhoev at accesssoftek.com>
Date: Fri, 11 Oct 2024 12:33:03 +0200
Subject: [PATCH] [lldb][test] Remove objcopy detection from API tests'
 CMakeLists.txt

This commit essentially reverts https://reviews.llvm.org/D30453.

In #109961, objcopy util search code was added to dotest.py.
dotest.py should use llvm-X by default if no path to an utility X is
provided externally.

However, it doesn't work out for llvm-objcopy, since objcopy path is
always overriden with the lines being removed here. It causes a problem
with cross-platform testing when objcopy used by cmake doesn't support
targets/executable file formats other than native.

I suppose these lines are not necessary after #109961, so they can be
safely removed.
---
 lldb/test/API/CMakeLists.txt | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/lldb/test/API/CMakeLists.txt b/lldb/test/API/CMakeLists.txt
index 896ce2c8c27724..2548cab5cfb5b8 100644
--- a/lldb/test/API/CMakeLists.txt
+++ b/lldb/test/API/CMakeLists.txt
@@ -96,14 +96,6 @@ if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
   endif()
 endif()
 
-if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows|Darwin")
-  list(APPEND LLDB_TEST_COMMON_ARGS_VAR
-    --env ARCHIVER=${CMAKE_AR} --env OBJCOPY=${CMAKE_OBJCOPY})
-else()
-  list(APPEND LLDB_TEST_COMMON_ARGS_VAR
-    --env OBJCOPY=${LLVM_TOOLS_BINARY_DIR}/llvm-objcopy${CMAKE_EXECUTABLE_SUFFIX})
-endif()
-
 if (NOT "${LLDB_LIT_TOOLS_DIR}" STREQUAL "")
   if (NOT EXISTS "${LLDB_LIT_TOOLS_DIR}")
     message(WARNING "LLDB_LIT_TOOLS_DIR ${LLDB_LIT_TOOLS_DIR} does not exist.")



More information about the lldb-commits mailing list