Commit Graph

950 Commits

Author SHA1 Message Date
Brad King
88c7eaa7a7 Merge topic 'android-clang-c++23'
75e9918a66 Android: Require Clang 18 for -std=c++23

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !8847
2023-09-28 09:50:36 -04:00
Brad King
75e9918a66 Android: Require Clang 18 for -std=c++23
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
2023-09-27 12:56:49 -04:00
Brad King
5d32320bf3 Merge topic 'hip-nvidia'
fd982eec10 HIP: Add tests for special NVIDIA values of CMAKE_HIP_ARCHITECTURES
8c8b3f1bfa HIP: Fix support for -DCMAKE_HIP_ARCHITECTURES=native with NVCC
b3e92775ab HIP: Add CMAKE_HIP_HOST_COMPILER when compiler is NVCC
e43918b4ca HIP: Fix linking mixed-lang binary with CXX compiler and Makefile generators
4794505122 HIP: Do not require hip-lang package for NVIDIA platform
09d759dc7f HIP: Simplify exclusion of AMD device runtime with NVIDIA GPUs
2a60663670 HIP: Simplify CMAKE_GENERATOR references for determining compiler
8124950f6c CUDA: Generalize CMAKE_{CUDA => <LANG>}_HOST_COMPILER variable docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8836
2023-09-26 09:40:25 -04:00
Brad King
0be496cb5a Merge topic 'orangec-compiler'
f8fa4f1ad7 ci: Add OrangeC 6.73.1 nightly CI job
531b4fe643 OrangeC: Add support for OrangeC compiler
10f435a58f Tests: Simplify nested if conditions in Complex tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Victor <lostfreeman@gmail.com>
Merge-request: !8592
2023-09-26 09:23:10 -04:00
Xing Xue
961a077238 IBMClang: Add provisional flags for C++23
With this one can use the IBM Open XL C/C++ compiler to build projects
that require feature `cxx_std_23`.
2023-09-25 19:05:31 -04:00
Brad King
09d759dc7f HIP: Simplify exclusion of AMD device runtime with NVIDIA GPUs 2023-09-25 16:06:36 -04:00
David Lindauer
531b4fe643 OrangeC: Add support for OrangeC compiler
Add compiler information modules.  Update the test suite.

Fixes: #25032
Co-authored-by: Brad King <brad.king@kitware.com>
2023-09-25 12:27:29 -04:00
Brad King
89d155e1bb Merge topic 'CrayClang-compiler'
80838316a8 CrayClang: Add support for this compiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8781
2023-09-25 08:58:25 -04:00
Brad King
82a2f198d8 Merge topic 'cxxmodules-gcc-14'
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
2023-09-25 08:56:04 -04:00
Ryan Krattiger
80838316a8 CrayClang: Add support for this compiler
Add `CrayClang` compiler ID for newer Cray compilers.

Fixes: #25102
2023-09-22 09:39:52 -04:00
Brad King
18158bf81c HIP: Add support for NVIDIA GPUs
Add support for using the CUDA Toolkit's NVCC to compile HIP code.

Fixes: #25143
2023-09-21 15:34:37 -04:00
Brad King
e1b2a5062f CUDA: Factor out some NVCC compiler information
Prepare to use nvcc for other languages.
2023-09-21 15:34:27 -04:00
Ben Boeckel
4f0410959e GCC: add rules for scanning C++ module dependencies 2023-09-21 09:44:48 -04:00
Bram Metsch
e30f0f89af IntelLLVM: Suppress -Rdebug-disables-optimization on debug builds
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.
2023-09-07 15:15:08 -04:00
Brad King
0788accdfc Merge topic 'imported-cxxmodules'
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
2023-08-21 09:49:48 -04:00
Brad King
412829a3d6 Merge topic 'LLVMFlang-Fortran-flags'
1140087ade LLVMFlang-Fortran: Add flags for build types

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8741
2023-08-19 08:53:32 -04:00
Tarun Prabhu
1140087ade LLVMFlang-Fortran: Add flags for build types
Fixes: #25193
2023-08-19 08:47:44 -04:00
Ben Boeckel
80ef50a191 CXXModules: add a variable for BMI-only compilation
This will be required when dealing with imported targets which contain
modules.
2023-08-17 14:42:54 -04:00
Brad King
04f2c4b199 Merge topic 'clang_c23'
65288eb92a Clang: use -std=c23 for Clang 18+

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !8716
2023-08-16 09:44:48 -04:00
Raul Tambre
65288eb92a Clang: use -std=c23 for Clang 18+
Canonical flag changed in LLVM commit 13629b140801870feff855ca168edf6b34dbef8d.
2023-08-15 09:43:48 -04:00
Brad King
2c6fe64876 NVIDIA-CUDA: Factor out helper for NVCC C++ standard flags
These standard flags will be the same for other C++-derived languages
supported by nvcc.  Follow the pattern from commit 25439c7d62 (Clang:
Refactor CXX standard flags ..., 2020-03-16, v3.18.0-rc1~362^2~4) to
factor them into a single macro so we can easily reuse them.

Issue: #25143
2023-08-10 16:31:58 -04:00
Brad King
e4819c3a7a Merge topic 'armclang-update-version-computation'
65fac2fa35 ARMClang: Fix computation of compiler semantic version patch level

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8636
2023-07-18 13:48:50 -04:00
Brad King
a881ae61f1 Merge topic 'armclang-update-version-computation' into release-3.27
65fac2fa35 ARMClang: Fix computation of compiler semantic version patch level

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8636
2023-07-18 13:48:49 -04:00
Daniel Brondani
65fac2fa35 ARMClang: Fix computation of compiler semantic version patch level
According to ARMClang documentation 6.20, the patch version number
should not include the last two digits of `__ARMCOMPILER_VERSION`,
which are reserved for internal use by ARM.
2023-07-18 13:29:01 -04:00
Brad King
d599c9e92e Merge topic 'support_nvhpc_versions_without_isystem'
f73ae7c510 NVHPC: Support nvfortran versions that don't support isystem

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8588
2023-06-26 09:44:57 -04:00
Brad King
b7810bfb18 Merge topic 'support_nvhpc_versions_without_isystem' into release-3.27
f73ae7c510 NVHPC: Support nvfortran versions that don't support isystem

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8588
2023-06-26 09:44:56 -04:00
Robert Maynard
f73ae7c510 NVHPC: Support nvfortran versions that don't support isystem
Fixes: #25019
2023-06-23 12:14:09 -04:00
Marc Chevrier
5945a98ced link dependencies: deactivate the feature
Unfortunately it breaks in combination with LTO due to a bug in the GNU
linker.

Fixes: #25014
2023-06-23 10:35:04 -04:00
Marc Chevrier
0626b62cf2 Link Step: ensure the correct linker is used for depfile configuration
This is related to MR !8443.
2023-05-28 11:28:08 +02:00
Brad King
b6c45d28b2 Merge topic 'clang_cxx26'
0183956d30 Clang: C++26 support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8480
2023-05-18 09:22:02 -04:00
Felipe Torrezan
7cd982faf4 IAR: Added support for IAR C/C++ Compiler for Microchip AVR 8.10+
- Added C17 support
- Added C++17 support
- Changed: IAR UBROF Linker (XLINK) suffixed with target architecture (xlinkavr)
2023-05-16 20:08:01 +02:00
Brad King
20c7219f8f Merge topic 'iar-align-output-extension'
cfec4c1c5e IAR: Enforce output extension for xlink targets
7fec8f993b IAR: Replace extension for compiler and assembler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8477
2023-05-16 10:44:23 -04:00
Raul Tambre
0183956d30 Clang: C++26 support
Added in LLVM commit b763d6a4ed4650c74c6846d743156468563b0e31.
This time the final flag form is supported from the get-go to reduce churn.
2023-05-16 09:51:07 +03:00
Joakim Lönnberg
cfec4c1c5e IAR: Enforce output extension for xlink targets 2023-05-12 13:58:32 +02:00
Brad King
4490a0c266 Merge topic 'dankm/tcsuffix'
6a82852dc2 Allow toolchain suffix without leading dash

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !8462
2023-05-10 09:36:42 -04:00
Dan McGregor
6a82852dc2 Allow toolchain suffix without leading dash
FreeBSD installs both LLVM and gcc with tools named after the
major version, in the form "clang<major>", such as "clang16".

Detect compilers named this way, and find the related toolchain
tools.
2023-05-08 18:09:27 -06:00
Raul Tambre
eacacc70fc Clang: use -std=c++23 for Clang 17.0+
Canonical flag changed in LLVM commit ba15d186e5cef2620d562c6c9d9a6d570382cd0a.
2023-05-08 20:26:39 +03:00
Joakim Lönnberg
7fec8f993b IAR: Replace extension for compiler and assembler 2023-05-08 15:35:53 +02:00
Marc Chevrier
375e6fdbbe Link step: use linker dependency linker file
Based on work done by @ben.boeckel (!8051)

Fixes: #22217
2023-05-03 17:08:07 +02:00
Brad King
9b463cc4b5 Merge topic 'iar-silent-flag'
01e944128d IAR: Move linker silencing flag to CMAKE_EXE_LINKER_FLAGS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8421
2023-04-28 10:08:22 -04:00
Brad King
0f6a1dd3ed Ninja: Revert "Exclude NVHPC -Werror flags during Fortran preprocessing"
Revert commit 6b58cdd4cf (Ninja: Exclude NVHPC -Werror flags during
Fortran preprocessing, 2023-04-04).  Since commit 9d40f01442 (NVHPC: Use
-Werror for COMPILE_OPTIONS_WARNING_AS_ERROR, 2023-04-13), `nvfortran`
can handle the plain `-Werror` flag during preprocessing.

Issue: #24665
2023-04-26 14:36:46 -04:00
Felipe Torrezan
01e944128d IAR: Move linker silencing flag to CMAKE_EXE_LINKER_FLAGS
The IAR linker silencer flag was previously hardcoded in
`CMAKE_${lang}_LINKER_EXECUTABLE`.  Move the flag to a place that is
under the end user's control.  The default behavior (silenced linker) is
not changed.

Fixes: #24828
2023-04-26 10:48:31 -04:00
Robert Maynard
9d40f01442 NVHPC: Use -Werror for COMPILE_OPTIONS_WARNING_AS_ERROR
The previously-used `-Werror all-warnings` is not supported by
the NVHPC suite of compilers.  This previously worked since `-Werror`
was being used and `all-warnings` was being excluded.

We thought this was the correct syntax due to incorrect documentation
about `-Werror`, which stated the argument should be space-separated,
while it should actually be separated with `=` or `,`.

Issue: #24665
2023-04-25 11:16:26 -04:00
Brad King
6b58cdd4cf Ninja: Exclude NVHPC -Werror flags during Fortran preprocessing
The Ninja generator preprocesses Fortran separately in order to scan for
module dependencies.  NVHPC's `nvfortran` does not support its `-Werror`
flag while preprocessing with `-E`, so filter it out.

Fixes: #24665
2023-04-04 14:53:26 -04:00
Nicole Rabjohn
79622d4a3e IBMClang: No thin LTO on AIX
AIX does not yet support thin LTO.
2023-03-23 11:46:17 -04:00
Brad King
ca8c171021 Merge topic 'clang-windows-cxx-modules'
1b7c26da49 Ninja: Wrap rules using '>' shell redirection with 'cmd /C' on Windows
ffd8537acf Clang: Record Clang 16.0 C++ modules flags only for GNU-like front-end
6013227230 cmGlobalNinjaGenerator: Use forward slashes in clang modmap format on Windows
d9d74b5e8a cmDyndepCollation: Drop outdated mentions of CXX_MODULE_INTERNAL_PARTITIONS
edab56d29a cmLocalNinjaGenerator: De-duplicate condition for using 'cmd /C' on Windows
8ebe3f92b3 cmGlobalNinjaGenerator: Detect GNU-like command-line for dyndep collator
f3ca199c9b cmGlobalNinjaGenerator: Factor out GNU-like command-line detection on Windows
f79817fcf0 cmCxxModuleMapper: Use value semantics in path conversion callback
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8346
2023-03-21 08:58:43 -04:00
Brad King
ffd8537acf Clang: Record Clang 16.0 C++ modules flags only for GNU-like front-end
The settings added by commit 3fe8e33f27 (Clang: Record Clang 16.0 flags
for our experimental C++ modules support, 2023-03-03, v3.26.0-rc6~6^2)
work only for the GNU-like `clang++` front-end, and not for the
MSVC-like `clang-cl` on Windows.

Also quote the path to `clang-scan-deps` to support spaces in its path.

Issue: #24611
2023-03-20 13:13:08 -04:00
Joakim Lönnberg
9df52c7f1c IAR: Version update for arm assembler 2023-03-16 11:48:31 +01:00
Brad King
d34c98b06a Merge topic 'iar-improve-asm'
21f19d6af7 IAR:Improved assembler support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8323
2023-03-15 09:53:16 -04:00
Brad King
db4f4ad24e Merge topic 'support_cubin_fatbin_optix_cuda_output'
2def6a874b CUDA: Add support for CUBIN, FATBIN, and OPTIXIR compilation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8259
2023-03-14 09:35:00 -04:00