Age | Commit message (Collapse) | Author |
|
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
|
|
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
|
|
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
|
|
This is necessary in order to allow people outside TCWG to use our scripts
Change-Id: Ia1855be8f5a45d6c8b070c782548b6e7bfb11335
|
|
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
|
|
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
|
|
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
|
|
Change-Id: Icbc93f8019f0c7866ddb5cff93eaddc34426872f
|
|
Change-Id: Ic0a8ff81f82896359f2f8e482943710d8d06fa29
|
|
Change-Id: Icd03989217359a7d04a530546c0b97ee0ebe108a
|
|
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
|
|
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
|
|
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
|
|
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
|
|
|
|
Report an error if trying to sync a repo that does not exist
Change-Id: Ifa2c27daa6a2c51a79bfdb57069478e07ff293d6
|
|
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
|
|
|