summaryrefslogtreecommitdiff
path: root/bin/bootstrap.py
AgeCommit message (Collapse)Author
2023-08-16Introduce configuration variable TOOLCHAIN_CONFIGOliver Reiche
... to pass along toolchain settings for current and future toolchain definitions. Configuration variable COMPILER_FAMILY is replaced by TOOLCHAIN_CONFIG["FAMILY"].
2023-06-06bootstrap: Improve OS/ARCH determinationOliver Reiche
... 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.
2023-05-31Support FINAL_LDFLAGS variable for binariesOliver Reiche
... and set default stack size to 8 MB.
2023-04-27bootstrap: Do not prune non-local-depsOliver Reiche
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.
2023-04-27bootstrap: Write build config to working directoryOliver Reiche
... so in can be used (in combination with the repository config) to build other just targets, such as just-mr.
2023-04-18bootstrap: Replace prebuilt imports by pkgconfigOliver Reiche
2023-04-18bootstrap: Disable -Werror for package buildsOliver Reiche
2023-04-18bootstrap: Support PKG_CONFIG_PATH (and set from LOCALBASE)Oliver Reiche
2023-04-18bootstrap: Use generic toolchain and honor COMPILER_FAMILYOliver Reiche
2023-02-14Package bootstrapping: support copying the needed partsKlaus Aehlig
... while following symbolic links. In this way, bootstrapping is possible against preinstalled dependencies that symbolic links or special files in their directories.
2023-02-09bootstrap.py: Add env variable NON_LOCAL_DEPSMichael Thies
... 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>
2023-01-24bin/boostrap.py: support dropping of repositoriesKlaus Aehlig
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.
2022-12-21Bootstrap: Exclude other_tools folder from source files gatheringPaul Cristian Sarbu
2022-12-09rules: Refactoring and minor improvementsOliver Reiche
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
2022-11-03also honor additional flags in the early bootstrap phaseKlaus Aehlig
2022-10-31bootstrap: allow overwriting of arKlaus Aehlig
... in the same way, as we support different names for cc and c++.
2022-10-28bootstrap: be consistent with the desired compilerAlberto Sartori
2022-10-26bootstrap: honor CC and CXX from build configurationKlaus Aehlig
... also in the first phases of the bootstrap procedure. Co-authored-by: Oliver Reiche <oliver.reiche@huawei.com>
2022-10-26bootstrap: Support building bootstrap_just in parallelOliver Reiche
2022-10-26Bootstrap: allow setting build configurationKlaus Aehlig
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.
2022-10-13bootstrap: by default, bootstrap in parallelKlaus Aehlig
Only if the environment variable DEBUG is set, fall back to sequentially executing the graph generated by the bootstrap version of just.
2022-10-12Add copyright and license notice to all source and header filesKlaus Aehlig
Signed-off-by: Goetz Brasche <goetz.brasche@huawei.com>
2022-10-05Bootstrap: Support ARM architecturesOliver Reiche
2022-07-25Support bootstrapping from preinstalled sourcesKlaus Aehlig
For quick development, it is convenient to only need a C++ compiler and python3 and get all dependencies downloaded at the beginning of the bootstrap process. For packaging the tool, however, this is not a valid approach; dependencies should be managed by the packing tool there (so that security updates have to be fixed only at one place). So, for building our tool, the dependencies look like installed to the ambient environment.
2022-06-23Add distdir repo logic to bootstrap.pyPaul Cristian Sarbu
2022-06-23Fix style of bootstrap.pyPaul Cristian Sarbu
2022-04-27bootstrap.py: support header dirs directly stagedKlaus Aehlig
Some libraries, e.g., libgit2, bring an include directory that is expected to occur directly in the search path (containing a git2 directory and a git2.h file). Support this use case by allowing "." as include_name in the bootstrap hints.
2022-04-27use kebab-case for all cmd line argsAlberto Sartori
2022-04-07bin/bootstrap: use top-level default targetKlaus Aehlig
As the default target is also staged canonically, there is no longer the need for the bootstrap script to know the path and staging output of the internal main target.
2022-02-22Initial self-hosting commitKlaus Aehlig
This is the initial version of our tool that is able to build itself. In can be bootstrapped by ./bin/bootstrap.py Co-authored-by: Oliver Reiche <oliver.reiche@huawei.com> Co-authored-by: Victor Moreno <victor.moreno1@huawei.com>