[flang-commits] [flang] [Flang][runtime] Set -target to ignore LLVM_DEFAULT_TARGET_TRIPLE (PR #102916)
Jonathon Penix via flang-commits
flang-commits at lists.llvm.org
Wed Aug 14 14:40:55 PDT 2024
================
@@ -84,7 +84,10 @@ if (NOT CMAKE_CROSSCOMPILING)
set(include_in_link FALSE)
if(${filename} IN_LIST MODULES_WITH_IMPLEMENTATION)
set(object_output "${CMAKE_CURRENT_BINARY_DIR}/${filename}${CMAKE_CXX_OUTPUT_EXTENSION}")
- set(compile_with -c -o ${object_output})
+ # flang-new defaults to LLVM_DEFAULT_TARGET_TRIPLE as target, but
+ # currently we can build the runtime for the same target as the host
+ # compiler.
+ set(compile_with -target ${LLVM_TARGET_TRIPLE} -c -o ${object_output})
----------------
jonathonpenix wrote:
Hm, I'm not sure what to make of the `get_target_triple` situation. This iteration using `LLVM_HOST_TRIPLE` does result in a successful build for me so if you/the community are ok with (further) inheriting the weirdness around `get_host_triple`, I'd be happy with this patch until the full LLVM runtime integration could (hopefully) happen.
I'm not involved/knowledgeable enough here to approve, etc. but again this does work for me. Thank you for your help with this!
https://github.com/llvm/llvm-project/pull/102916
More information about the flang-commits
mailing list