This is an archive of the discontinued LLVM Phabricator instance.

[gn build] Make 'compiler-rt' depend on include dir
ClosedPublic

Authored by thakis on Oct 21 2021, 10:38 AM.

Details

Summary

That way, the headers in llvm/utils/gn/secondary/compiler-rt/include
are copied when running ninja compiler-rt. (Previously, they were
only copied when running check-hwasan or when building the
compiler-rt/include target.)

(Since they should be copied only once, depend on the target in the
host toolchain. I think default_toolchain should work just as well,
it just needs to be a single fixed toolchain. check-hwasan depends
through host_toolchain, so let's use that here too.)

Prevents errors like

testing/fuzzed_data_provider.h:8:10: fatal error: 'fuzzer/FuzzedDataProvider.h' file not found

when building with locally-built clang. (For now, you still have to
explicitly build the 'compiler-rt' target. Maybe we should make the
clang target depend on that in the GN build?)

Diff Detail

Event Timeline

thakis created this revision.Oct 21 2021, 10:38 AM
thakis requested review of this revision.Oct 21 2021, 10:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 21 2021, 10:38 AM
lgrey accepted this revision.Oct 21 2021, 11:28 AM
This revision is now accepted and ready to land.Oct 21 2021, 11:28 AM
This revision was automatically updated to reflect the committed changes.