aboutsummaryrefslogtreecommitdiff
path: root/build2/cc/link.cxx
AgeCommit message (Collapse)AuthorFilesLines
2017-02-13Use target:as<> instead of static_cast for target castingBoris Kolpackov1-13/+13
2017-02-13Tighten code that operates during both search/match and executeBoris Kolpackov1-2/+2
2017-02-13Pass const target& to recipesBoris Kolpackov1-59/+63
2017-02-13Implement target_set locking, including extension updateBoris Kolpackov1-2/+2
2017-02-13Store extension in target map key rather than in targetBoris Kolpackov1-1/+1
This is in preparation for locking its modification/access.
2017-02-13Pass const scope& where modification should not happenBoris Kolpackov1-7/+13
2017-02-13Add model mutex, make var_pool const by defaultBoris Kolpackov1-11/+11
2017-01-23Go back to storing scope instead of target in prerequisiteBoris Kolpackov1-4/+4
Turns out this was semantically the right way to do it.
2017-01-20Remove prerequisite caching in scopeBoris Kolpackov1-4/+4
We don't share them often and those that are shared (e.g., cxx{} in obja/objs{}) are lightweight (SOO).
2017-01-19Get rid of extension_poolBoris Kolpackov1-2/+2
2017-01-19Get rid of project_name_poolBoris Kolpackov1-2/+5
With small string optimizations this is most likely a hindrance rather that an optimization.
2017-01-18Ignore prerequisite mtimes that are not linker inputsBoris Kolpackov1-8/+18
This makes sure, for example, that we don't unnecessarily re-link an executable when its testscript prerequisite is changes.
2017-01-09Make use of operator<<(ostream, exception)Karen Arutyunov1-5/+5
2017-01-06Store platform targets as typed target_tripletBoris Kolpackov1-1/+1
2017-01-05Update copyright yearBoris Kolpackov1-1/+1
2016-11-04Adopt to auto_fd introduced to libbutl fdstreams and processKaren Arutyunov1-2/+3
2016-11-04Cleanup match_result messBoris Kolpackov1-5/+5
2016-09-15Add io_error alias for std::ios_base::failureKaren Arutyunov1-2/+2
2016-09-13Fix crashing on unhandled system_error thrown by file_exists()Karen Arutyunov1-0/+1
2016-09-04Adjust to freebsd to bsd target class changeBoris Kolpackov1-2/+2
2016-09-04Fix initializer list lifetime issuesBoris Kolpackov1-14/+10
2016-08-31Improve mixed source (e.g., C and C++) building supportBoris Kolpackov1-1/+6
2016-08-30Fix missing .dll.d cleanup on MinGWBoris Kolpackov1-7/+2
2016-08-30Remove backwards-compatibility kludgesBoris Kolpackov1-3/+0
2016-08-29Implement initial support for library versioningBoris Kolpackov1-98/+244
Currently we only support platform-independent versions that get appended to the library name. The magic incantation is this: lib{foo}: bin.lib.version = @-1.2 This will produce libfoo-1.2.so, libfoo-1.2.dll, etc. In the future we will support things like this: lib{foo}: bin.lib.version = linux@1.2.3 freebsd@1.2 windows@1.2
2016-08-28Optimize library processingBoris Kolpackov1-2/+9
2016-08-28Factor library search/processing out to cc::commonBoris Kolpackov1-813/+0
2016-08-28Fix Windows rpath supportBoris Kolpackov1-134/+135
2016-08-28Extract pkg-config information for both static/shared at onceBoris Kolpackov1-106/+113
We also no longer pick shared/static file rather entering them as "our" lib{} target. This way we use the link order of the importer "transitively".
2016-08-27Fix rpath-linkBoris Kolpackov1-63/+89
2016-08-27Reimplement UNIX rpath using process_library(), -rpath-link is still brokenBoris Kolpackov1-118/+194
2016-08-27Determine if library is system in process_librariesBoris Kolpackov1-40/+107
2016-08-27Clean up library export, make c and cxx modules project root onlyBoris Kolpackov1-139/+91
So now c and cxx modules can only be loaded in project root scope (normally root.build). Also, the c.std and cxx.std must now be set *before* loading the module to take effect. This means we won't be able to handle old buildfiles anymore but old versions of build2 should be able to handle new *.std placement.
2016-08-26Add pkg-config support for import installedBoris Kolpackov1-142/+253
Redesign library importing/exporting while at it.
2016-08-25Handle *.export.loptionsBoris Kolpackov1-2/+26
2016-08-24Pick *.libs variable depending on library type during static linkingBoris Kolpackov1-9/+33
2016-08-24Handle *.export.libs, distinguish interface and implementation dependenciesBoris Kolpackov1-51/+225
A library dependency on another libraries is either "interface" or "implementation". If it is interface, then everyone who links to this library should also link to the interface dependency, explicitly. A good example of an interface dependency is a library API that is called in inline functions. Interface dependencies of a library should be explicitly listed in the *.export.libs (where we can also list target names). So the typical usage will be along these lines: import int_libs = libfoo%lib{foo} import int_libs += ... import imp_libs = libbar%lib{bar} import imp_libs += ... lib{baz}: ... $int_libs $imp_libs lib{baz}: cxx.export.libs = $int_libs
2016-08-22Cache process_path, use fallback search directory for binutilsBoris Kolpackov1-10/+17
2016-08-19Implement uninstall operationBoris Kolpackov1-4/+10
2016-08-17Add support for config.bin.{lib,exe}.{prefix,suffix}Boris Kolpackov1-7/+11
This replaces the bin.libprefix functionality.
2016-08-12Implement support for C compilationBoris Kolpackov1-0/+1850
We now have two new modules: cc (c-common) and c.