clang/0017-fix-for-missing-DENABLE_AUTOTUNER.patch
liyunfei c27f16c891 Fix for missing -DENABLE_AUTOTUNER in compilation
Signed-off-by: liyunfei <liyunfei33@huawei.com>
(cherry picked from commit aef9587a2e21e688c3b41963d9861986b7386d0c)
2024-09-05 14:29:09 +08:00

17 lines
471 B
Diff

diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt
index 949f12d3ce8c..98fcb6ea1a07 100644
--- a/clang/CMakeLists.txt
+++ b/clang/CMakeLists.txt
@@ -322,6 +322,10 @@ if (BUILD_FOR_OPENEULER)
add_definitions( -DBUILD_FOR_OPENEULER )
endif()
+if (LLVM_ENABLE_AUTOTUNER)
+ add_definitions( -DENABLE_AUTOTUNER )
+endif()
+
# Determine HOST_LINK_VERSION on Darwin.
set(HOST_LINK_VERSION)
if (APPLE AND NOT CMAKE_LINKER MATCHES ".*lld.*")
--