File: 0004-Disable-LTO-for-python-stub.patch

package info (click to toggle)
halide 21.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 55,420 kB
  • sloc: cpp: 289,327; ansic: 22,751; python: 7,486; makefile: 4,299; sh: 2,508; java: 1,549; javascript: 282; pascal: 207; xml: 127; asm: 9
file content (24 lines) | stat: -rw-r--r-- 789 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From: Roman Lebedev <lebedev.ri@gmail.com>
Date: Sat, 27 Jul 2024 06:31:53 +0300
Subject: Disable LTO for python stub

`Halide_PyStubs` static library is installed,
but if we build Halide with LTO, it, obviously,
contains Clang/LLVM IR representation,
not assembly code, so things go awry.

Forwarded: not-needed
---
 python_bindings/stub/CMakeLists.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/python_bindings/stub/CMakeLists.txt b/python_bindings/stub/CMakeLists.txt
index e9033d3..dd1f3b6 100644
--- a/python_bindings/stub/CMakeLists.txt
+++ b/python_bindings/stub/CMakeLists.txt
@@ -1,3 +1,5 @@
+set(CMAKE_INTERPROCEDURAL_OPTIMIZATION OFF)
+
 add_library(Halide_PyStubs STATIC ${CMAKE_CURRENT_LIST_DIR}/PyStubImpl.cpp)
 add_library(Halide::PyStubs ALIAS Halide_PyStubs)