This is an automated email from the ASF dual-hosted git repository.
tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm-ffi.git
The following commit(s) were added to refs/heads/main by this push:
new 74f53c5 [BUILD][MINOR] Remove --no-as-needed (#276)
74f53c5 is described below
commit 74f53c5710220285ce5f25ad7a09dcfdd683c72f
Author: Tianqi Chen <[email protected]>
AuthorDate: Mon Nov 17 13:52:10 2025 -0500
[BUILD][MINOR] Remove --no-as-needed (#276)
This PR removes --no-as-needed as we don't need it for our extension
build.
---
python/tvm_ffi/utils/_build_optional_torch_c_dlpack.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/python/tvm_ffi/utils/_build_optional_torch_c_dlpack.py
b/python/tvm_ffi/utils/_build_optional_torch_c_dlpack.py
index 984a632..b18c40a 100644
--- a/python/tvm_ffi/utils/_build_optional_torch_c_dlpack.py
+++ b/python/tvm_ffi/utils/_build_optional_torch_c_dlpack.py
@@ -602,11 +602,11 @@ def _run_build_on_linux_like(
default_cflags = ["-std=c++17", "-fPIC", "-O3"]
# Platform-specific linker flags
if IS_DARWIN:
- # macOS doesn't support --no-as-needed and uses @loader_path instead
of $ORIGIN
+ # macOS uses @loader_path instead of $ORIGIN
default_ldflags = ["-shared", "-Wl,-rpath,@loader_path"]
else:
- # Linux uses $ORIGIN and supports --no-as-needed
- default_ldflags = ["-shared", "-Wl,-rpath,$ORIGIN",
"-Wl,--no-as-needed"]
+ # Linux uses $ORIGIN
+ default_ldflags = ["-shared", "-Wl,-rpath,$ORIGIN"]
cflags = default_cflags + [flag.strip() for flag in extra_cflags]
ldflags = default_ldflags + [flag.strip() for flag in extra_ldflags]