aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/link-rule.cxx
AgeCommit message (Collapse)AuthorFilesLines
2022-03-10Add reverse_execute_prerequisites() variantBoris Kolpackov1-5/+24
2022-03-10Remove update variable from source of synthesized dependencyBoris Kolpackov1-1/+14
2022-03-09Parallel implementation of update_during_match_prerequisites()Boris Kolpackov1-2/+3
2022-03-08Improve performance of update during match for multiple targetsBoris Kolpackov1-9/+5
2022-03-08Update C/C++ headers and ad hoc sources during match by defaultBoris Kolpackov1-19/+50
Essentially, all headers as well as ad hoc headers and sources are now treated by the cc::link_rule as if they had update=match unless explicit update=execute is specified.
2022-03-08Add update=execute special value for cases where it's not defaultBoris Kolpackov1-1/+1
2022-03-07Add support for update=unmatch|match to ad hoc recipesBoris Kolpackov1-4/+6
2022-03-02Add update operation-specific variable with unmatch|match additional valuesBoris Kolpackov1-10/+94
Note that the unmatch (match but do not update) and match (update during match) values are only supported by certain rules (and potentially only for certain prerequisite types). Additionally: - All operation-specific variables are now checked for false as an override for the prerequisite-specific include value. In particular, this can now be used to disable a prerequisite for update, for example: ./: exe{test}: update = false - The cc::link_rule now supports the update=match value for headers and ad hoc prerequisites. In particular, this can be used to make sure all the library headers are updated before matching any of its (or dependent's) object files.
2022-02-16Get rid of stray variableBoris Kolpackov1-2/+0
2022-02-15Fix stray logic where libue{} was still considered member of libul{}Boris Kolpackov1-10/+27
Fixes GitHub issue #179.
2022-02-10Add note on GNU ar deprecating -T in favor of --thinBoris Kolpackov1-0/+3
2022-02-09Improve commentsBoris Kolpackov1-3/+6
2022-01-21Add search_new() and search_new_locked() variants of search()Boris Kolpackov1-2/+2
2021-11-04Do not apply install scope to update-for-install pre-operationBoris Kolpackov1-0/+7
2021-10-16Skip regenerating .pc files during uninstallBoris Kolpackov1-1/+2
2021-10-07Verify libraries and targets they are linked to a for-install-compatibleBoris Kolpackov1-3/+23
2021-09-28Adapt to libbutl headers extension change from .mxx to .hxxKaren Arutyunov1-1/+1
2021-09-09Handle Emscripten -pthread modeBoris Kolpackov1-0/+15
2021-08-12Add ${c,cxx}.deduplicate_export_libs() functionBoris Kolpackov1-0/+86
This function deduplicates interface library dependencies by removing libraries that are also interface dependencies of the specified libraries. This can result in significantly better build performance for heavily interface-interdependent library families (for example, like Boost). Typical usage: import intf_libs = ... import intf_libs += ... ... import intf_libs += ... intf_libs = $cxx.deduplicate_export_libs($intf_libs)
2021-08-09Merge library hashing and collection into single traversal passBoris Kolpackov1-212/+95
It turns out this is a lot faster on deeply-dependent libraries like Boost while not having any noticeable differences for "sane" projects.
2021-08-05Implement traversal pruning in process_libraries()Boris Kolpackov1-29/+55
2021-07-01Suppress duplicate libraries in pkg-config filesBoris Kolpackov1-27/+1
2021-05-28Tie loose ends in target type/pattern-specific matchingBoris Kolpackov1-5/+7
2021-05-13Add ${c,cxx}.find_system_{header,library}() functionsBoris Kolpackov1-0/+131
2021-05-06Propagate complete match rules from utility libraries in link ruleBoris Kolpackov1-80/+72
This makes sure mixed-language (e.g., C and C++) utility libraries behave as expected.
2021-05-04Handle duplicate suppression of multi-element libraries (-l foo)Boris Kolpackov1-54/+68
See GitHub issue #114 for context.
2021-04-20Track changes to environment in cc rulesBoris Kolpackov1-4/+7
2021-04-09Adjust to butl::process::quite_argument() interface changeBoris Kolpackov1-1/+1
2021-02-11Generalize process_libraries() to allow no picking installed library memberBoris Kolpackov1-11/+13
2021-02-03Propagate relevant options/prerequisites to header unit sidebuildsBoris Kolpackov1-0/+2
2021-01-30Add std::{map, multimap} to types.hxxBoris Kolpackov1-2/+0
Seeing that std::map is becoming a common Buildfile variable type.
2021-01-30Rework include translation supportBoris Kolpackov1-1/+1
See the config.cxx.translate_include variable documentation in cxx/init.cxx for details.
2021-01-22Redo bin.lib.version not to require empty keyBoris Kolpackov1-3/+9
2020-12-14Fix incorrect assert in conditionBoris Kolpackov1-2/+2
2020-12-11Add $cxx.obj_modules() which returns object files for binless modulesBoris Kolpackov1-0/+5
2020-12-11Add support for module interface-only librariesBoris Kolpackov1-34/+142
Also suppress generation of the object file in cases where we don't need it.
2020-12-03Add ability to get absolute library paths from ${c,cxx}.lib_libs()Boris Kolpackov1-4/+9
2020-11-23Suppress duplicates when extracting library options (GitHub issue #114)Boris Kolpackov1-35/+127
2020-11-17Omit default extensions for target types that now have fixed extensionsBoris Kolpackov1-2/+2
2020-11-11Add ${c,cxx}.lib_{poptions,libs,rpaths}() functionsBoris Kolpackov1-36/+36
These functions can be used to query library metadata for options and libraries that should be used when compiling/linking dependent targets, similar to how cc::{compile,link}_rule do it. With this support it should be possible to more or less re-create their semantics in ad hoc recipes.
2020-11-05Initial Emscripten supportBoris Kolpackov1-0/+44
- Target: wasm32-emscripten (wasm32-unknown-emscripten). - Compiler id: clang-emscripten (type clang, variant emscripten, class gcc). - Ability to build executables (.js plus .wasm) and static libraries (.a). Set executable bit on the .js file (so it can be executed with a suitable binfmt interpreter). - Default config.bin.lib for wasm32-emscripten is static instead of both. - Full C++ exception support is enable unless disabled explicitly by the user with -s DISABLE_EXCEPTION_CATCHING=1|2. - The bin module registers the wasm{} target type for wasm32-emscripten.
2020-08-12Adjust linker arguments for LTO parallelizationMatthew Krupcale1-0/+54
GCC 10+ and Clang 4+ support controlling the number of LTO threads/jobs used during linking. Use the build2 scheduler to allocate up to the number of hardware threads to the GCC or Clang linker processes when -flto=auto or -flto=thin is specified, respectively. Otherwise, GCC or Clang will attempt to spawn the number of hardware threads detected for each linker process, which could result in up to n^2 linker threads on a CPU with n hardware threads.
2020-07-13Fold translated *.std options into compiler mode optionsBoris Kolpackov1-1/+0
This way they are accessible in ad hoc recipes.
2020-06-16Move common functionality from cc to binBoris Kolpackov1-1/+1
2020-05-27Initial support for ad hoc recipes (still work in progress)Boris Kolpackov1-19/+5
2020-03-20Generate common .pc file in addition to static/staged when installing lib{}Boris Kolpackov1-9/+49
The common .pc file is produced by ignoring any static/shared-specific poptions and splitting loptions/libs into Libs/Libs.private. It is "best effort", in a sense that it's not guaranteed to be sufficient in all cases, but it will probably cover the majority of cases, even on Windows, thanks to automatic dllimport'ing of functions.
2020-03-17Rename all find*(variable) to lookup*(variable)Boris Kolpackov1-6/+6
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-1/+2
Windows does not allow the manifest file inside to be a symlink for some (probably security) reasons.
2020-02-24Disable /WHOLEARCHIVE workaround for lld-link 9.0.1 and laterBoris Kolpackov1-9/+16
2020-02-07Drop copyright notice from source codeKaren Arutyunov1-1/+0