-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Marc-André Moreau
committed
Nov 6, 2023
1 parent
48f541c
commit 6fcc60a
Showing
5 changed files
with
151 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
patches/halide-16-add-clang-no-unknown-warning-option.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
From 44bdc4bfa85a83c5bee9bc497f7cb5b88dcc6ff2 Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= <[email protected]> | ||
Date: Mon, 6 Nov 2023 16:29:33 -0500 | ||
Subject: [PATCH] [PATCH] add clang no unknown warning option | ||
|
||
--- | ||
src/CMakeLists.txt | 1 + | ||
1 file changed, 1 insertion(+) | ||
|
||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt | ||
index 84f98033a..9db6c08f5 100644 | ||
--- a/src/CMakeLists.txt | ||
+++ b/src/CMakeLists.txt | ||
@@ -521,6 +521,7 @@ target_compile_options( | ||
$<$<CXX_COMPILER_ID:Clang,AppleClang>:-Wno-undefined-func-template> | ||
$<$<CXX_COMPILER_ID:Clang,AppleClang>:-Wno-unused-member-function> | ||
$<$<CXX_COMPILER_ID:Clang,AppleClang>:-Wno-unused-template> | ||
+ $<$<CXX_COMPILER_ID:Clang,AppleClang>:-Wno-unknown-warning-option> | ||
|
||
# This warning was removed in Clang 13 | ||
$<$<AND:$<CXX_COMPILER_ID:Clang,AppleClang>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,13.0>>:-Wno-return-std-move-in-c++11> | ||
-- | ||
2.25.1 | ||
|
51 changes: 51 additions & 0 deletions
51
patches/halide-16-add-halide-host-tools-dir-cmake-option.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
From 58ad85758391a8058d6fdfebfefc0abae5539630 Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= <[email protected]> | ||
Date: Sat, 21 Jan 2023 10:15:38 -0500 | ||
Subject: [PATCH] add HALIDE_HOST_TOOLS_DIR cmake option | ||
|
||
--- | ||
tools/CMakeLists.txt | 26 ++++++++++++++++++++------ | ||
1 file changed, 20 insertions(+), 6 deletions(-) | ||
|
||
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt | ||
index 0d8ff8e8b..23d7b2496 100644 | ||
--- a/tools/CMakeLists.txt | ||
+++ b/tools/CMakeLists.txt | ||
@@ -2,14 +2,28 @@ | ||
# Build time tools | ||
## | ||
|
||
-add_executable(build_halide_h build_halide_h.cpp) | ||
-target_compile_options(build_halide_h PRIVATE $<$<CXX_COMPILER_ID:MSVC>:/wd4996>) | ||
+if(DEFINED HALIDE_HOST_TOOLS_DIR) | ||
+ add_executable(build_halide_h IMPORTED GLOBAL) | ||
+ set_property(TARGET build_halide_h PROPERTY IMPORTED_LOCATION | ||
+ "${HALIDE_HOST_TOOLS_DIR}/build_halide_h${CMAKE_EXECUTABLE_SUFFIX}") | ||
|
||
-add_executable(binary2cpp binary2cpp.cpp) | ||
-target_compile_options(binary2cpp PRIVATE $<$<CXX_COMPILER_ID:MSVC>:/wd4996>) | ||
+ add_executable(binary2cpp IMPORTED GLOBAL) | ||
+ set_property(TARGET binary2cpp PROPERTY IMPORTED_LOCATION | ||
+ "${HALIDE_HOST_TOOLS_DIR}/binary2cpp${CMAKE_EXECUTABLE_SUFFIX}") | ||
|
||
-add_executable(regexp_replace regexp_replace.cpp) | ||
-target_compile_options(regexp_replace PRIVATE $<$<CXX_COMPILER_ID:MSVC>:/wd4996>) | ||
+ add_executable(regexp_replace IMPORTED GLOBAL) | ||
+ set_property(TARGET regexp_replace PROPERTY IMPORTED_LOCATION | ||
+ "${HALIDE_HOST_TOOLS_DIR}/regexp_replace${CMAKE_EXECUTABLE_SUFFIX}") | ||
+else() | ||
+ add_executable(build_halide_h build_halide_h.cpp) | ||
+ target_compile_options(build_halide_h PRIVATE $<$<CXX_COMPILER_ID:MSVC>:/wd4996>) | ||
+ | ||
+ add_executable(binary2cpp binary2cpp.cpp) | ||
+ target_compile_options(binary2cpp PRIVATE $<$<CXX_COMPILER_ID:MSVC>:/wd4996>) | ||
+ | ||
+ add_executable(regexp_replace regexp_replace.cpp) | ||
+ target_compile_options(regexp_replace PRIVATE $<$<CXX_COMPILER_ID:MSVC>:/wd4996>) | ||
+endif() | ||
|
||
## | ||
# Interface target for enabling PNG/JPEG support in Halide | ||
-- | ||
2.25.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
From 644b27083565e1f6f2b010dc3cdc21259ade9880 Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= <[email protected]> | ||
Date: Sun, 22 Jan 2023 08:01:56 -0500 | ||
Subject: [PATCH] disable autoschedulers | ||
|
||
--- | ||
src/CMakeLists.txt | 4 ++-- | ||
1 file changed, 2 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt | ||
index 809b3efdd..8202c49d5 100644 | ||
--- a/src/CMakeLists.txt | ||
+++ b/src/CMakeLists.txt | ||
@@ -524,8 +524,8 @@ endif () | ||
## | ||
|
||
if (BUILD_SHARED_LIBS) | ||
- message(STATUS "Building autoschedulers enabled") | ||
- add_subdirectory(autoschedulers) | ||
+ #message(STATUS "Building autoschedulers enabled") | ||
+ #add_subdirectory(autoschedulers) | ||
else () | ||
message(STATUS "Building autoschedulers disabled (static Halide)") | ||
endif () | ||
-- | ||
2.25.1 | ||
|
34 changes: 34 additions & 0 deletions
34
patches/halide-16-disable-imported-clang-llvm-executables.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
From dfcb3a317b420e1e5b4f98506f0e9d12a4adb406 Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= <[email protected]> | ||
Date: Sun, 22 Jan 2023 14:40:59 -0500 | ||
Subject: [PATCH] disable imported clang+llvm executable promotion | ||
|
||
--- | ||
dependencies/llvm/CMakeLists.txt | 4 ++++ | ||
1 file changed, 4 insertions(+) | ||
|
||
diff --git a/dependencies/llvm/CMakeLists.txt b/dependencies/llvm/CMakeLists.txt | ||
index 248aaf9ea..a8e613a37 100644 | ||
--- a/dependencies/llvm/CMakeLists.txt | ||
+++ b/dependencies/llvm/CMakeLists.txt | ||
@@ -42,6 +42,8 @@ cmake_dependent_option(Halide_BUNDLE_LLVM "When built as a static library, inclu | ||
# Promote LLVM/Clang executable targets | ||
## | ||
|
||
+if(PROMOTE_IMPORTED_CLANG_LLVM) | ||
+ | ||
set_target_properties(llvm-as clang PROPERTIES IMPORTED_GLOBAL TRUE) | ||
|
||
# clang-tools-extra is optional, but provides the clang-format target | ||
@@ -49,6 +51,8 @@ if (TARGET clang-format) | ||
set_target_properties(clang-format PROPERTIES IMPORTED_GLOBAL TRUE) | ||
endif () | ||
|
||
+endif() | ||
+ | ||
## | ||
# Create options for including or excluding LLVM backends. | ||
## | ||
-- | ||
2.25.1 | ||
|