Age | Commit message (Collapse) | Author |
|
... to pass along toolchain settings for current and future
toolchain definitions. Configuration variable
COMPILER_FAMILY is replaced by TOOLCHAIN_CONFIG["FAMILY"].
|
|
|
|
The command 'git add .' does not include paths found in .gitignore
files in the directory tree where the command is issued. This is
not the desired behaviour, as we expect for a tree with a given
commit id to contain all of the entries, irrespective of their
meaning to Git.
This commit addresses the issue as described.
For the just-mr.py script we modified the staging command to
'git add -f .'.
For the compiled just-mr, simply adding the force flag to
'git_index_add_all' did not work as intended for files found in
ignored subdirectories. This is a known libgit2 issue which has
been fixed in v1.6.3. Until we can upgrade our libgit2 version,
a workaround was implemented: we recursively read the directory
entries ourselves and add each of them iteratively using
'git_index_add_bypath', making sure to ignore the root '.git'
subtree (which cannot be staged).
At the moment the handling of Git submodules remains an open issue,
as Git does not allow '.git' subtrees to be forcefully added to the
index, and thus such directory entries will currently not be
considered as part of a git tree. This however is consistent
behavior between Git and libgit2.
|
|
... by making variables `os` and `arch` accessible to
bootstrap hints. Furthermore, support the hints `os_map`
and `arch_map` for mapping Justbuild's OS/ARCH to the
terminology used by the repository. Values not covered by
these maps will be passed through.
|
|
... and set default stack size to 8 MB.
|
|
In the definition of a repository, the workspace root (given by
the key "repository") can contain either a description of that
root (where to fetch it, whast to expect) or simply a reference
to (the workspace root of) another repository. In the latter case,
the referenced repository has to be imported as a layer, just as if
had been specified as target_root, rule_root, or expression_root.
|
|
Add an option --plain pretending that the remote repository
configuration is the canonical single-repository one. In this way,
repositories not having a multi-repository configuration (e.g.,
code built with a foreign build system) can be imported in the same
way to a template, thus providing a more uniform interface. This
can also be useful, if a repository is to be imported completely
without its transitive dependencis.
|
|
Dependencies (type archive/zip) that are not required for
bootstrapping just are usually marked with the hint "drop",
in order to avoid fetching non-required archives. This
affects only non-local dependencies, as local dependencies
(from the system) will not fetch anything and therefore do
not need to be dropped.
With this commit, the "drop" hint for declared
non-local-deps will be ignored during package builds. In
this way, the user can specify dependencies that should not
be dropped (despite not strictly required to bootstrap
just). Consequently, those dependencies remain in the
generated bootstrap configuration, in case the user wants to
use this configuration to build other targets, such as
just-mr.
|
|
... so in can be used (in combination with the repository
config) to build other just targets, such as just-mr.
|
|
... as in this way, the setup is more close to the one used in
our build tool. In particular, tools that search for auxilliary
files relativ to their own location get confused less.
|
|
|
|
|
|
|
|
|
|
|
|
... both with respect to just options and the man page specifications.
Option -L of just-mr was reassigned as a short name for
--local-launcher, matching its use in just. Its place is now
correctly held by the full name option --checkout-locations, as
per the section-1 man page.
|
|
|
|
... while following symbolic links. In this way, bootstrapping
is possible against preinstalled dependencies that symbolic links
or special files in their directories.
|
|
... to indicate, in case of a package build, which dependencies
should not be taken from the local environment. As those need a
different target root (and potentially other roots), we keep a
copy of file roots modified when transitioning to local builds and
rewrite the changed file roots in the NON_LOCAL_DEPS accordingly.
Co-authored-by: Klaus Aehlig <aehlig@linta.de>
|
|
Not all repositories mentioned in the repository configuration are
needed to boostrap just (e.g., because they are used for testing).
Support dropping dependencies for bootstrapping by replacing them
by a reference to an empty directory and in this way have less
files that need to be fetched.
|
|
In Python the json of a dict does not guarantee an order, while in
our internal just-mr implementation the json always has the keys
sorted. Also, the JSON dump in Python does not by default use the
most compact representation. This change fixes these issues and
makes the two just-mr versions produce the same distdir content id.
|
|
|
|
... to allow simple chaining of imports.
|
|
|
|
The main repository to be imported should be treated special,
whenever given. This has to be verified as the parameter not being
None, rather than being true, as the empty string (a traditional
name for the main repository) is also a false value in python.
|
|
just-mr is designed to store everything that can be reported as git
tree entirely in git only. To avoid recomputation, just-mr keeps index
files mapping the description of a repository to the corresponding
git trees. For these index files to be useful, the computation of
the key has to be independent of the presence of the respective
archives in CAS. This will become even more important once garbage
collection will be added. Fix this for distdir repositories.
|
|
|
|
The value of --just option should be used as-is,
as it might be a var in PATH. The `execvp` call will handle this.
The Python script and man page have been updated accrodingly.
|
|
|
|
Compared to the previous commit, the action graphs for just
and its unit tests are unchanged.
- Git hash of action graph for ["",""]:
c6e75f17abd7ffaab6ff9bb725ad67ec0bf6c973
- Git hash of action graph for ["test/buildtool","TESTS"]:
8063dfb3dd7daa9ae01d95c177e14946f785c57e
Refactor:
- "local cflags" to "private-cflags"
- "local defines" to "private-defines"
- "link externals" to "private-ldflags"
- "deps" to "private-deps" for (test) binaries
- "proto" to "private-proto" for binaries
Improvements:
- consistent variable declaration order:
OS, ARCH, HOST_ARCH, TARGET_ARCH,
CC, CXX, CFLAGS, CXXFLAGS, ADD_CFLAGS, ADD_CXXFLAGS,
AR, ENV, PATH
- use fields close to their definition (in RULES)
- use common expression for binaries and test binaries
- split expression "flags" and "compiler"
... to separate ones for CC and CXX.
- rename "transition" to "deps-transition"
... to avoid conflicts with other transitions.
- support "defaults-transition" for CC expressions
Implement:
- "cflags" for libraries
- "private-cflags" for (test) binaries
- "private-defines" for test binaries
- "private-ldflags" for test binaries
- (public) "defines" for libraries
|
|
If norc options is given then no checks for the rc_path (e.g.,
whether it points to a file or not) should even be considered.
|
|
|
|
... assuming this repo already uses just and has a multi-repository
configuration committed. In the import, transitive dependencies, as
well as repositories serving as layers, are taken into account, and
"file" repositories are rewritten to be subdirs of the repository
imported. The imported repositories are renamed to reflect the
repository pulling them in, extending the name appropriately to
avoid conflicts. This renaming is reflected in the bindings and
layer references of the imported repositories as well.
In this simple version, no automatic deduplication of imported
repositories to already existing repositories is made, but the
user can specify that certain foreign repositories should not be
imported and mapped to already present repositories.
|
|
|
|
|
|
... in the same way, as we support different names for cc and c++.
|
|
|
|
... also in the first phases of the bootstrap procedure.
Co-authored-by: Oliver Reiche <oliver.reiche@huawei.com>
|
|
|
|
When constructing the build configuration for the bootstrap
build is just, start with the value of the environment variable
JUST_BUILD_CONF, if set, instead of the empty object. While there,
also propagate SOURCE_DATE_EPOCH from the environment to the build
configuration.
|
|
|
|
|
|
|
|
|
|
This commit also introduces an incompatible change, since it modifies the way
how files are stored in the just cache directory. This modification reduces the
number of files per directory and only introduces a maximum number new
directories to avoid possible performance bottlenecks.
|
|
This change is introduced to be prepared for future changes such as garbage
collection. It is an incompatible change compared to earlier just versions
since it modifies the local path to the just cache directory, where among
others the CASes, action cache, target-level cache are located.
|
|
Only if the environment variable DEBUG is set, fall back to sequentially
executing the graph generated by the bootstrap version of just.
|
|
|
|
Signed-off-by: Goetz Brasche <goetz.brasche@huawei.com>
|
|
|