diff options
author | Jay Krell <jay.krell@cornell.edu> | 2018-09-24 06:18:23 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-24 06:18:23 +0300 |
commit | 06d6c4c3b3b5f71adfdba791e6bbcdc7f00e6997 (patch) | |
tree | da2a29d539348e6eb2d813a0b83e7cb9acd02082 /scripts/ci | |
parent | 3f63bad14e26e5252b7aa25182e91ed1cd4433cb (diff) |
[ci][cxx][sdks] C++ support for SDKs. (#10701)
* [ci][cxx][sdks] C++ support for SDKs.
* Remove cplusplus support, only cxx.
* [cxx][sdks] Provide isinf and isnan.
https://jenkins.mono-project.com/job/test-mono-pull-request-amd64-osx-products-sdks-android-cxx/1/parsed_console/log.html
/Users/builder/jenkins/workspace/test-mono-pull-request-amd64-osx-products-sdks-android-cxx/mono/mini/jit-icalls.c:994:14: error: 'isinf' was not declared in this scope
if (isinf (v) || isnan (v))
/Users/builder/jenkins/workspace/test-mono-pull-request-amd64-osx-products-sdks-android-cxx/mono/mini/jit-icalls.c:994:27: error: 'isnan' was not declared in this scope
if (isinf (v) || isnan (v))
* Change target card mask from gpointer to mgreg_t.
Consider in future target_gsize instead, though if registers are larger than pointers (x32, arm64_32), ok.
Change inst_imm from mgreg_t to target_mgreg_t.
https://jenkins.mono-project.com/job/test-mono-pull-request-wasm-cxx/1/parsed_console/log.html
/mnt/jenkins/workspace/test-mono-pull-request-wasm-cxx/mono/mini/mini-runtime.c:3657:24: error: cast from 'gpointer {aka void*}' to 'mgreg_t {aka int}' loses precision [-fpermissive]
g_assert ((((mgreg_t)arg) & 1) == 0);
^ ^~~~
/mnt/jenkins/workspace/test-mono-pull-request-wasm-cxx/mono/mini/mini-runtime.c:3658:30: error: cast from 'gpointer {aka void*}' to 'mgreg_t {aka int}' loses precision [-fpermissive]
arg = (gpointer)(((mgreg_t)arg) | 1);
In file included from /mnt/jenkins/workspace/test-mono-pull-request-wasm-cxx/mono/mini/method-to-ir.c:75:0:
/mnt/jenkins/workspace/test-mono-pull-request-wasm-cxx/mono/mini/method-to-ir.c: In function 'void mini_emit_write_barrier(MonoCompile*, MonoInst*, MonoInst*)':
/mnt/jenkins/workspace/test-mono-pull-request-wasm-cxx/mono/mini/ir-emit.h:703:39: error: cast from 'gpointer {aka void*}' to 'mgreg_t {aka int}' loses precision [-fpermissive]
inst->inst_imm = (mgreg_t)(imm); \
^
/mnt/jenkins/workspace/test-mono-pull-request-wasm-cxx/mono/mini/method-to-ir.c:2989:4: note: in expansion of macro 'MONO_EMIT_NEW_BIALU_IMM'
MONO_EMIT_NEW_BIALU_IMM (cfg, OP_PAND_IMM, offset_reg, offset_reg, card_table_mask);
^~~~~~~~~~~~~~~~~~~~~~~
* [cxx][sdks] Move include out of extern "C" where it never belongs.
https://jenkins.mono-project.com/job/test-mono-pull-request-amd64-osx-products-sdks-android-cxx/4/parsed_console/log.html
template<typename _Tp, typename _Up, typename _Vp,
^
/Users/builder/android-toolchain/mxe-b9cbb53/lib/gcc/x86_64-w64-mingw32.static/5.4.0/include/c++/ext/type_traits.h:205:3: error: template with C linkage
template<typename _Tp, typename _Up, typename _Vp, typename _Wp,
^
In file included from /Users/builder/jenkins/workspace/test-mono-pull-request-amd64-osx-products-sdks-android-cxx/mono/utils/mono-compiler.h:31:0,
from /Users/builder/jenkins/workspace/test-mono-pull-request-amd64-osx-products-sdks-android-cxx/mono/utils/dlmalloc.h:33,
from /Users/builder/jenkins/workspace/test-mono-pull-request-amd64-osx-products-sdks-android-cxx/mono/utils/dlmalloc.c:27:
/Users/builder/android-toolchain/mxe-b9cbb53/lib/gcc/x86_64-w64-mingw32.static/5.4.0/include/c++/cmath: In function 'constexpr float std::abs(float)':
/Users/builder/android-toolchain/mxe-b9cbb53/lib/gcc/x86_64-w64-mingw32.static/5.4.0/include/c++/cmath:87:16: error: conflicting declaration of C function 'constexpr float std::abs(float)'
abs(float __x)
* Expand cmath to wasm.
https://jenkins.mono-project.com/job/test-mono-pull-request-wasm-cxx/5/parsed_console/log.html
/mnt/jenkins/workspace/test-mono-pull-request-wasm-cxx/mono/mini/mini-llvm.c:4189:6: error: 'isnan' was not declared in this scope
if (isnan (val))
^~~~~
* Provide cmath std::isnan for WebAssembly C++.
* Provide cmath std::isfinite for Android C++.
* Add cmath std::isunordered for Android
/Users/builder/jenkins/workspace/test-mono-pull-request-amd64-osx-products-sdks-android-cxx/mono/mini/interp/interp.c:3282:14: error: use of undeclared identifier 'isunordered'; did you mean 'std::isunordered'?
CONDBR_S(!isunordered (sp [0].data.f, sp [1].data.f) && sp[0].data.f <= sp[1].data.f)
^~~~~~~~~~~
std::isunordered
* Add cmath std::isinf for Android.
https://jenkins.mono-project.com/job/test-mono-pull-request-amd64-osx-products-sdks-android-cxx/10/parsed_console/log.html
/Users/builder/jenkins/workspace/test-mono-pull-request-amd64-osx-products-sdks-android-cxx/mono/mini/interp/interp.c:3751:8: error: use of undeclared identifier 'isinf'
if (isinf (sp [-1].data.f))
* "using std::isinf" sometimes breaks on Android, sometimes fixes Android,
because Android sometimes has global isinf.
/Users/builder/jenkins/workspace/test-mono-pull-request-amd64-osx-products-sdks-android-cxx/mono/mini/interp/interp.c:92:12: error: target of using declaration conflicts with declaration already in scope
using std::isinf;
^
/Users/builder/android-toolchain/toolchains/arm64-v8a-clang/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../include/c++/4.9.x/cmath:604:3: note: target of using declaration
isinf(double __x)
^
/Users/builder/android-toolchain/toolchains/arm64-v8a-clang/bin/../sysroot/usr/include/math.h:234:6: note: conflicting declaration
int (isinf)(double) __pure2;
There are still some errors in new lanes (WebAssembly works, Android does not, iOS not sure), to be addressed shortly, possibly by redoing some of the cmath stuff.
Diffstat (limited to 'scripts/ci')
-rwxr-xr-x | scripts/ci/run-jenkins.sh | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/scripts/ci/run-jenkins.sh b/scripts/ci/run-jenkins.sh index d377bea481c..6d8623c7754 100755 --- a/scripts/ci/run-jenkins.sh +++ b/scripts/ci/run-jenkins.sh @@ -88,10 +88,6 @@ if [[ ${CI_TAGS} == *'cxx'* ]]; then MSBUILD_CXX="/p:MONO_COMPILE_AS_CPP=true" fi -if [[ ${CI_TAGS} == *'cplusplus'* ]]; then - EXTRA_CONF_FLAGS="$EXTRA_CONF_FLAGS -enable-cxx" -fi - if [[ ${CI_TAGS} == *'win-'* ]]; then mkdir -p ~/.config/.mono/ @@ -102,6 +98,9 @@ if [[ ${CI_TAGS} == *'product-sdks-ios'* ]]; then echo "DISABLE_ANDROID=1" > sdks/Make.config echo "DISABLE_WASM=1" >> sdks/Make.config + if [[ ${CI_TAGS} == *'cxx'* ]]; then + echo "ENABLE_CXX=1" >> sdks/Make.config + fi export device_test_suites="Mono.Runtime.Tests System.Core" ${TESTCMD} --label=provision-llvm --timeout=60m --fatal make -j ${CI_CPU_COUNT} -C sdks/builds provision-llvm36-llvm32 provision-llvm-llvm64 @@ -139,6 +138,9 @@ if [[ ${CI_TAGS} == *'product-sdks-android'* ]]; echo "IGNORE_PROVISION_MXE=1" >> sdks/Make.config echo "IGNORE_PROVISION_LLVM=1" >> sdks/Make.config echo "DISABLE_CCACHE=1" >> sdks/Make.config + if [[ ${CI_TAGS} == *'cxx'* ]]; then + echo "ENABLE_CXX=1" >> sdks/Make.config + fi # For some very strange reasons, `make -C sdks/android accept-android-license` get stuck when invoked through ${TESTCMD} # but doesn't get stuck when called via the shell, so let's just call it here now. ${TESTCMD} --label=provision-android --timeout=120m --fatal make -j ${CI_CPU_COUNT} -C sdks/builds provision-android && make -C sdks/android accept-android-license @@ -175,6 +177,9 @@ if [[ ${CI_TAGS} == *'webassembly'* ]]; echo "DISABLE_ANDROID=1" > sdks/Make.config echo "DISABLE_IOS=1" >> sdks/Make.config echo "DISABLE_DESKTOP=1" >> sdks/Make.config + if [[ ${CI_TAGS} == *'cxx'* ]]; then + echo "ENABLE_CXX=1" >> sdks/Make.config + fi ${TESTCMD} --label=runtimes --timeout=60m --fatal make -j ${CI_CPU_COUNT} -C sdks/builds package-wasm-runtime package-wasm-cross ${TESTCMD} --label=bcl --timeout=60m --fatal make -j ${CI_CPU_COUNT} -C sdks/builds package-bcl ${TESTCMD} --label=wasm-build --timeout=60m --fatal make -j ${CI_CPU_COUNT} -C sdks/wasm build |