aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/algorithm.cxx
AgeCommit message (Collapse)AuthorFilesLines
2022-02-09Add perform_clean_group_extra()Boris Kolpackov1-123/+137
2022-02-07Make match_inc_dependents() part of public APIBoris Kolpackov1-1/+1
2022-01-21Add search_new() and search_new_locked() variants of search()Boris Kolpackov1-0/+22
2021-09-16Fix diagnostics corner case in perform_clean_extra()Boris Kolpackov1-5/+5
2021-08-05Avoid normalizing likely already normalized directories in search_existing()Boris Kolpackov1-1/+8
2021-06-08Implement ad hoc regex pattern rule supportBoris Kolpackov1-60/+102
An ad hoc pattern rule consists of a pattern that mimics a dependency declaration followed by one or more recipes. For example: exe{~'/(.*)/'}: cxx{~'/\1/'} {{ $cxx.path -o $path($>) $path($<[0]) }} If a pattern matches a dependency declaration of a target, then the recipe is used to perform the corresponding operation on this target. For example, the following dependency declaration matches the above pattern which means the rule's recipe will be used to update this target: exe{hello}: cxx{hello} While the following declarations do not match the above pattern: exe{hello}: c{hello} # Type mismatch. exe{hello}: cxx{howdy} # Name mismatch. On the left hand side of `:` in the pattern we can have a single target or an ad hoc target group. The single target or the first (primary) ad hoc group member must be a regex pattern (~). The rest of the ad hoc group members can be patterns or substitutions (^). For example: <exe{~'/(.*)/'} file{^'/\1.map/'}>: cxx{~'/\1/'} {{ $cxx.path -o $path($>[0]) "-Wl,-Map=$path($>[1])" $path($<[0]) }} On the left hand side of `:` in the pattern we have prerequisites which can be patterns, substitutions, or non-patterns. For example: <exe{~'/(.*)/'} file{^'/\1.map/'}>: cxx{~'/\1/'} hxx{^'/\1/'} hxx{common} {{ $cxx.path -o $path($>[0]) "-Wl,-Map=$path($>[1])" $path($<[0]) }} Substitutions on the left hand side of `:` and substitutions and non-patterns on the right hand side are added to the dependency declaration. For example, given the above rule and dependency declaration, the effective dependency is going to be: <exe{hello} file{hello.map>: cxx{hello} hxx{hello} hxx{common}
2021-06-08Redo fallback reverse operation machinery in ad hoc recipesBoris Kolpackov1-13/+30
2021-05-12Keep phase locked while working own queueBoris Kolpackov1-11/+5
2021-04-02Add support for propagating project environmentBoris Kolpackov1-25/+51
2021-03-19Redo entering of src directories into scope_mapBoris Kolpackov1-2/+2
2020-12-14Fix bug in create_new_target_locked()Karen Arutyunov1-1/+1
2020-12-11Add search_locked() versions of search() functionsBoris Kolpackov1-0/+11
2020-12-03Add match_rule() in addition to match_recipe()Boris Kolpackov1-6/+2
2020-11-06Add support for test timeoutsKaren Arutyunov1-1/+1
2020-10-20Add operation callback for adhoc rule match and applyBoris Kolpackov1-11/+33
2020-09-24Give hints for common causes of "no rule to update ..." errorBoris Kolpackov1-1/+50
2020-08-25Fix bug in interaction of unmatch logic with target groupsBoris Kolpackov1-1/+1
2020-08-10Allow holes in group_view arrayBoris Kolpackov1-1/+9
2020-07-13Add ability to extend rule interface in source-compatible mannerBoris Kolpackov1-3/+6
2020-06-08Hash ad hoc prerequsites for ad hoc recipe change detectionBoris Kolpackov1-6/+1
2020-06-08Fix handling of inner/outer operations in ad hoc recipes machineryBoris Kolpackov1-11/+12
2020-06-05Add ability to specify ad hoc recipe actionsBoris Kolpackov1-12/+24
We are reusing the buildspec syntax for that.
2020-05-28Allow calling certain search_existing() versions during load phaseBoris Kolpackov1-5/+0
This is necessary for $target.path() implementation.
2020-05-27Initial support for ad hoc recipes (still work in progress)Boris Kolpackov1-6/+52
2020-04-30Rename target::member to target::adhoc_memberBoris Kolpackov1-5/+9
2020-04-27Add another search_existing() overloadBoris Kolpackov1-0/+16
2020-03-20Tighten add_adhoc_member() against racesBoris Kolpackov1-14/+17
2020-03-17Fix backlinking code to follow symlinks in hardlink targetsBoris Kolpackov1-2/+11
2020-03-17Rename all find*(variable) to lookup*(variable)Boris Kolpackov1-1/+1
Now we consistently use term "lookup" for variable value lookup. At some point we should also rename type lookup to binding and get rid of all the lookup_type aliases.
2020-03-10Force hard links inside backlinked DLL assembly directoryBoris Kolpackov1-3/+5
Windows does not allow the manifest file inside to be a symlink for some (probably security) reasons.
2020-02-07Drop copyright notice from source codeKaren Arutyunov1-1/+0
2019-11-16Handle dry-run mode in backlinking implementationBoris Kolpackov1-11/+25
2019-08-30Cutoff diagnostics stack when switching to nested contextBoris Kolpackov1-0/+4
2019-08-23Introduce notion of build contextBoris Kolpackov1-139/+179
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-15Implement libs_paths symlinking support on WindowsBoris Kolpackov1-9/+3
Also, temporarily enable libs_paths::link on Windows for testing.
2019-08-14Use new mkanylink() from libbutlBoris Kolpackov1-38/+39
2019-08-01Fix linkage failure due to inline functions defined in ↵Karen Arutyunov1-1/+67
libbuild2/algorithm.ixx and referred from libbuild2/target.txx
2019-07-05Preserve timestamp when copying backlinkBoris Kolpackov1-1/+2
2019-07-01Split build system into library and driverBoris Kolpackov1-0/+2205