[PATCH] D119038: [BOLT] Fix bolt_rt_instr for osx build condition
Amir Ayupov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 7 10:02:33 PST 2022
Amir added inline comments.
================
Comment at: bolt/runtime/CMakeLists.txt:33
-if (CMAKE_CXX_COMPILER_ID MATCHES ".*Clang.*")
+if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
add_library(bolt_rt_instr_osx STATIC
----------------
yota9 wrote:
> alexander-shaposhnikov wrote:
> > alexander-shaposhnikov wrote:
> > > unless I'm missing something this appears to be incorrect.
> > > Basically we used to build the osx runtime library regardless of the host platform
> > > (clang works as a cross compiler).
> > @Amir - the runtime is not linked into BOLT, instead, it's used for creating the final output, thus the target for which we are building the project is not directly related to the target platforms supported by the tool itself.
> The thing is that the clang may not support this target. I'm building it in arm linux env and it fails expectedly
@alexander-shaposhnikov
Thanks for clarifying. My mistake.
@yota9
Are you using custom-built clang? IIUC clang is supposed to be a cross-compiler out of the box. As a workaround, we can group rt_instr targets similar to LLVM_ENABLE_TARGETS and select them at configuration time.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119038/new/
https://reviews.llvm.org/D119038
More information about the llvm-commits
mailing list