This is an automated email from the ASF dual-hosted git repository.
tlopex pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/main by this push:
new c45f72d968 [CMAKE] Remove unused Libbacktrace.cmake (#18849)
c45f72d968 is described below
commit c45f72d96821fdfa29962eb1513320f42472f507
Author: Tianqi Chen <[email protected]>
AuthorDate: Sat Feb 28 10:21:20 2026 -0500
[CMAKE] Remove unused Libbacktrace.cmake (#18849)
## Summary
Remove legacy `cmake/libs/Libbacktrace.cmake` which is no longer used.
Libbacktrace is now built through tvm-ffi's own cmake infrastructure.
---
cmake/libs/Libbacktrace.cmake | 66 -------------------------------------------
1 file changed, 66 deletions(-)
diff --git a/cmake/libs/Libbacktrace.cmake b/cmake/libs/Libbacktrace.cmake
deleted file mode 100644
index 2746c846fa..0000000000
--- a/cmake/libs/Libbacktrace.cmake
+++ /dev/null
@@ -1,66 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-# On MacOS, the default C compiler (/usr/bin/cc) is actually a small script
that dispatches to a
-# compiler the default SDK (usually
/Library/Developer/CommandLineTools/usr/bin/ or
-#
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/).
CMake
-# automatically detects what is being dispatched and uses it instead along
with all the flags it
-# needs. CMake makes this second compiler available through the
CMAKE_C_COMPILER variable, but it
-# does not make the necessary flags available. This leads to configuration
errors in libbacktrace
-# because it can't find system libraries. Our solution is to detect if
CMAKE_C_COMPILER lives in
-# /Library or /Applications and switch to the default compiler instead.
-include(ExternalProject)
-
-
-if(CMAKE_SYSTEM_NAME MATCHES "Darwin" AND (CMAKE_C_COMPILER MATCHES "^/Library"
- OR CMAKE_C_COMPILER MATCHES "^/Applications"))
- set(c_compiler "/usr/bin/cc")
- else()
- set(c_compiler "${CMAKE_C_COMPILER}")
-endif()
-
-ExternalProject_Add(project_libbacktrace
- PREFIX libbacktrace
- SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/../../3rdparty/libbacktrace
- BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/libbacktrace
- CONFIGURE_COMMAND
"${CMAKE_CURRENT_LIST_DIR}/../../3rdparty/libbacktrace/configure"
- "--prefix=${CMAKE_CURRENT_BINARY_DIR}/libbacktrace"
- --with-pic
- "CC=${c_compiler}"
- "CFLAGS=${CMAKE_C_FLAGS}"
- "LDFLAGS=${CMAKE_EXE_LINKER_FLAGS}"
- "CPP=${c_compiler} -E"
- "NM=${CMAKE_NM}"
- "STRIP=${CMAKE_STRIP}"
- "--host=${MACHINE_NAME}"
- INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/libbacktrace"
- BUILD_COMMAND make
- INSTALL_COMMAND make install
- BUILD_BYPRODUCTS
"${CMAKE_CURRENT_BINARY_DIR}/libbacktrace/lib/libbacktrace.a"
-
"${CMAKE_CURRENT_BINARY_DIR}/libbacktrace/include/backtrace.h"
- )
-
-# Custom step to rebuild libbacktrace if any of the source files change
-tvm_file_glob(GLOB LIBBACKTRACE_SRCS
"${CMAKE_CURRENT_LIST_DIR}/../../3rdparty/libbacktrace/*.c")
-ExternalProject_Add_Step(project_libbacktrace checkout
- DEPENDERS configure
- DEPENDEES download
- DEPENDS ${LIBBACKTRACE_SRCS}
-)
-
-# create include directory so CMake doesn't complain
-file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/libbacktrace/include)