| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| |
| |
| |
| |
| | |
863f7eb6d7 clang: Restore support for clang-cl on non-Windows hosts
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3634
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The frontend variant detection logic added by commit 53fbe23f3f (clang:
introduce CMAKE_<lang>_COMPILER_FRONTEND_VARIANT, 2019-02-20,
v3.15.0-rc1~41^2~8) assumes that `clang-cl` only runs on a Windows host.
It is also available on non-Windows hosts. Fix the condition.
Fixes: #19544
|
|/
|
|
|
|
|
|
|
|
|
| |
Our compiler identification source encodes `INFO:compiler[...]` and
similar strings in compiled objects or binaries that we then extract to
get information about the compiler. With most compilers the strings are
encoded in the binaries as a simple byte sequence. However, some
compilers use other encodings. For example, the MS CSharp compiler uses
UTF-16LE and a TI compiler uses UTF-16BE. Try each encoding.
Fixes: #19459
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
74829f01b1 Help: Add notes for topic 'clang-gnulike-support'
19669abe1d Tests: handle string escaping differences with NMake+clang
a2a90f41e3 Tests: require C++14 for the Tutorial
4819ff9647 Tests: fix failures with gnu mode clang on windows
26af0b25e7 cmake: use correct stack size with gnu mode clang on windows
d44c0db0b2 clang: setup correct configuration in gnu mode
b7d5ef23e9 cmGlobalNinjaGenerator: use gnu compatible paths with clang in gnu mode
3d0210d8dc binutils: add the llvm-* variants to the tool lists.
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Francesco Bertolaccini <francesco@bertolaccini.dev>
Acked-by: Stanislav Ershov <digital.stream.of.mind@gmail.com>
Acked-by: Saleem Abdulrasool <compnerd@compnerd.org>
Merge-request: !2992
|
| |
| |
| |
| |
| |
| |
| |
| | |
This variable is set to GNU on Windows when clang.exe ar clang++.exe is
used, and set to MSVC for clang-cl.exe.
CMAKE_<lang>_SIMULATE_ID is set to MSVC in both cases, as clang defaults
to -fms-compatibility for all command lines on windows.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
9c07cefee5 VS: Fix ApplicationTypeRevision in builtin check projects
639e14def6 VS: Factor out helper to compute ApplicationTypeRevision
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3350
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Do not use the entire `CMAKE_SYSTEM_VERSION`, but rather the first two
components only.
Fixes: #19275
|
|/ /
| |
| |
| |
| |
| |
| | |
The compiler identification message was modified in commit ea83d0f8fb
(IAR: Generalize and add support for IAR RX compiler, 2019-04-05) to
include the architecture id since IAR compilers are arch-specific.
Revise the logic to avoid modifying the message for other compilers.
|
| | |
|
| |
| |
| |
| |
| | |
If compiler id detection gave us the compiler tool, copy its value to
the `CMAKE_${lang}_COMPILER` variable as early as possible.
|
|/
|
|
| |
Fixes: #18215
|
|
|
|
|
|
|
|
|
|
| |
Supports versioned LLVM toolsets like LLVM_v142, LLVM_v141,
LLVM_v141_xp, etc. for Visual Studio (2010 and later).
The name for versioned LLVM toolsets has "LLVM_" prefix
plus MSVC toolset name (i.e. v142, v141, v141_xp, etc.).
Fixes: #19203
|
|
|
|
| |
Moved common ASM setup to the common macros and changed version check.
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
8375c303e2 VS: Fix detection of clang-cl with -T llvm
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3024
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When using a VS generator with `-T llvm`, MSBuild relies on the "LLVM
Compiler Toolchain" VS Extension. This does not put `clang-cl` in the
`PATH` inside the build, and LLVM no longer provides a `cl` replacement
either. Therefore we need another way to extract the path to the
`CMAKE_{C,CXX}_COMPILER`. Fortunately the LLVM VS integration provides
a `$(ClangClExecutable)` macro we can reference to get the path.
Fixes: #18983
|
|/
|
|
|
|
|
|
| |
MS-style command-line tools accept either `/` or `-` for command-line
options. Prefer `-` over `/` so that non-MS tools do not treat it as a
path.
Fixes: #18941
|
|
|
|
| |
Closes: #18396
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
e8ee8cab97 Xcode: Completely disable code signing for compiler id detection
11da882a12 Apple: Introduce separate system name for iOS, tvOS, and watchOS
36cf44a7a3 Tests: Isolate RunCMake.XcodeProject per-device cases from host arch
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2392
|
| |
| |
| |
| | |
Issue: #17870
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Remove code signing requirements for non-macOS
- Do not set deployment target for non-macOS
- Build static library for compiler feature detection for non-macOS
- Use framework to run CompilerId tests for watchOS
- Port tests to new SDK handling
- Add new Apple cross-compiling section to toolchain documentation
Closes: #17870
|
|/
|
|
|
|
| |
Xcode 10.2 no longer supports Swift language versions before 4.0.
Fixes: #18871
|
|
|
|
|
|
|
|
|
|
|
|
| |
-- Detect GHS compiler and version
Detect ARCHITECTURE_ID for PPC / ARM / 86 targets
Detect PLATFORM_ID for Integrity and Integrity178 platforms
Using defines specified in the documents for the compilers: 201416 PPC / 201754 ARM / 201714 86
-- Fallback C/CXX compiler ID to GHS if not otherwise detected and using GHS MULTI generator
Works around issue with some GHS compilers not setting __ghs__ compiler define
-- Tweak Compiler ID checking so major id of 002017 is not replaced with 217
-- Prefer try_compile() library targets when testing for working GHS compilers
-- Avoid CMake errors if reading past end of file for checking if file is PE executable
|
|
|
|
|
|
|
| |
Teach `CMakeDetermineCompilerId` to recognize and parse the IAR-AVR
binary format so we can recognize this compiler id.
Issue: #18557
|
|
|
|
|
|
|
| |
Code for this was prototyped when ELF detection was added long ago but
left commented out. Use either MH_MAGIC or MH_CIGAM for the 32-bit
variant and use either or MH_MAGIC_64 or MH_CIGAM_64 for the 64-bit
variant.
|
|
|
|
|
|
|
|
| |
The IAR 6.50.6 compiler places extra/truncated copies of the
compiler id `INFO:` strings into binaries with a prefix like
`?<Constant "`. Teach CMakeDetermineCompilerId to ignore them.
Fixes: #18333
|
|
|
|
|
|
|
| |
If `CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY` is set then propagate
it to the compiler id test project too.
Fixes: #18292
|
|
|
|
|
|
|
|
|
| |
Xcode 10 no longer populates `CURRENT_ARCH` with the current
architecture in shell scripts and instead uses `undefined_arch`.
Instead we must use `ARCHS`. It lists all architectures separated by
spaces.
Fixes: #18085
|
|
|
|
|
|
|
|
| |
Add new `version=` parameter in the toolset setting to select the
version. Add variable `CMAKE_VS_PLATFORM_TOOLSET_VERSION` to hold the
version, if one is set (blank indicates default).
Fixes: #17549
|
|
|
|
|
|
|
| |
If the CUDA version macros are not defined, run `nvcc --version` and
extract the version from its output.
Fixes: #17920
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The check added by commit v3.10.0-rc2~2^2 (Clang: Diagnose unsupported
GNU-like clang targeting MSVC ABI, 2017-10-10) is incorrectly detecting
clang-cl 6.0 as GNU-like. Currently cmake is testing if the clang
compiler accepts `--version` to see if it accepts GNU style flags.
However, with the latest llvm snapshot this also works for clang-cl:
> clang-cl --version
clang version 6.0.0 (trunk)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\Program Files\LLVM\bin
So instead we should use the `/?` flag which fails with clang but
works with clang-cl:
> clang-cl /? &> /dev/null; echo $?
0
> clang /? &> /dev/null; echo $?
1
Fixes: #17518
|
|
|
|
|
|
|
|
|
|
| |
The LLVM/Clang installer on Windows provides a `LLVM/bin` directory
containing `clang.exe` and `clang++.exe` command-line tools that have a
GNU-like command-line but target the MSVC ABI (instead of MinGW). We
do not support this combination, so diagnose and reject it explicitly.
Tell users what to do to use the `clang-cl.exe` tool instead.
Issue: #16439
|
|
|
|
|
|
|
|
|
|
|
| |
Create a `CMAKE_<LANG>_COMPILER_VERSION_INTERNAL` variable to hold
a secondary/internal compiler version number detected at the same
time as the primary compiler version. This will be useful for some
compilers where we need such a number to determine correct usage.
Inspired-by: Stefan Andersson <tfosm@hotmail.com>
Suggested-by: Norbert Lange <norbert.lange@andritz.com>
Issue: #17264
|
|
|
|
| |
Closes #16839
|
|
|
|
| |
Issue #16839
|
|
|
|
|
|
| |
Visual Studio 15.4 adds support for this architecture.
Fixes: #17213
|
|\
| |
| |
| |
| |
| |
| | |
de9840d1 Ninja: Fix support for MSVC with non-English output
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1179
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
With MSVC the Ninja generator extracts the `cl -showIncludes` prefix.
When MSVC is configured to have non-English output, e.g. via
`VSLANG=2052` in the environment, then `cl` prints the prefix encoded
for the current code page, which is not necessarily UTF-8 encoding.
Currently we fail to convert the prefix to our internal UTF-8 encoding,
but assume it is UTF-8 later.
While writing `rules.ninja`, the Ninja generator converts our internal
UTF-8 encoding to the current code page. The `msvc_deps_prefix =` line
needs to be encoded as the current code page so that `ninja` can match
in the output from `cl -showIncludes` during the build.
Prior to commit v3.9.0-rc1~47^2 (codecvt: Re-implement do_out and
do_unshift, 2017-05-25), the non-UTF-8 prefix extracted above was
written without noticing its incorrect internal encoding. The
`rules.ninja` file was successfully written, but possibly with a mangled
`msvc_deps_prefix`. Since that commit the output stream correctly
rejects the non-UTF-8 byte sequence and writing `rules.ninja` fails.
Fix this by correctly converting the `cl -showIncludes` output from the
current code page to our internal UTF-8 encoding.
Fixes: #17191
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Make the implementation for this compiler more complete.
IAR has multiple C++ modes, historically they were reduced c++ versions
for embedded that gradually improved to the full standard (which can be
reduced again by e.g. disabling rtti and exceptions). The new
implementation picks the best available, but the c++ mode can also be
overridden by defining `CMAKE_IAR_CXX_FLAG`.
Add C/C++ standard flags so that all modes up to and including the last
supported standard are defined.
Fixes: #16826
|
|/
|
|
|
|
|
|
|
|
| |
Compilers such as MSVC and IAR may have variants that target different
architectures. We have been using a `MSVC_<LANG>_ARCHITECTURE_ID`
variable to hold this information for MSVC. Add an alternative with a
more general name (later we can port MSVC to it too).
This additional information may be needed to generate proper invocations
of the compiler based on its architecture variant.
|
| |
|
|
|
|
|
|
|
| |
During compiler identification, extract the Xcode `CURRENT_ARCH` value
and save it for later use by the Xcode generator in an internal compiler
information variable. This will be useful to know the locations of
object files when only one architecture is built.
|
|\
| |
| |
| |
| |
| |
| |
| | |
77139e32 Swift: Simplify mixed test case to make it version agnostic
c03141c0 Swift: Default to Swift 3.0 with Xcode 8.3 and later
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !638
|
| |
| |
| |
| |
| |
| |
| | |
Xcode 8.3 has dropped support for Swift 2.3 so that compiler and
feature detection failed.
Closes #16742
|
| |
| |
| |
| |
| | |
Teach `CMakeDetermineCompilerId` how to generate a vcxproj file using
the `CMAKE_VS_PLATFORM_TOOLSET_CUDA`.
|
| | |
|
| |
| |
| |
| |
| |
| | |
Make the `ClCompile` element name and `PostBuildEvent/Command` value
configurable. Move the current content into default values for the
corresponding variables.
|
|/
|
|
|
|
|
|
|
|
|
| |
Clang may raise an error when passed a `-march=` option that doesn't
correspond to the current target triple. CMake cannot pass the target
triple when determining the compiler id because it doesn't know how yet,
but it does pass along user-specified flags. This breaks when those
user-specified flags include `-march=`. Fix this use case by also
trying to find the compiler id without the user-specified flags.
Fixes: #16587
|
|
|
|
|
| |
The `nvcc -v` output on Windows uses response files, so load the one we
need to extract the full link line.
|