This is an archive of the discontinued LLVM Phabricator instance.

[gn build] Add cfi ignorelist to compiler-rt/lib
ClosedPublic

Authored by aeubanks on Aug 3 2021, 4:39 PM.

Details

Summary

So that building the compiler-rt target also copies the cfi ignorelist

Diff Detail

Event Timeline

aeubanks created this revision.Aug 3 2021, 4:39 PM
aeubanks requested review of this revision.Aug 3 2021, 4:39 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 3 2021, 4:39 PM

not sure what the proper way to do this is

if I remove ($host_toolchain) I get

ninja: warning: multiple rules generate lib/clang/14.0.0/share/cfi_ignorelist.txt. builds involving this target will not be correct; continuing anyway [-w dupbuild=warn]
thakis accepted this revision.Aug 4 2021, 3:53 AM
thakis added inline comments.
llvm/utils/gn/secondary/compiler-rt/lib/BUILD.gn
3

This works. Another approach is to have an if (current_toolchain == default_toolchain) around the cfi:ignorelist target. (But this is fine too.)

This dep is supposed to already be added here though: https://github.com/llvm/llvm-project/blob/main/llvm/utils/gn/secondary/compiler-rt/test/hwasan/BUILD.gn#L38

Does that not work? Or do you want it be built as part of some specific target that doesn't include it yet?

This revision is now accepted and ready to land.Aug 4 2021, 3:53 AM
thakis added inline comments.Aug 4 2021, 3:53 AM
llvm/utils/gn/secondary/compiler-rt/lib/BUILD.gn
3

(In other words, answer "Why?" in the commit description.)

aeubanks edited the summary of this revision. (Show Details)Aug 4 2021, 11:58 AM
This revision was landed with ongoing or failed builds.Aug 4 2021, 11:58 AM
This revision was automatically updated to reflect the committed changes.