Fix for missing -DENABLE_AUTOTUNER in compilation

Signed-off-by: liyunfei <liyunfei33@huawei.com>
This commit is contained in:
liyunfei 2024-08-20 20:36:45 +08:00
parent 141e484206
commit aef9587a2e
2 changed files with 22 additions and 1 deletions

View File

@ -0,0 +1,17 @@
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.*")
--

View File

@ -43,7 +43,7 @@
Name: %{pkg_name}
Version: %{clang_version}
Release: 20
Release: 21
Summary: A C language family front-end for LLVM
License: NCSA
@ -68,6 +68,7 @@ Patch13: 0013-Ignored-option-Wa-generate-missing-build-notes.patch
Patch14: 0014-Update-llvm-lit-config-to-support-build_for_openeule.patch
Patch15: 0015-Backport-Defer-the-instantiation-of-explicit-specifier-until-.patch
Patch16: 0016-Add-BiSheng-Autotuner-support-for-LLVM-compiler.patch
Patch17: 0017-fix-for-missing-DENABLE_AUTOTUNER.patch
# Patches for clang-tools-extra
# See https://reviews.llvm.org/D120301
@ -412,6 +413,9 @@ LD_LIBRARY_PATH=%{buildroot}/%{install_libdir} %{__ninja} check-all -C ./_build
%{install_bindir}/git-clang-format
%changelog
* Tue Aug 20 2024 liyunfei <liyunfei33@huawei.com> - 17.0.6-21
- Fix for missing -DENABLE_AUTOTUNER in compilation.
* Tue Jul 30 2024 liyunfei <liyunfei33@huawei.com> - 17.0.6-20
- Disable toolchain_clang build for BiSheng Autotuner support temporary.