[PATCH] D99621: [CMake][Compiler-rt] Make it possible to configure standalone compiler-rt without `LLVMConfig.cmake`.
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 2 13:55:57 PDT 2021
mstorsjo added inline comments.
================
Comment at: compiler-rt/cmake/Modules/CompilerRTMockLLVMCMakeConfig.cmake:36
+ execute_process(
+ COMMAND "${CMAKE_C_COMPILER}" -print-target-triple
+ RESULT_VARIABLE HAD_ERROR
----------------
Clang supports `-dumpmachine` too - is there any functional difference between the two?
================
Comment at: compiler-rt/cmake/Modules/CompilerRTMockLLVMCMakeConfig.cmake:47
+ else()
+ message(FATAL_ERROR
+ "Fetching target triple from compiler \"${CMAKE_C_COMPILER_ID}\" "
----------------
If building with e.g. `-DCMAKE_C_COMPILER_TARGET=<triple> -DCOMPILER_RT_DEFAULT_TARGET_ONLY=TRUE`, which sets `TARGET_TRIPLE` somehow (I don't know offhand where/how), I guess that we shouldn't try to do this detection here, but just go with whatever was provided that way?
It also seems like it's possible to build by just setting `TARGET_TRIPLE` only (without setting `COMPILER_RT_DEFAULT_TARGET_ONLY`) - that kinda works but has odd/unexpected effects for me (by building both i386 and x86_64 at the same time, when I've been used to only building one arch at a time).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99621/new/
https://reviews.llvm.org/D99621
More information about the llvm-commits
mailing list