summaryrefslogtreecommitdiff
path: root/src/compopt.cpp
Commit message (Collapse)AuthorAgeFilesLines
* fix: Support /external:I for MSVC (#1165)Raihaan Shouhell2022-09-261-0/+2
|
* chore: Add knowledge of linker option -z to avoid note in debug logJoel Rosdahl2022-05-051-1/+2
| | | | Closes #1061.
* feat: Handle -imsvc compiler option (#1055)jacobly02022-05-011-0/+1
|
* feat: Support MSVC /Yu option (compiling with PCH) (#991)Orgad Shaneh2022-01-161-3/+5
| | | Co-authored-by: Luboš Luňák <l.lunak@centrum.cz>
* fix: MSVC's -link option is too hard (#972)Luboš Luňák2021-12-121-0/+1
|
* Fix and simplify handling of options for MSVC (#954)Luboš Luňák2021-12-121-14/+7
|
* feat: Visual C/C++ compiler support (#506)Cristian Adam2021-11-151-0/+14
|
* feat: Support rewriting absolute path to Clang option --gcc-toolchainJoel Rosdahl2021-11-081-6/+8
| | | | Closes #889.
* Remove system.hpp, including what’s needed insteadJoel Rosdahl2021-07-071-0/+2
| | | | This is the next step after a57f70eda32e99221de56f5499079b4f00dc2bc5.
* Add support for clang's --config option (#850)Tom Stellard2021-05-231-0/+1
| | | | This is more or less equivalent to gcc's --specs option except that the contents of the file have different syntaxes.
* Support `-specs file.specs` and `--specs file.specs` (#843)Josh Triplett2021-05-031-0/+2
| | | | | | | | | | | * Support `-specs file.specs` and `--specs file.specs` ccache currently supports specs files supplied via `-specs=file.specs` and `--specs=file.specs`, but using a space instead of an `=` will cause ccache to error out on the subsequent .specs file with "unsupported source language". Add support for `-specs file.specs` and `--specs file.specs`.
* Ignore -ivfsoverlay parameter (#839)Yoshimasa Niwa2021-04-281-0/+1
| | | | Co-authored-by: Peter Steinberger <steipete@gmail.com>
* Improve statistics for “-P -E”Joel Rosdahl2021-04-131-1/+0
| | | | | | | | | | | | “-P” is currently considered too hard, so when it’s used in conjunction with “-E” the “unsupported compiler option” statistics counter is increased since “-P” is found before “-E” on the command line. Improve this by not passing “-P” to the preprocessor so that’s it’s in effect supported. “-P -E” will then instead bail out on “-E”, increasing “called for preprocessing” instead. Closes #812.
* Bail out on too hard Clang option -gen-cdb-fragment-pathJoel Rosdahl2021-03-181-0/+1
|
* Handle -frecord-gcc-switches correctlyJoel Rosdahl2021-02-231-1/+1
| | | | | | | | -frecord-gcc-switches records the full command line in the object file, so include the original command line in the hash as suggested by Lawrence Chan. Fixes #804.
* Detect errors in fmt::print format strings at compile timeJoel Rosdahl2020-10-231-7/+9
| | | | See also 4413d842e23c6fa52ec411951a4ab442f42227de.
* refactor: Improve naming/interface of compopt functions (#663)Alexander Lanin2020-10-051-33/+25
|
* Remove redundant static keyword for namespace-level constantsJoel Rosdahl2020-09-051-1/+1
| | | | | Namespace-level constant objects have static storage duration by default.
* Use fmt::print instead of (f)printfJoel Rosdahl2020-08-031-7/+9
|
* Remove now empty legacy_util.[hc]pp filesJoel Rosdahl2020-07-311-2/+0
|
* Handle clang PCHs (#539) (#624)ahasselbring2020-07-251-0/+3
| | | | Co-authored-by: Cristian Adam <cristian.adam@gmail.com>
* Enable more clang-tidy rules and implement suggestionsJoel Rosdahl2020-06-231-4/+4
|
* Fix spellingJoel Rosdahl2020-06-141-1/+1
|
* Support NVCC’s “--Werror” optionJoel Rosdahl2020-06-141-0/+1
|
* Fix capitalization of ClangJoel Rosdahl2020-05-241-3/+3
|
* Convert compopt test suite to Catch2Joel Rosdahl2020-05-121-1/+1
|
* C++-ify compopt functions somewhatJoel Rosdahl2020-05-061-17/+15
|
* Low hanging fruits of some auto fixable improvements via clang-tidy (#545)Alexander Lanin2020-02-251-2/+2
|
* Split ccache.hpp into per-.cpp file headersJoel Rosdahl2020-01-221-2/+2
| | | | This reduces code dependencies that hamper refactoring.
* Allow -fmodules in direct depend mode (#482)Luboš Luňák2019-11-141-1/+0
| | | | | | | | | | | | | | | | Clang creates the internal on-disk representation of modules in the background on demand as necessary. This means that ccache does not need to cache that, all that it needs to cache is the actual compilation result and the dependencies. Which in the case of modules includes also the module.modulemap files, and Clang outputs such dependencies correctly only in the depend mode, in the preprocessed output there is no way to find out the module dependencies. Therefore support -fmodules in direct depend mode by more or less ignoring it. Tested with source build of LLVM/Clang configured with -DLLVM_ENABLE_MODULES=On (and the build actually occassionally fails because of module problems, but that happens regardless of ccache). See also pull request #130 (and this reuses the tests from there).
* Correct "-MJ" bail out, identify both "-MJ file" and "-MJfile" (#487)Thomas Otto2019-11-101-3/+14
| | | | Also added test to detect the invalid case TOO_HARD | TAKES_CONCAT_ARG.
* Don’t pass -Wno-error to the preprocessorJoel Rosdahl2019-08-161-0/+1
| | | | | | | | This is done to keep the argument order between -Werror and -Wno-error. Fixes #451. (cherry picked from commit 70986342c8948ac2ae974ee98efbcd6865003dc1)
* Run clang-format on all code to follow the new code styleJoel Rosdahl2019-08-141-156/+161
| | | | | If you end up on this commit when running “git blame ...”, it’s probably a good idea to use “git blame -w ...” to ignore whitespace changes.
* C++-ify source codeJoel Rosdahl2019-08-141-0/+266
The ccache source code will be converted to C++, targeting C++11. This commit only arranges the existing C-style code to be built as C++ code. This makes it possible to call new C++ code from old C-style code. Gradual conversion to C++ functionality and idioms will follow in a slow and controlled fashion – no big bang rewrites. The alternative would be to convert code in a top-down fashion, i.e. only calling legacy C code from new C++ code, not the other way around. That approach is however not a good idea since the code that will benefit most from being written in proper C++ is code deep down in the call chains. Except for renaming source code files to .cpp and .hpp, this commit makes minimal changes to make the code base buildable again, for example: - Instructs configure.ac to look for a mandatory C++11-compliant compiler. - Adds Makefile rules for building C++ code. - Sets up Travis-CI to pass C++ compiler flags and similar to the build. - Adds new casts where needed. - Adds const keywords where needed. - Renames variables to something else than C++ keywords (e.g. “template”). - Rearranges some code to avoid complaints about goto jumps that cross variable lifetimes.