python-torch/0001-python-torch-link-with-python.patch
Tom Rix 48192fa108 Initial import
Signed-off-by: Tom Rix <trix@redhat.com>
2023-12-02 15:19:42 -05:00

27 lines
800 B
Diff

From cef92207b79ad53e3fcc1b0e22ba91cb9422968c Mon Sep 17 00:00:00 2001
From: Tom Rix <trix@redhat.com>
Date: Sat, 18 Nov 2023 09:38:52 -0500
Subject: [PATCH] python-torch link with python
Signed-off-by: Tom Rix <trix@redhat.com>
---
torch/CMakeLists.txt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/torch/CMakeLists.txt b/torch/CMakeLists.txt
index 8d5375f320..6f8c7b65c4 100644
--- a/torch/CMakeLists.txt
+++ b/torch/CMakeLists.txt
@@ -312,6 +312,9 @@ add_dependencies(torch_python torch_python_stubs)
add_dependencies(torch_python flatbuffers)
+# Unresolved syms in -lpython
+target_link_libraries(torch_python PUBLIC ${PYTHON_LIBRARIES})
+
if(USE_PRECOMPILED_HEADERS)
target_precompile_headers(torch_python PRIVATE
"$<$<COMPILE_LANGUAGE:CXX>:ATen/ATen.h>")
--
2.42.1