This is an archive of the discontinued LLVM Phabricator instance.

[runtimes] Pass on RUNTIMES_<target>_... options when using runtime_default_target
AbandonedPublic

Authored by DavidSpickett on Jan 19 2023, 5:49 AM.

Details

Reviewers
MaskRay
phosek
Summary

When configuring with the following:
cmake -S "/home/david.spickett/llvm-project/llvm" -G Ninja -DCMAKE_BUILD_TYPE=Release \

-DLLVM_ENABLE_PROJECTS="clang" -DLLVM_ENABLE_RUNTIMES="compiler-rt;libunwind" \
-DLLVM_USE_LINKER=lld \
-DRUNTIMES_armv8l-unknown-linux-gnueabihf_COMPILER_RT_BUILD_GWP_ASAN=OFF

Prior to this patch BUILD_GWP_ASAN was not passed down to compiler-rt.

If you configured in a different way you would go through runtime_register_target
which does have logic to convert RUNTIMES_<target>_<setting> into just
<setting> to be passed to the sub project normally.

builtin_register_target also does this so I've lifted the code from that
into a function and use that in builtin_register_target and runtime_default_target.

runtime_register_target also handles "name" and "target" being different,
so I have left that as is.

Depends on D139536

Diff Detail

Event Timeline

DavidSpickett created this revision.Jan 19 2023, 5:49 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 19 2023, 5:49 AM
DavidSpickett requested review of this revision.Jan 19 2023, 5:49 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 19 2023, 5:49 AM

The specific use case here is to be able to work around the issue described in https://github.com/llvm/llvm-project/issues/60115. Seems logical that these RUNTIMES_ options would work for the default target too.

DavidSpickett retitled this revision from [runtimes build] Pass on RUNTIMES_<target>_... options when using runtime_default_target to [runtimes] Pass on RUNTIMES_<target>_... options when using runtime_default_target.Jan 19 2023, 6:02 AM

Rebase now the parent has landed.

ping!

Would like to get this onto 16 so that if we find more issues with the runtimes build on Arm, people have an option to work around them.

DavidSpickett abandoned this revision.Apr 17 2023, 9:18 AM

I think either I was not using the options correctly, or https://reviews.llvm.org/D141460 fixes this same thing in a different way.