This is an archive of the discontinued LLVM Phabricator instance.

[runtimes] Allow passing individual parameters to the default target runtimes/builtins
AcceptedPublic

Authored by mstorsjo on Mar 9 2023, 3:47 AM.

Details

Reviewers
phosek
thieta
Summary

Currently, one can pass extra parameters to builds of runtimes
for specific targets, by setting them as e.g.
RUNTIMES_<targetname>_CMAKE_CXX_FLAGS. When not setting
LLVM_RUNTIME_TARGETS (or when it is set to "default"), no flags
are propagated in this way, but one can pass a set of cmake flags
to set via RUNTIMES_CMAKE_ARGS though.

While RUNTIMES_CMAKE_ARGS gives almost the same abilities, it's
slightly more cumbersome less obvious. (This flag is only available
for the runtimes, but not for the builtins.)

Thus, in addition to that existing flag, allow using the same pattern
of prefixing variables with "RUNTIMES_<targetname>_" and
"BUILTINS_<targetname>_", with targetname set to "default".

Diff Detail

Event Timeline

mstorsjo created this revision.Mar 9 2023, 3:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 9 2023, 3:47 AM
mstorsjo requested review of this revision.Mar 9 2023, 3:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 9 2023, 3:47 AM
phosek accepted this revision.Mar 31 2023, 12:21 AM

LGTM after I land D117263 (I still need to figure out why it's failing on Windows), this would let us merge builtin_default_target with builtin_register_target and runtime_default_target with runtime_register_target thus removing a lot of the existing duplication.

This revision is now accepted and ready to land.Mar 31 2023, 12:21 AM