aboutsummaryrefslogtreecommitdiff
path: root/build2/b.cxx
AgeCommit message (Collapse)AuthorFilesLines
2020-03-31Switch to project variable visibility by defaultBoris Kolpackov1-2/+2
2020-02-12Use copyright extracted from COPYRIGHT file for printing build2 versionKaren Arutyunov1-3/+7
2020-02-11Add match_only flag to contextBoris Kolpackov1-3/+4
2020-02-07Drop copyright notice from source codeKaren Arutyunov1-1/+0
2019-11-15Use path_name_view in location and path_name_value in location_valueKaren Arutyunov1-1/+1
2019-11-11Use path_name for `-` to stdin/stdout translationKaren Arutyunov1-1/+1
2019-11-04Add support for configuration exporting and importingBoris Kolpackov1-1/+1
The new config.export variable specifies the alternative file to write the configuration to as part of the configure meta-operation. For example: $ b configure: proj/ config.export=proj-config.build The config.export value "applies" only to the projects on whose root scope it is specified or if it is a global override (the latter is a bit iffy but we allow it, for example, to dump everything to stdout). This means that in order to save a subproject's configuration we will have to use a scope-specific override (since the default will apply to the outermost amalgamation). For example: $ b configure: subproj/ subproj/config.export=.../subproj-config.build This could be somewhat unnatural but then it will be the amalgamation whose configuration we normally want to export. The new config.import variable specifies additional configuration files to be loaded after the project's default config.build, if any. For example: $ b create: cfg/,cc config.import=my-config.build Similar to config.export, the config.import value "applies" only to the project on whose root scope it is specified or if it is a global override. This allows the use of the standard override "positioning" machinery (i.e., where the override applies) to decide where the extra configuration files are loaded. The resulting semantics is quite natural and consistent with command line variable overrides, for example: $ b config.import=.../config.build # outermost amalgamation $ b ./config.import=.../config.build # this project $ b !config.import=.../config.build # every project Both config.export and config.import recognize the special `-` file name as an instruction to write/read to/from stdout/stdin, respectively. For example: $ b configure: src-prj/ config.export=- | b configure: dst-prj/ config.import=-
2019-10-25Add --silent, remap verbosity 0 to 1 while building modules unless silentBoris Kolpackov1-3/+11
Failed that, we may have long periods of seemingly nothing happening (e.g., during implicit bdep sync) while we quietly update the module, which may look like things have hung up.
2019-10-22Add load_builtin_module()Boris Kolpackov1-21/+13
2019-10-22Rename global_mutex_shards to global_mutexesBoris Kolpackov1-3/+3
2019-10-22Move global mutex shards to contextBoris Kolpackov1-15/+12
2019-08-28Add build2_cli_load()Karen Arutyunov1-9/+1
2019-08-28Move cxx build system module to separate libraryKaren Arutyunov1-6/+2
2019-08-28Move c build system module to separate libraryKaren Arutyunov1-5/+2
2019-08-28Move cc build system module to separate libraryKaren Arutyunov1-8/+2
2019-08-28Move bin build system module to separate libraryKaren Arutyunov1-11/+2
2019-08-26Implement auto-import of development build2 buildBoris Kolpackov1-0/+1
2019-08-26Implement updating build system modulesBoris Kolpackov1-2/+2
2019-08-23Introduce notion of build contextBoris Kolpackov1-76/+95
All non-const global state is now in class context and we can now have multiple independent builds going on at the same time.
2019-08-21Make testscripts to ignore user's default options filesKaren Arutyunov1-3/+14
2019-08-21Implement dynamic loading of build system modulesBoris Kolpackov1-41/+44
2019-08-19Revert previous (erroneously pushed to master) commitKaren Arutyunov1-3/+2
2019-08-19Make testscripts to ignore user's default options filesKaren Arutyunov1-2/+3
2019-08-17Add support for default options filesKaren Arutyunov1-5/+46
2019-08-07Improve deadlock diagnostics (suppress stack trace, reword)Boris Kolpackov1-2/+12
2019-08-01Move bash build system module to separate libraryKaren Arutyunov1-6/+7
2019-08-01Move version build system module to separate libraryKaren Arutyunov1-3/+2
2019-07-24Move in build system module to separate libraryBoris Kolpackov1-44/+50
2019-07-05Move config, dist, test, and install modules into libraryKaren Arutyunov1-14/+9
2019-07-02Add workaround for data race in libstdc++'s locale(const locale&, Facet*) ↵Karen Arutyunov1-1/+1
constructor
2019-07-02Minor improvementsBoris Kolpackov1-0/+4
2019-07-01Split build system into library and driverBoris Kolpackov1-20/+27
2019-06-24Constrain access to options to build system driver main() onlyBoris Kolpackov1-44/+70
2019-06-03Adapt to renaming traits alias to traits_type for basic_path, basic_url, and ↵Karen Arutyunov1-1/+1
string_table class templates
2019-05-28Print backtrace to stderr when terminating due to unhandled exceptionKaren Arutyunov1-3/+21
2019-03-14Add support for multiple variable overridesBoris Kolpackov1-23/+6
Now we can do: $ b config.cxx.coptions=-O3 config.cxx.coptions=-O0 Or even: $ b config.cxx.coptions=-O3 config.cxx.coptions+=-g
2019-03-07Move bunch of root scope-only data members to root_extraBoris Kolpackov1-4/+5
2019-03-07Add support for alternative build file/directory naming schemeBoris Kolpackov1-21/+68
Now the build/*.build, buildfile, and .buildignore filesystem entries in a project can alternatively (but consistently) be called build2/*.build2, build2file, and .build2ignore. See a note at the beginning of the Project Structure section in the manual for details (motivation, restrictions, etc).
2019-01-16Update copyright yearKaren Arutyunov1-2/+2
2019-01-14Diagnose target names with multiple trailing slashes as invalidBoris Kolpackov1-1/+1
2018-11-28Add --[no-]mtime-check options to control this behavior at runtimeBoris Kolpackov1-1/+4
By default the checks are enabled only for the staged toolchain.
2018-11-27Add --dump <phase> option, omit state dumping from verbosity level 6Boris Kolpackov1-7/+28
2018-11-14Fallback to loading outer buildfile if there isn't one in src_baseBoris Kolpackov1-21/+74
This covers the case where the target is defined in the outer buildfile which is common with non-intrusive project conversions where everything is built from a single root buildfile.
2018-11-09Add support for relative to base scope command line variable overridesBoris Kolpackov1-32/+49
Currently, if we say: $ b dir/ ./foo=bar The scope the foo=bar is set on is relative to CWD, not dir/. While this may seem wrong at first, this is the least surprising behavior when we take into account that there can be multiple dir/'s. Sometimes, however, we do want the override directory to be treated relative to (every) target's base scope that we are building. To support this we are extending the '.' and '..' special directory names (which are still resolved relative to CWD) with '...', which means "relative to the base scope of every target in the buildspec". For example: $ b dir/ .../foo=bar Is equivalent to: $ b dir/ dir/foo=bar And: $ b liba/ libb/ .../tests/foo=bar Is equivalent to: $ b liba/ libb/ liba/tests/foo=bar libb/tests/foo=bar
2018-08-07Add support for default extension specification, trailing dot escapingBoris Kolpackov1-6/+8
For example: cxx{*}: extension = cxx cxx{foo} # foo.cxx cxx{foo.test} # foo.test (probably what we want...) cxx{foo.test...} # foo.test.cxx (... is this) cxx{foo..} # foo. cxx{foo....} # foo.. cxx{foo.....} # error (must come in escape pair)
2018-07-25Exclude cli and bash modules from bootstrap buildBoris Kolpackov1-3/+6
2018-07-20Implement bash moduleBoris Kolpackov1-0/+4
2018-07-16Implement in moduleBoris Kolpackov1-3/+10
Given test.in containing something along these lines: foo = $foo$ Now we can do: using in file{test}: in{test.in} file{test}: foo = FOO The alternative variable substitution symbol can be specified with the in.symbol variable and lax (instead of the default strict) mode with in.substitution. For example: file{test}: in.symbol = '@' file{test}: in.substitution = lax
2018-06-15Use portable environment variable manipulation functionsKaren Arutyunov1-8/+6
2018-05-19Update copyright yearKaren Arutyunov1-2/+2