[PATCH] D117263: [CMake] Support runtimes targets without specifying triple

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 13 16:53:32 PST 2022


phosek created this revision.
phosek added reviewers: beanz, smeenai.
Herald added a subscriber: mgorny.
phosek requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Currently, for BUILTIN_TARGETS and RUNTIME_TARGETS you can either use
the special "default" value, or a target triple.

      

For the "default" value, we don't set any target triple and passthrough
a subset of CMake variables into the subbuild. This is typically used
on Darwin where we build universal binaries and a single target triple
therefore isn't sufficient.

      

For the target triple value, you can set arbitrary CMake variables
through RUNTIMES_<target>_<variable>, but we always set target triple
to <target>. This gives more flexibility, because we can precisely
control what variables are set in the subbuild, but is unsuitable for
platforms like Darwin.

      

To address this, we would like to introduce a third option which is
similar to the second option, except we won't set target triple in
the subbuild (you can always do so yourself by setting the appropriate
CMake variable, e.g. RUNTIMES_<name>_CMAKE_C_COMPILER_TARGET=<triple>).

      

This change is a first step in that direction, by eliminating the support
of target triples from builtin_register_target and runtime_register_target
helper functions.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D117263

Files:
  llvm/runtimes/CMakeLists.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117263.399839.patch
Type: text/x-patch
Size: 9458 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220114/4a3869e0/attachment.bin>


More information about the llvm-commits mailing list