aboutsummaryrefslogtreecommitdiff
path: root/helpers
AgeCommit message (Collapse)Author
2018-03-02Remove Clang-Tools-Extra from old scriptsRenato Golin
The new Python version dropped support for tools-extra but if you want to use the old scripts (because of conflicts with Python imports), the extra repo gets in the way. Not urgent, but worth a change. Change-Id: I2ea47092b474e8f6d3b65a9e2edec3952c199496
2017-04-13[git] Prepare repos with --no-checkoutRenato Golin
This will save space on the main repository, where no one really needs the files checked out anyway. Change-Id: I0414da0e6523b954d0cf90388a53dd423a1855af
2017-04-12Revert "[cron] force arch to v7ve, which is v7a+virt aka A15, to avoid bad ↵Renato Golin
gcc driver choices" This reverts commit 0360ac24913f7654623d3a0b441f625afdbbd9f7. We're using Clang 3.8.0 on our test boards, and that version still didn't have "armv7e". "It worked on my machine" and it took me half a year to reaslise it didn't on the machines. Sigh.
2016-12-16Add -Wall to all buildsDiana Picus
This is kind of a no-brainer and we should've done it long ago. Release builds are reasonably clean with clang. Change-Id: I7929c3b5455245113e8068ea61bcfe1f9616c893
2016-10-26[cron] add -v to make better logsRenato Golin
Change-Id: Ic0fe5d2af95bb2a91ab7943d94cce675264b94f3
2016-10-26[build] Disabling split-dwarf for now due to possible errorsRenato Golin
Change-Id: Ibb5821ad428e87c3bf64f638632167cac51d70a0
2016-10-23[cron] force arch to v7ve, which is v7a+virt aka A15, to avoid bad gcc ↵Renato Golin
driver choices Change-Id: I449e8810c227129335f273acee8f89cd8174424f
2016-10-21[cron] Fix typo redir erasing logfileRenato Golin
Change-Id: I1c929d4119145830044468d1752b4aa7a6580bea
2016-10-20[cron] anti-flog checks for previous PIDRenato Golin
Change-Id: I27758be09fe3c9e1cd7e9f7e0de331dc4fad9594
2016-10-19[build] adding split-dwrf to llvm-build debugRenato Golin
2016-10-12[cron] fix yet another bug diana found :)Renato Golin
Change-Id: I0566bb95c43c6b6b09553102287cfe4f417dfa66
2016-10-12[cron] ignore your own pidRenato Golin
Change-Id: I9141dab09dab959d1706a09e7aa32d258f9bd65c
2016-10-12[cron] Simplify running checkRenato Golin
Change-Id: Ic55229405393f0692f9158df9efa9143f404eeca
2016-10-12[Cron] Add a new crontab builder for debug purposesRenato Golin
To investigate buildbot failures we rely on the ARM boards we have in the rack. But those boards take ~1h to build LLVM+Clang which does limit a lot on how fast we can test and act. To make that task easier, we decided to have a nightly build on the boards, for ARM and Thumb in debug mode, so we can start from a built tree, or at least a partially built tree if we need a more recent ToT. This script was made to work around crontab deficiencies and has been tested on my chromebook at home. It also makes sure it doesn't build if the script is already running or if the machine is busy or recuperating from a long build, as this may mean there's a bisection going on. Change-Id: I74f38c2ba874a4343bfcc9c24bcd8a157980c210
2016-09-17Add LINK_JOBS logic to all three builder scriptsRenato Golin
The stress, helper and bisect build scripts needed the LLVM_LINK_JOBS option to make sure it doesn't run out of memory while linking, especially in SoCs that have a lot more cores than RAM (ex. HiKey). This patch calculates the jobs by seeing how much RAM the target has and adding +1, as link jobs rarely take more than 1GB, but the final ones do use several hundred. Also making sure we don't exceed the number of cores. A few other small changes: * Replace "else if" by "elif" * Build only minimal targets on ARM (even o full build) * Fixed a -j$PARALLEL bug introduced by a prvious commit * Converted a few backticks into $() Change-Id: If4f2189623338d2924357ecd3d4ee18feb522c32
2016-09-15[llvm-build] Force lit tests to run in parallelDiana Picus
This is achieved by setting the CMake option LLVM_LIT_ARGS. If we don't do this, lit may decide that it only needs to run on one core. While we're at it, also update the run.sh that we use for bisects to force ninja to use the right number of cores while building. Change-Id: I099697f4a377541f907d8f13f8f807c2a4f901d6
2016-08-02[helpers] Teach llvm-env to self-hostRenato Golin
In addition to debug builds, this teaches llvm-env to create self-hosted bots that will use the "build" directory of the branch to compile a self-hosted version of the toolchain. It'll use clang and also lld, if available. Review changes: * Check for clang, not just build dir * Use -x instead of -f * Always export LLVM_SELFHOST * Quote strings for good measure * Using LLVM_CMAKE_FLAGS Change-Id: I55af0c213ae06cb8b99a33d1a80a05f09fe64c85
2016-07-22[llvm-build] Add -j optionDiana Picus
Allow the user to override the number of CPUs used for building LLVM. The default remains unchanged, so if you're not going to use the -j flag it won't affect you. Change-Id: I2491274a629a505744a80625381fb2c47bafd4da
2016-07-21Separate install directory for each worktreeDiana Picus
The install directory will be <Worktree>/install, right next to the build and source dirs, and it will be exported in LLVM_INSTALL. Note that this won't affect existing worktree directories, you should either nuke the build directories or manually update CMakeCache.txt for them. Change-Id: I8bb80f8d86d9d2f8d02940fbbd8a2c8b5b1a05e3
2016-06-29[llvm-env] List current worktree directories - ErrataDiana Picus
Forgot to add a patch set before merging (I don't know how I didn't notice that...). Errata for Change-Id: I787594ce1ecea0de68ceb0e518194b783da408b3 Change-Id: Ic3fc33cd643fd5d5f9a6d3280af9ab7c898227bc
2016-06-29[llvm-env] List current worktree directoriesDiana Picus
When running llvm-env without any arguments, it now dumps the current worktrees, as well as the branch that is currently checked out in them (only for llvm, to make it easy to spot places where this is different from the environment name). This is a very hacky implementation, because newer versions of git will come with git worktree list, which does exactly what we want. We can nuke this when we're all ready to move to newer gits. Change-Id: I787594ce1ecea0de68ceb0e518194b783da408b3
2016-06-16Allow people to clone from the RO repoDiana Picus
This is necessary in order to allow people outside TCWG to use our scripts Change-Id: Ia1855be8f5a45d6c8b070c782548b6e7bfb11335
2016-06-16Add option to build a certain target (and -h option)Diana Picus
This should allow us to run make/ninja on a given target, e.g. `llvm-build llc` will build only the llc target `llvm-build check-llvm-codegen-aarch64` will only run a subset of the tests This also adds a -h option. Change-Id: I4b2d195ed7f7f4b23f84438068dd1e13a094e947
2016-06-15Use git worktree in the LLVM helper scriptsDiana Picus
This commit adds a new script, llvm-env, which sets up the environment for working with LLVM. It looks for an environment variable LLVM_ROOT and tries to create the following hierarchy: $LLVM_ROOT `- repos | `- llvm | `- clang | `- compiler-rt | [...] `- <branch1> | `- llvm | `- build | `- debug `- <branch2> | `- llvm | `- build | `- debug [...] The $LLVM_ROOT/repos directory contains all the repositories, as checked out by llvm-prepare, and will always track master. For other branches, llvm-env <branch_name> will create a new directory, $LLVM_ROOT/<branch_name>, and will add an llvm worktree directory there. If -d is passed, it will also create a debug directory there, otherwise it will create a build directory. Notice that these 2 can live in parallel, and we can switch between them at any time by invoking llvm-env. It will set LLVM_SRC and LLVM_BLD accordingly, and also modify the path to point to the binaries in LLVM_BLD. The other scripts will now work with the LLVM_SRC and LLVM_BLD set by llvm-env in the current shell. Because llvm-env controls whether or not we're doing a debug build, llvm-build will no longer take a -d flag (it will instead look after a LLVM_DEBUG environment variable, also set by llvm-env). There are changes in llvm-projs, too, because now it no longer creates links - instead it creates worktree directories in the corresponding $LLVM_ROOT/<branch>/llvm. Other scripts have also been updated accordingly. To make things easier, here are some of the changes that I had to make that are not particularly important for the review (pretty mechanical stuff): * Moved function has() from llvm-branch to llvm-common, so I could reuse it * Because of this, I had to rename the has() function in llvm-projs to has_link(), which is actually a better name for it anyway * Disable the checks for LLVM_SRC and LLVM_BLD in llvm-common Change-Id: I9e02f6d8e0c803e79838845013b81331dffba99c
2016-06-13[helpers] YCM helperRenato Golin
YouCompleteMe helper, updates the YCM config file once YCM-Generator creates one for you. The steps are: * Install YCM / Generator * Inside Vim, on $LLVM_SRC, run :YcmGenerateConfig * Outside vim, with llvm-env on the same workdir run: llvm-ycm * Re-start vim, all is good Why is this needed? 1. YCM relies on .ycm_extra_conf.py to be precise and correct 2. LLVM includes headers and libraries from both source and build dirs 3. YCM-Generator has no idea about the build dir, so it uses /tmp Note: * You will need to do this for each workdir, as the path has to be absolute * Don't use CMake's compilation_database.json, or header files won't work Change-Id: If14008d96d7198060cb403439db55c234693c837
2016-05-20Use LLVM_SVNUSER in the checkout linkDiana Picus
Change-Id: Icbc93f8019f0c7866ddb5cff93eaddc34426872f
2016-05-12Git user is now necessary to checkout from Linaro's repoRenato Golin
Change-Id: Ic0a8ff81f82896359f2f8e482943710d8d06fa29
2016-05-12Rename llvm-lit to avoid clash with LLVM's oneRenato Golin
Change-Id: Icd03989217359a7d04a530546c0b97ee0ebe108a
2016-05-03Change interface for llvm-projs and llvm-syncDiana Picus
llvm-projs and llvm-sync used to have very inconsistent interfaces. This commit updates the interfaces so that llvm-sync only synchronizes the repos that are linked into the tree by llvm-projs (this makes it consistent with llvm-branch and other scripts) and also revamps the interface provided by llvm-projs to allow some long options for projects that are frequently used together as well as short options for fine tuning whether or not to link each project. Change-Id: Iffdbc8d7956473d09c8161d6fb773c530e5b4d79
2016-04-27Bugfix: Actually create the build directoryDiana Picus
Due to a typo, llvm-build would fail to create the build directory if it didn't exist (and subsequently failed to cd to it and started building in the wrong place). This fixes the typo, and also runs the mkdir with safe_run, so we can bail out if something goes wrong. Change-Id: I9ffe72a04e9e0643bb37298bf7668d39c2f3600e
2016-04-27Typos & nitpicksDiana Picus
Fix some typos in the READMEs. Nit #1: Use full path when cloning repo If we use the basename, we're forced to run the script from the directory where we want the whole thing to live. By using the full path, we can run the script from anywhere. Nit #2: Use more general name for variable (generator vs ninja) Nit #3 (noticed by Renato): Set generator explicitly in llvm-build When ninja is not found, we use make for the build. However, we don't tell cmake about it and instead let it choose its own default generator. This commit explicitly sets the cmake generator to "Unix Makefiles", in case cmake's default generator for the current platform is not make. In order to get this to work, it was necessary to make some changes to the safe_run helper function, so we wouldn't lose the quotes around "Unix Makefiles". Change-Id: I9592645d517d006b0e680a2996d498e57f009400
2016-04-26Don't create links in llvm-prepareDiana Picus
It's a good idea to keep the knowledge about links in as few places as possible, and we already have a script that deals with links in particular: llvm-projs. With this change, building llvm after running llvm-prepare will by default build only llvm (without clang, compiler-rt etc). In order to build other projects as well, it will be necessary to run llvm-projs with the corresponding args. This commit also contains a nit: extracting the repo paths into variables (gitroot and svnroot). Change-Id: I85719b5ba4866b74e9983584eeabc7e79016d1c9
2016-04-26Merge "Add clang-tools-extra, lld and lldb to the scripts"Renato Golin
2016-04-26Better error reporting in llvm-syncDiana Picus
Report an error if trying to sync a repo that does not exist Change-Id: Ifa2c27daa6a2c51a79bfdb57069478e07ff293d6
2016-04-26Add clang-tools-extra, lld and lldb to the scriptsDiana Picus
The scripts aren't very consistent about which repos they handle (e.g. clang-tools-extra was handled in llvm-prepare, but not in the other scripts). This commit tries to improve on that by: * adding support for clang-tools-extra in llvm-projs, llvm-sync and llvm-branch * adding support for lld and lldb to llvm-branch. Change-Id: I82b0aeb95b5116d1d75f0721e0c4d31c4744e04b
2016-04-26Initial Commit, moving from dev-private and removing private stuffRenato Golin