office-gobmx/cli_ure/Executable_climaker.mk
Stephan Bergmann 0a99b5a1b7 When building with clang-cl on Windows, build CLR code with MSVC
...as clang-cl doesn't support the /clr switch.

* In configure.ac, capture the MSCV version (that would be used if CC hadn't
  been overridden to use clang-cl) into MSVC_CXX.

* The logic which flags to pass into gb_CObject__command_pattern is coded into
  the platform-agnostic LinkTarget.mk, so it's too late to try and filter all
  relevant flags in com_GCC_class.mk, depending on whether a given .cxx file is
  a normal one built with the normal $CXX or a special /clr one built with
  $MSVC_CXX.  Thus, a new CxxClrObject class had to be introduced that captures
  this information early.

* When building with clang-cl, the generated config_host/config_*.h files
  contain values suitable for clang-cl, but not for MSVC.  But the .cxx files
  compiled with MSVC happen to include config_global.h, and would fail.  Hack
  around that problem for now by introducing a hard-coded, minimal
  solenv/clang-cl/config_global.h that is found first when buliding such a
  CxxClrObject.  Needs cleaning-up properly.

Change-Id: Iff8aac51c0b4fa906b14503c692640dda0996d33
Reviewed-on: https://gerrit.libreoffice.org/34509
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-21 10:18:58 +00:00

51 lines
1.1 KiB
Makefile

# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_Executable_Executable,climaker))
$(eval $(call gb_Executable_use_package,climaker,\
cli_basetypes_copy \
))
$(eval $(call gb_Executable_add_cxxclrflags,climaker,\
-LN \
-wd4715 \
))
$(eval $(call gb_Executable_add_ldflags,climaker,\
-ignore:4248 \
))
$(eval $(call gb_Executable_use_internal_bootstrap_api,climaker,\
udkapi \
))
$(eval $(call gb_Executable_use_libraries,climaker,\
cppu \
cppuhelper \
sal \
salhelper \
unoidl \
$(gb_UWINAPI) \
))
$(eval $(call gb_Executable_use_system_win32_libs,climaker,\
mscoree \
msvcmrt \
))
$(eval $(call gb_Executable_add_cxxclrobjects,climaker,\
cli_ure/source/climaker/climaker_app \
cli_ure/source/climaker/climaker_emit \
))
$(call gb_Executable_get_headers_target,climaker) : \
$(call gb_CliLibrary_get_target,cli_basetypes)
# vim: set noet sw=4 ts=4: