This is an archive of the discontinued LLVM Phabricator instance.

[gn build] Process .def.in files in llvm/include/Config and that to add a build file for llvm/lib/Target
ClosedPublic

Authored by thakis on Dec 2 2018, 4:50 PM.

Details

Summary

Tweak write_cmake_config.py to also handle variable references looking @FOO@ (matching CMake's configure_file() function), and make it replace '\' 'n' in values with a newline literal since there's no good portable way of passing a real newline literal on a command line.

Use that to process all the .def.in files in llvm/include/Config and add llvm/lib/Target, which (indirectly, through llvm-c/Target.h) includes them.

Diff Detail

Repository
rL LLVM

Event Timeline

thakis created this revision.Dec 2 2018, 4:50 PM
thakis added a comment.Dec 5 2018, 4:13 PM

phosek: ping

phosek accepted this revision.Dec 5 2018, 11:53 PM

LGTM

llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
368 ↗(On Diff #176307)

Can you please also provide an error message?

398 ↗(On Diff #176307)

Can you put spaces between each target to visually separate them?

This revision is now accepted and ready to land.Dec 5 2018, 11:53 PM
thakis marked 2 inline comments as done.Dec 6 2018, 9:45 AM
This revision was automatically updated to reflect the committed changes.