[PATCH] D121822: [bootstrap] Allow passing options to sub-builds for all targets
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 17 16:40:24 PDT 2022
phosek accepted this revision.
phosek added a comment.
This revision is now accepted and ready to land.
I like this!
> This is useful for customizing a sub-build for all targets. Note that
> we could also simply allow passing through options without prefixing
> them with RUNTIMES_ but this tries to be consistent with what already
> exists for per-target passthroughs.
I'd be fine with that, but in that case I'd prefer changing the per-target passthrough to be more consistent and the question is what would that look like.
What I could come up with is `<project>_<option>_<target>` or `<project>_<target>_<option>`, so `LIBCXX_TEST_CONFIG_x86_64-linux-gnu=<config>` or `LIBCXX_x86_64-linux-gnu_TEST_CONFIG=<config>` but there might be other ways.
================
Comment at: llvm/runtimes/CMakeLists.txt:350-356
+ foreach(variableName ${variableNames})
+ if (variableName MATCHES "RUNTIMES_${runtime_upper}_.+")
+ string(REPLACE "RUNTIMES_" "" new_name "${variableName}")
+ string(REPLACE ";" "|" new_value "${${variableName}}")
+ list(APPEND ${name}_extra_args "-D${new_name}=${new_value}")
+ endif()
+ endforeach()
----------------
We should turn this into a function to avoid duplication but that can be done in a follow up change.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121822/new/
https://reviews.llvm.org/D121822
More information about the llvm-commits
mailing list