wanghan-sanechips commented on code in PR #3053:
URL: https://github.com/apache/kvrocks/pull/3053#discussion_r2269107243


##########
CMakeLists.txt:
##########
@@ -16,6 +16,12 @@
 # under the License.
 
 cmake_minimum_required(VERSION 3.16)
+if(DEFINED ENV{RISCV_CROSSCOMPILE})
+    set(CMAKE_SYSTEM_NAME Linux CACHE STRING "")
+    set(CMAKE_SYSTEM_PROCESSOR riscv64 CACHE STRING "")
+    set(CMAKE_CROSSCOMPILING TRUE CACHE BOOL "")
+endif()

Review Comment:
   Thanks for the feedback! I've switched to using proper CMake toolchain files 
as suggested and removed the RISCV_CROSSCOMPILE env var dependency.
   
   The key improvements made include:
   1.Created dedicated toolchain files (cmake/riscv64.cmake) for 
cross-compilation configurations
   2.Removed all dependencies on the RISCV_CROSSCOMPILE environment variable
   3.Updated the build system to use -DCMAKE_TOOLCHAIN_FILE for 
cross-compilation
   4.Modified the CI workflows to use the new toolchain file approach
   
   Appreciate the suggestion - this is indeed a cleaner approach.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to