https://reviews.llvm.org/rGa3172df59c32aac48c113eb7d6a1324aaa95c474 breaks
check-lldb gn build.
Details
- Reviewers
thakis - Commits
- rG08d4d7cb8dc8: [gn build] port a3172df59c32 (check-lldb)
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Thanks!
write_file runs at gn time. Is it possible to instead make an action that writes this as a build step, and then make check-lldb depend on that?
It's a bit more involved: You have to create a python script that writes the output (since action()s always run python scripts). llvm/utils/gn/secondary/clang/tools/libclang/BUILD.gn has an example of an action(), I can help you if you get stuck. (llvm/utils/gn/gn.py help action has some notes too.)
On one hand, write_file is pretty fast. On the other hand, we currently don't need to do any work like this at GN time in LLVM's gn build, and it'd be nice if it stayed that way. (People who don't build check-lldb don't need this file, so it's wasted work.)
And just FYI, iirc check-lldb in the GN build only runs a subset of the tests that run in the CMake build. (Maybe only the lit-based ones? Maybe those are called "API" tests?)
Thanks again for working on unbreaking check-lldb in the GN build :)
Thanks!
llvm/utils/gn/secondary/lldb/test/BUILD.gn | ||
---|---|---|
139 | If you llvm/utils/gn/gn.py format llvm/utils/gn/secondary/lldb/test/BUILD.gn, it'll probably put this on a single line. (But whatever gn's formatter output is correct.) | |
143 | Pass root_build_dir as second arg, then GN will write a relative path in the generated ninja file. As-is works too, but then it writes an absolute path. It's nice if the generated ninja files are machine-independent. (i.e. replace this line with rebase_path(outputs[0], root_build_dir),) | |
151–152 | Please keep alphabetized, put new dep here. (gn format should fix this for you.) |
If you llvm/utils/gn/gn.py format llvm/utils/gn/secondary/lldb/test/BUILD.gn, it'll probably put this on a single line. (But whatever gn's formatter output is correct.)