srkreddy1238 commented on code in PR #17599:
URL: https://github.com/apache/tvm/pull/17599#discussion_r2232534537


##########
ffi/cmake/Utils/AddLibbacktrace.cmake:
##########
@@ -26,6 +26,10 @@ function(_libbacktrace_compile)
     set(_cmake_c_compiler "${CMAKE_C_COMPILER}")
   endif()
 
+  if(DEFINED CMAKE_C_COMPILER_TARGET)
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --target=${CMAKE_C_COMPILER_TARGET}")

Review Comment:
   Was due to cmake does work by specifying ``CMAKE_TOOLCHAIN_FILE`` which 
translate to x86 compiler with option ```--target=....```. Where as 
```configure``` require cross compiler to be specified or explicitly add 
```--target``` option.
   
   Anyway I could handle it with top level cmake invocation to pass cross 
compiler instead of tool chain.



-- 
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