[flang-commits] [flang] [Flang][runtime] Set -target to ignore LLVM_DEFAULT_TARGET_TRIPLE (PR #102916)
Michael Kruse via flang-commits
flang-commits at lists.llvm.org
Thu Aug 15 05:22:48 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})
----------------
Meinersbur wrote:
I would consider `get_target_triple` inconsistent/partially broken at the moment, fixing it is out of the scope of this patch, and the eventual/proper solution will be to use the LLVM_ENABLE_RUNTIME anyway. If this patch addresses the bug without regressing it for others, it seems fine to me. Edge cases like multilib/Apple Rosetta seem to not be that relevant.
https://github.com/llvm/llvm-project/pull/102916
More information about the flang-commits
mailing list