diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-02-20 16:28:06 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-02-21 10:18:58 +0000 |
commit | 0a99b5a1b7325454fe3d1174d44354888aa22012 (patch) | |
tree | 9edc1d3cca42c07ae4767ad7ca3b150895ac5295 /cli_ure | |
parent | 0649622956431e0a1955cb80d1175025401ab5e5 (diff) |
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>
Diffstat (limited to 'cli_ure')
-rw-r--r-- | cli_ure/Executable_climaker.mk | 7 | ||||
-rw-r--r-- | cli_ure/Library_cli_cppuhelper_native.mk | 13 | ||||
-rw-r--r-- | cli_ure/Library_cli_uno.mk | 9 |
3 files changed, 5 insertions, 24 deletions
diff --git a/cli_ure/Executable_climaker.mk b/cli_ure/Executable_climaker.mk index 298f01ebf45f..6f1a37b8ce10 100644 --- a/cli_ure/Executable_climaker.mk +++ b/cli_ure/Executable_climaker.mk @@ -13,11 +13,8 @@ $(eval $(call gb_Executable_use_package,climaker,\ cli_basetypes_copy \ )) -$(eval $(call gb_Executable_add_cxxflags,climaker,\ - -AI $(INSTDIR)/$(LIBO_URE_LIB_FOLDER) \ - -EHa -clr \ +$(eval $(call gb_Executable_add_cxxclrflags,climaker,\ -LN \ - -wd4339 \ -wd4715 \ )) @@ -43,7 +40,7 @@ $(eval $(call gb_Executable_use_system_win32_libs,climaker,\ msvcmrt \ )) -$(eval $(call gb_Executable_add_exception_objects,climaker,\ +$(eval $(call gb_Executable_add_cxxclrobjects,climaker,\ cli_ure/source/climaker/climaker_app \ cli_ure/source/climaker/climaker_emit \ )) diff --git a/cli_ure/Library_cli_cppuhelper_native.mk b/cli_ure/Library_cli_cppuhelper_native.mk index 52314a3baeaa..bb230fb0108d 100644 --- a/cli_ure/Library_cli_cppuhelper_native.mk +++ b/cli_ure/Library_cli_cppuhelper_native.mk @@ -11,15 +11,6 @@ include $(SRCDIR)/cli_ure/version/version.txt $(eval $(call gb_Library_Assembly,cli_cppuhelper)) -# When compiling for CLR, disable "warning C4339: use of undefined type detected -# in CLR meta-data - use of this type may lead to a runtime exception": -$(eval $(call gb_Library_add_cxxflags,cli_cppuhelper,\ - -AI $(INSTDIR)/$(LIBO_URE_LIB_FOLDER) \ - -EHa \ - -clr \ - -wd4339 \ -)) - $(eval $(call gb_Library_add_ldflags,cli_cppuhelper,\ -ignore:4248 \ -keyfile:$(SRCDIR)/cli_ure/source/cliuno.snk \ @@ -48,12 +39,12 @@ $(eval $(call gb_Library_use_system_win32_libs,cli_cppuhelper,\ msvcmrt \ )) -$(eval $(call gb_Library_add_exception_objects,cli_cppuhelper,\ +$(eval $(call gb_Library_add_cxxclrobjects,cli_cppuhelper,\ cli_ure/source/native/native_bootstrap \ cli_ure/source/native/path \ )) -$(eval $(call gb_Library_add_generated_exception_objects,cli_cppuhelper,\ +$(eval $(call gb_Library_add_generated_cxxclrobjects,cli_cppuhelper,\ CustomTarget/cli_ure/source/native/assembly \ )) diff --git a/cli_ure/Library_cli_uno.mk b/cli_ure/Library_cli_uno.mk index 0629a171ec6c..75eadae723d6 100644 --- a/cli_ure/Library_cli_uno.mk +++ b/cli_ure/Library_cli_uno.mk @@ -9,13 +9,6 @@ $(eval $(call gb_Library_Library,cli_uno)) -$(eval $(call gb_Library_add_cxxflags,cli_uno,\ - -AI $(INSTDIR)/$(LIBO_URE_LIB_FOLDER) \ - -EHa \ - -clr \ - -wd4339 \ -)) - $(eval $(call gb_Library_add_ldflags,cli_uno,\ -ignore:4248 \ )) @@ -32,7 +25,7 @@ $(eval $(call gb_Library_use_system_win32_libs,cli_uno,\ msvcmrt \ )) -$(eval $(call gb_Library_add_exception_objects,cli_uno,\ +$(eval $(call gb_Library_add_cxxclrobjects,cli_uno,\ cli_ure/source/uno_bridge/cli_bridge \ cli_ure/source/uno_bridge/cli_data \ cli_ure/source/uno_bridge/cli_environment \ |