aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/c/init.cxx
AgeCommit message (Collapse)AuthorFilesLines
2024-05-14Map C23/C2X to /std:clatest starting from MSVC 17.9 (19.39)Boris Kolpackov1-9/+17
In particular, this option enables C23 typeof support.
2024-02-26Add ability to serialize compilation/linking in cc rulesBoris Kolpackov1-0/+1
Specifically, both the C/C++ compiler and link rules now recognize the cc.serialize boolean variable which instructs them to compiler/link serially with regards to any other recipe. This is primarily useful when compiling large translation units or linking large binaries that require so much memory that doing that in parallel with other compilation/linking jobs is likely to summon the OOM killer. For example: obj{memory-hog}: cc.serialize = true
2024-01-10Fix bunch of typosBoris Kolpackov1-2/+2
2024-01-08Add {bin,c,cxx}.types submodules that only register target typesBoris Kolpackov1-28/+134
2023-12-07C++20 named modules support for MSVC, take 2Boris Kolpackov1-2/+1
2023-11-29Add rule for extracting C and C++ predefsBoris Kolpackov1-11/+48
2023-08-22Consider *_inc{} target types as headers for rule match purposesBoris Kolpackov1-0/+1
2023-08-22Add abstract c_inc{} and cxx_inc{} target typesBoris Kolpackov1-1/+2
These abstract base target types are meant for deriving additional target types (for example, Qt moc{}) that can be #include'd in C and C++ translation units, respectively. In particular, only such targets will be considered to reverse-lookup extensions to target types (see dyndep_rule::map_extension() for background).
2023-07-27Recognize cNN/c++NN in addition to NN in c.std/cxx.stdBoris Kolpackov1-13/+33
Also recognize 23 in addition to 2x for C23.
2023-06-22Map cxx.std=26 to -std=c++2c for GCC and ClangBoris Kolpackov1-1/+6
2023-04-21Make sure main module_functions entry is after submodulesBoris Kolpackov1-1/+1
2023-04-18Add support for Assembler with C Preprocessor (.S) compilationBoris Kolpackov1-0/+41
Specifically, the c module now provides the c.as-cpp submodules which can be loaded in order to register the S{} target type and enable Assembler with C Preprocessor compilation in the c compile rule. For details, refer to "Assembler with C Preprocessor Compilation" in the manual.
2022-11-22Add support for Objective-C/C++ compilation in cc moduleBoris Kolpackov1-0/+47
2022-10-13Optimize by going straight to public variable pool where applicableBoris Kolpackov1-1/+4
2022-04-14Add header cache to cc::compile_rule::enter_header()Boris Kolpackov1-1/+1
2022-04-06Add support for rule hintsBoris Kolpackov1-1/+0
A rule hint is a target attribute, for example: [rule_hint=cxx] exe{hello}: c{hello} Rule hints can be used to resolve ambiguity when multiple rules match the same target as well as to override an unambiguous match.
2022-03-28Add ability to customize pkg-config header and library search pathsBoris Kolpackov1-0/+6
Specifically, {cc,c,cxx}.pkgconfig.{include,lib} variables specify header (-I) and library (-L) search paths to use in the generated .pc files instead of the default install.{include,lib}. Relative paths are resolved as install paths.
2021-10-04Optimize internal scope implementationBoris Kolpackov1-2/+2
2021-10-04Add support for treating specific libraries as always internalBoris Kolpackov1-1/+5
2021-10-01Add notion of internal scope, translate external -I to -isystem or equivalentBoris Kolpackov1-2/+14
2021-07-22Add note on new /std:c11 and /std:c17 MSVC optionsBoris Kolpackov1-0/+5
2021-05-13Rename sys_inc_dirs to sys_hdr_dirs for consistencyBoris Kolpackov1-4/+4
2021-05-04Replace int_ with intf_ and imp_ with impl_ in namesBoris Kolpackov1-2/+2
2021-04-20Track changes to environment in cc rulesBoris Kolpackov1-0/+1
2021-01-30Rework include translation supportBoris Kolpackov1-4/+6
See the config.cxx.translate_include variable documentation in cxx/init.cxx for details.
2020-12-11Add support for module interface-only librariesBoris Kolpackov1-0/+2
Also suppress generation of the object file in cases where we don't need it.
2020-07-16Save original compiler path/mode in {c,cxx}.config.path/modeBoris Kolpackov1-0/+2
It turns out that when propagating {c,cxx}.config in tests we don't want to propagate any options (such as *.std) that have been folded into our project's mode.
2020-07-13Fold translated *.std options into compiler mode optionsBoris Kolpackov1-9/+5
This way they are accessible in ad hoc recipes.
2020-07-01Add *.export.imp_libs to get rid of dual *.export.libs semanticsBoris Kolpackov1-0/+2
2020-06-02Add process_path_ex with program stable name and checksumBoris Kolpackov1-4/+4
2020-04-27Rework tool importation along with cli moduleBoris Kolpackov1-3/+3
Specifically, now config.<tool> (like config.cli) is handled by the import machinery (it is like a shorter alias for config.import.<tool>.<tool>.exe that we already had). And the cli module now uses that instead of custom logic. This also adds support for uniform tool metadata extraction that is handled by the import machinery. As a result, a tool that follows the "build2 way" can be imported with metadata by the buildfile and/or corresponding module without any tool-specific code or brittleness associated with parsing --version or similar outputs. See the cli tool/module for details. Finally, two new flavors of the import directive are now supported: import! triggers immediate importation skipping any rule-specific logic while import? is optional import (analogous to using?). Note that optional import is always immediate. There is also the import-specific metadata attribute which can be specified for these two import flavors in order to trigger metadata importation. For example: import? [metadata] cli = cli%exe{cli} if ($cli != [null]) info "cli version $($cli:cli.version)"
2020-03-31Switch to project variable visibility by defaultBoris Kolpackov1-13/+11
2020-02-24Work around bug in Clang 10 targeting MSVC in c++2a (LLVM bug #44956)Boris Kolpackov1-1/+5
2020-02-07Drop copyright notice from source codeKaren Arutyunov1-1/+0
2020-02-03Add header/library search paths from compiler mode to sys_*_dirsBoris Kolpackov1-3/+6
2020-01-29Rename module_base to module, redo module boot/init argument passingBoris Kolpackov1-22/+14
2020-01-28Use scope::var_pool()Boris Kolpackov1-67/+67
2020-01-27Improve module loading APIBoris Kolpackov1-8/+6
2019-11-05Add support for supplying MSVC IFCPATH equivalentBoris Kolpackov1-0/+1
2019-11-05Recognize latest C (2x) and C++ (2b) standardsBoris Kolpackov1-8/+14
2019-10-21Add more information on C and C++ compiler mode options to manualBoris Kolpackov1-0/+2
2019-10-18Add ability to specify "compiler mode" options as part of config.{c,cxx}Boris Kolpackov1-1/+3
Such options are (normally) not overridden by buildfiles and are passed last (after cc.coptions and {c,cxx}.coptions) in the resulting command lines. They are also cross-hinted between config.c and config.cxx. For example: $ b config.cxx="g++ -m64"
2019-10-11Add support for clang-clBoris Kolpackov1-5/+11
The compiler type is `msvc`, variant `clang`.
2019-10-07Pass MSVC system library search paths to linker if LIB envvar is unsetBoris Kolpackov1-5/+5
2019-09-18Rename importable_headers variable to translatable_headersBoris Kolpackov1-2/+2
This name aligns better with the post-Cologne importable/translatable semantics.
2019-08-28Move c build system module to separate libraryKaren Arutyunov1-0/+375