LLDB has many branches in a variety of repositories, and the build-script.py file is subtly different for each set.
This is unnecessary and causes merge headaches.
This patch makes build-script.py consult a directory full of .json files, each one of which matches a particular branch using a regular expression.
Details
- Reviewers
beanz jingham - Commits
- rGefe5d5fe9d7f: Changed builld-llvm.py to use .json files
rGff1fb7f84682: Changed builld-llvm.py to use .json files
rLLDB295922: Changed builld-llvm.py to use .json files
rLLDB295897: Changed builld-llvm.py to use .json files
rL295922: Changed builld-llvm.py to use .json files
rL295897: Changed builld-llvm.py to use .json files
Diff Detail
Event Timeline
• Removed some debug print statements.
• Added the option of an OVERRIDE.json file to disable regex-based matching if the user knows what they are doing.
• Added a FALLBACK configuration file that reflects what the branch was cut from, allowing e.g. pull requests or branches without losing auto-checkout.
• Re-generate FALLBACK whenever we successfully detect a branch configuration so that it is as close as possible to what we last used
There should be some doc describing this process. Yes I know none of this is really documented, but since this seems actually useful, we should document it.
scripts/Xcode/build-llvm.py | ||
---|---|---|
48–49 | Do you really want to exit here? You should really fall back to the fallback file. | |
50–51 | It looks like find exits in all the bad cases, and with a better error message since it knows what it did wrong, so this in unnecessary. | |
scripts/Xcode/repo.py | ||
43 | Put in the actual path that you looked for the fallback file in. |
Updated to reflect Jim's comments:
• Removed redundant errors
• Improved existing errors
• Added documentation
Do you really want to exit here? You should really fall back to the fallback file.