aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/compile-rule.cxx
AgeCommit message (Collapse)AuthorFilesLines
2020-11-04Minor terminology tweakBoris Kolpackov1-1/+1
2020-09-24Give hints for common causes of "no rule to update ..." errorBoris Kolpackov1-2/+2
2020-07-17Use -fexternc-nounwind by default for Clang targeting MSVCBoris Kolpackov1-5/+27
This option implements the 'c' part in /EHsc and is not a mere optimization; see Clang bug #45021 for details.
2020-07-13Fold translated *.std options into compiler mode optionsBoris Kolpackov1-8/+4
This way they are accessible in ad hoc recipes.
2020-07-07Make sure paths used to insert target are canonicalizedBoris Kolpackov1-3/+9
2020-07-01Add additional diagnostics for unassigned path (GitHub issue #89)Boris Kolpackov1-6/+10
2020-07-01Add additional diagnostics for disappearing header (GitHub issue #80)Boris Kolpackov1-0/+16
2020-06-26Handle #import in MSVC /showIncludes outputBoris Kolpackov1-7/+28
2020-06-25Fix warningBoris Kolpackov1-1/+1
2020-06-25Add more instrumentation for unassigned path raceBoris Kolpackov1-14/+41
2020-06-24Fix trace and clarify commentsBoris Kolpackov1-9/+12
2020-06-09Move C++ modules sidebuild to build/cc/build/modules/ subdirectoryBoris Kolpackov1-1/+1
2020-06-08Hash ad hoc prerequsites for ad hoc recipe change detectionBoris Kolpackov1-1/+1
2020-05-27Initial support for ad hoc recipes (still work in progress)Boris Kolpackov1-7/+7
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-17Rework config::{omitted,required,optional}() into unified config_lookup()Boris Kolpackov1-1/+1
2020-03-13Cleanup and make config/utility.?xx part of build system coreBoris Kolpackov1-4/+2
2020-02-12Defer failure to compiler diagnostics even if not in "keep going" modeBoris Kolpackov1-3/+6
2020-02-11Instrument unassigned source path case in cc::compile_ruleBoris Kolpackov1-1/+12
2020-02-11Add match_only flag to contextBoris Kolpackov1-2/+2
2020-02-11Defer unknown header failure to compiler diagnosticsBoris Kolpackov1-80/+191
2020-02-10Make no-target/no-rule header dependency extraction diagnostics consistentBoris Kolpackov1-9/+26
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-18/+24
2020-01-27Improve module loading APIBoris Kolpackov1-1/+1
2019-11-29Reorder {cc,c/cxx}.{poptions,loptions}Boris Kolpackov1-5/+10
Now it is c/cxx first followed by cc which is the reverse order of coptions since the header/library search paths are examined in the order specified (in contrast to the "last value wins" semantics that we assume for coptions).
2019-11-18Add couple of sanity checksBoris Kolpackov1-3/+8
2019-11-15Improve {}-imbalance diagnostics in cc::parser and make it warningBoris Kolpackov1-2/+4
2019-11-13Use path_name in cc::lexer classKaren Arutyunov1-1/+1
2019-11-05Add support for supplying MSVC IFCPATH equivalentBoris Kolpackov1-5/+18
2019-10-18Add ability to specify "compiler mode" options as part of config.{c,cxx}Boris Kolpackov1-29/+47
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-15Remove no longer used lambda captureBoris Kolpackov1-4/+1
2019-10-14Implement MSVC installation discovery for version 15 (2017) and laterKaren Arutyunov1-81/+44
In particular, this removes the requirement to build from the Visual Studio command prompt. Note that since MSVC compiler binaries are target-specific (i.e., there are no -m32/-m64 options nor something like /MACHINE), in this case we default to a 64-bit build (a 32-bit build can still be achieved by running from a suitable command prompt). Finally, this mechanism is also used to find Clang bundled with MSVC.
2019-10-11Various fixes to make clang-cl workBoris Kolpackov1-30/+44
Note that clang-cl's /showInclude output differs from cl's in the face of missing headers. In particular, it does not issue C1083 that we expect. As a result, this part of clang-cl's support is currently non-functional (the rest seems to work, however).
2019-10-11Switch clang-apple to primary/variant version setupBoris Kolpackov1-8/+2
2019-10-05Default to MSVC DLL runtime for Clang on WindowsBoris Kolpackov1-2/+75
2019-10-02Handle Russian version of MSVC C1083 diagnosticsBoris Kolpackov1-13/+33
2019-10-01Adapt to renaming butl::casecmp() to icasecmp()Karen Arutyunov1-1/+1
2019-09-18Rename importable_headers variable to translatable_headersBoris Kolpackov1-13/+11
This name aligns better with the post-Cologne importable/translatable semantics.
2019-09-05Improve /showIncludes parsing to handle internal (debug?) builds of MSVCBoris Kolpackov1-5/+17
2019-08-28Move cc build system module to separate libraryKaren Arutyunov1-0/+6098