In commit 8218aed118 (IntelLLVM: support marking include paths as SYSTEM
directories, 2023-08-15, v3.29.0-rc1~81^2) this flag was added for the C
and C++ compilers, but was accidentally added for Fortran too. Remove
it for the latter, as it is unsupported.
Issue: #25807
When cross-compiling, `clang-scan-deps` needs help to find the correct
location of core headers such as `stddef.h`. Always determine this path
and pass it when available.
Fixes: #25590
Apply the fix from commit 1ec6485c6a (Support duplicate object names in
large archives, 2014-04-16, v3.1.0-rc1~629^2) to the IPO-specific
archiving rules. Use "quick append" instead of "replace".
Fixes: #25675
Issue: #14874
Add TIClang compiler ID and support in compiler modules. Update
documentation. Add rudimentary RunCMake test for TIClang to test
basic functionality.
Fixes: #24619
When `clang-scan-deps` fails to scan (e.g., bad source syntax, junk
flags, etc.), the redirection unconditionally updates the file. If this
fails, the `.ddi` file timestamp is updated. If the state is then
reverted (e.g., the command line returns to the state of the last
successful build), the updated file is not useful, but `ninja` does not
rerun because:
- the command hash matches the last successful run
- the output file is newer than its inputs
However, since the `.ddi` file has been updated with bogus contents from
a failed scan, collation fails as the `rules` array is empty (or
incomplete from a batch scan).
If `clang-scan-deps` were properly aware of its output file, it could
use this to not write the file if any inner scan fails. Requested in
https://github.com/llvm/llvm-project/issues/72875.
See: https://github.com/llvm/llvm-project/issues/72875Fixes: #25429
Since commit a66004bee0 (Honor CMAKE_<LANG>_FLAGS[_<CONFIG>]_INIT set in
toolchain files, 2016-07-05, v3.7.0-rc1~392^2) we've accidentally been
adding extra optimization flags instead of replacing unwanted flags.
Fixes: #25434
538ff514b5 Link Step: use the correct linker for depfile handling
c26c6ac488 Link Step: compute effective linker used by the compiler
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8885
-fno-ansi-escape-codes is used only on Windows by Clang.
Without the flag color diagnostics are displayed only if clang.exe
is executed directly. Build tools like ninja and mingw32-make
will not display colored diagnostics.
Using -fno-ansi-escape-codes will make the build tools pass
the colored diagnostics to the calling application e.g IDE.
Fixes: #24235
In commit e9eabb0dcd (ADSP: Configure compiler in compiler module,
2022-03-24, v3.24.0-rc1~331^2~1) we added compiler information modules
for the ADSP C and C++ compilers. Add one for the assembler too.
We already identify the ADSP assembler since commit f83330ed6c (ASM:
ADSP assembler identification, 2018-01-30, v3.11.0-rc1~35^2).
26bf32cdc6 LLVMFlang: Add support for targeting MSVC ABI on Windows
e9af7b9687 LLVMFlang: Add support for CMAKE_Fortran_COMPILER_TARGET
26fa048ffe Tests: Enable CMP0091/CMP0141 for MSVC settings in FortranOnly test
9d060b8682 Fortran: Save CMAKE_LINKER variable persistently for MSVC ABI
7571e653f4 CMakeDetermineCompilerABI: Add option to skip implicit link info parsing
12733d0d8d CMakeParseImplicitLinkInfo: Detect link lines using link.exe and lld-link
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8852
26bf32cdc6 LLVMFlang: Add support for targeting MSVC ABI on Windows
e9af7b9687 LLVMFlang: Add support for CMAKE_Fortran_COMPILER_TARGET
26fa048ffe Tests: Enable CMP0091/CMP0141 for MSVC settings in FortranOnly test
9d060b8682 Fortran: Save CMAKE_LINKER variable persistently for MSVC ABI
7571e653f4 CMakeDetermineCompilerABI: Add option to skip implicit link info parsing
12733d0d8d CMakeParseImplicitLinkInfo: Detect link lines using link.exe and lld-link
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8852
The compiler does not yet support everything needed to integrate well
with the MSVC ABI, in particular for runtime library selection and debug
format selection. Document them in FIXME comments and leave this
support undocumented by CMake for now.
Fixes: #24840
Inspired-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
437280b127 cxxmodules: scan C++ sources for imports by default
3cddd11649 Ninja: message about not compiled sources explicitly
068fde1c34 cmGeneratorTarget: use `this->` for method calls
197a6bf171 cxxmodules: rework control logic for scanning regular C++ sources
5eb7bd641a Tests/RunCMake/CXXModules: remove rules file requirement
ff18acc301 CXXModules: remove `EXPERIMENTAL` from C++ module variable names
0c07f39006 cmExperimental: remove the flag for C++ modules
68caec9137 Help: add a manpage for cxxmodule support
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Pavel Solodovnikov <hellyeahdominate@gmail.com>
Merge-request: !8828
Update the Clang version checks added by
* commit eacacc70fc (Clang: use -std=c++23 for Clang 17.0+,
2023-05-08, v3.27.0-rc1~115^2)
* commit 0183956d30 (Clang: C++26 support,
2023-05-16, v3.27.0-rc1~85^2)
to account for Android NDK r26's distribution of a Clang based on a
development version of LLVM/Clang 17.0 that pre-dated addition of
these flags.
Follow the pattern from commit 12e6796b62 (Android: Do not pass
non-existent Clang -std flags, 2018-04-02, v3.12.0-rc1~284^2),
which fixed the same problem for `-std=c++17`.
Fixes: #25281
4089954595 gitlab-ci: update to GCC CI container with merged P1689R5
c2564f5916 ci: drop extra scandep source settings for GCC
ee52a02d56 ci: update GCC build to use master after P1689R5 is merged
4f0410959e GCC: add rules for scanning C++ module dependencies
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8827
IntelLLVM 2023.0.0 and above emit this remark if `-g` is used without
any `-O<level>` flag, which is our default behavior. Add another flag
to suppress the remark.
48ee946fdc cmExperimental: recycle the C++ modules API UUID
1a1806a71b gitlab-ci: declare `bmionly` support for modules where possible
457a12f3f9 Tests/RunCMake/CXXModules: add tests which use modules from imported targets
9b9ec70b54 Ninja: generate scanning and build rules for C++20 module synthetic targets
80ef50a191 CXXModules: add a variable for BMI-only compilation
80d6544398 cxxmodules: generate synthetic targets as an initial pass
3dc6676ecc cmSyntheticTargetCache: add a struct for synthetic target caching
cb356b540c cmCxxModuleUsageEffects: add a class to capture module usage effects
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8535