mirror of
https://github.com/Kitware/CMake.git
synced 2026-11-06 05:16:58 +00:00
Add a new compiler id, EMBTClang, for the Embarcadero clang-based Win64 compiler (bcc64x), as a Clang variant detected by its __CODEGEARC__ marker on the MinGW-w64 target, and exclude that target from the Embarcadero compiler id. Provide Compiler/ and Platform/ modules for C, CXX, and ASM, including feature tests, binutils discovery with the linker, resource compiler, and LLVM binutils pinned to the toolchain, and the derived RTL and include directories forwarded into try_compile. Drive the WIN32_EXECUTABLE property through the toolchain's console and GUI subsystem switches, and add an EMBT_RUNTIME_LIBRARY target property (Static or Dynamic) implemented like WATCOM_RUNTIME_LIBRARY and MSVC_RUNTIME_LIBRARY. Build shared and module libraries as plain DLLs. Search for libraries as name.lib before the MinGW names, and do not add the GNU -Bstatic and -Bdynamic switches. Do not provide a C++ module dependency scanning rule: the toolchain's clang-scan-deps does not apply the bcc64x driver's target, standard, and include paths. Document the new id and property, and add RunCMake and build tests covering detection, the runtime-library property, binutils pinning, the console/GUI subsystem macros, precompiled header reuse across target kinds, and C++20 builds without module scanning. Closes: #26769
15 lines
233 B
C++
15 lines
233 B
C++
#include <string>
|
|
|
|
extern "C" __declspec(dllexport) int rtlmod_size()
|
|
{
|
|
std::string s = "x";
|
|
return static_cast<int>(s.size());
|
|
}
|
|
|
|
#ifdef __DLL__
|
|
extern "C" __declspec(dllexport) int rtlmod_has_dll_macro()
|
|
{
|
|
return 1;
|
|
}
|
|
#endif
|