summaryrefslogtreecommitdiff
path: root/scripts/construct_context_test.py
diff options
context:
space:
mode:
author Jingwen Chen <jingwen@google.com> 2021-05-25 05:16:48 +0000
committer Jingwen Chen <jingwen@google.com> 2021-05-25 07:01:55 +0000
commit4910976314d1467c6c5a2eb49d9876e54bde94c7 (patch)
tree108b4374c6e0cae858f445901137f5981a385c5f /scripts/construct_context_test.py
parent4fabaf52b0c457b154017d678d1fc56f476b4087 (diff)
Make BUILD file merging slightly smarter.
This change enables checked-in BUILD files like prebuilts/clang/host/linux-x86/BUILD.bazel to be merged cleanly with the bp2build generated one into the synthetic workspace. The checked-in BUILD file contains a package() declaration that bp2build also generates. To avoid double declaration, the BUILD file writer now checks if the BazelTargets contain handcrafted targets. If so, it delegates the package declaration to the handcrafted BUILD file instead. This change also sorts the bp2build targets before the handcrafted ones, and adds a section header to demarcate the two sets of targets. Test: TH Change-Id: I3ecdeaab3226b895b623daf0791d24a657f7a7c6
Diffstat (limited to 'scripts/construct_context_test.py')
0 files changed, 0 insertions, 0 deletions