[Build] Add a patch to check whether we have .NET 4.6 at build time.#164
[Build] Add a patch to check whether we have .NET 4.6 at build time.#164Therzok merged 1 commit intogtk-sharp-2-12-branchfrom
Conversation
0558719 to
addd03d
Compare
|
Let's see how jenkins copes with this. |
6c76abb to
4afb5d7
Compare
configure.in.in
Outdated
|
|
||
| CSFLAGS="$DEBUG_FLAGS $CSDEFINES $WIN64DEFINES -unsafe" | ||
|
|
||
| if text "x$missing_net_4_6" = "xno" ; then |
configure.in.in
Outdated
| if test "x$has_mono" = "xfalse" ; then | ||
| PKG_CHECK_MODULES(MONO_DEPENDENCY, mono-2 >= $MONO_REQUIRED_VERSION, has_mono=true, has_mono=false) | ||
| if "x$has_mono" = "xtrue" ; then | ||
| PKG_CHECK_MODULES(MONO_DEPENDENCY, mono < $MONO_NET_4_6, missing_net_4_6=true, missing_net_4_6=false) |
There was a problem hiding this comment.
Rather use NET_4_6_SUPPORT (uppercase).
3a88086 to
e7bd823
Compare
glib/Marshaller.cs
Outdated
| } | ||
| } | ||
|
|
||
| #if HAVE_NET_4_6 |
There was a problem hiding this comment.
If you're doing a check at buildtime then you don't need a reflection check at runtime.
configure.in.in
Outdated
| AC_SUBST(OFF_T_FLAGS) | ||
|
|
||
| MONO_REQUIRED_VERSION=1.0 | ||
| MONO_NET_4_6=4.4 |
There was a problem hiding this comment.
How about "FIRST_MONO_VERSION_WITH_NET_4_6_SUPPORT"
e7bd823 to
1ad5f63
Compare
| if (hasFastGetStringOverload) | ||
| return Utf8PtrToStringFast (ptr, len); | ||
|
|
||
| #if HAVE_NET_4_6 |
There was a problem hiding this comment.
How about wrapping the old 3 lines with #if UTF8_SLOWPATH , and after them, return Utf8PtrToStringFast (ptr, len); this way removing this build check in the future will be easier and cause less diff noise
There was a problem hiding this comment.
The diff is still here since you commented on the define, see below, the Utf8PtrStringFast is inlined now under the same HAVE_NET_4_6.
This way, you can use unifdef to remove the segments.
| PKG_CHECK_MODULES(MONO_DEPENDENCY, mono >= $MONO_REQUIRED_VERSION, has_mono=true, has_mono=false) | ||
| if test "x$has_mono" = "xfalse" ; then | ||
| PKG_CHECK_MODULES(MONO_DEPENDENCY, mono-2 >= $MONO_REQUIRED_VERSION, has_mono=true, has_mono=false) | ||
| if test "x$has_mono" = "xtrue" ; then |
There was a problem hiding this comment.
Beware, you placed this if test "x$has_mono" = "xtrue" check inside a has_mono=xfalse block, so potentially this may always evaluate to false.
There was a problem hiding this comment.
But the above pkg check resets the value.
1ad5f63 to
4e6206d
Compare
No description provided.