Skip to content

Commit 597b411

Browse files
committed
[build] Prepare Java.Runtime.Environment.Override.dllmap
Prepare dllmap override in Java.Interop repo to have Java.Runtime.Environment.dll working with our libmono-android shared library. Introduced `build-tools/scripts/java-interop.dllmap` to share that information between `Java.Interop.dll.config` and `Java.Runtime.Environment.dll.config`.
1 parent d8fdbcf commit 597b411

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ prepare-deps: prepare-external
108108
prepare-props: prepare-deps
109109
cp build-tools/scripts/Configuration.Java.Interop.Override.props external/Java.Interop/Configuration.Override.props
110110
cp $(call GetPath,MonoSource)/mcs/class/msfinal.pub .
111+
cp build-tools/scripts/java-interop.dllmap external/Java.Interop/Java.Runtime.Environment.Override.dllmap
111112

112113
prepare-msbuild: prepare-props
113114
ifeq ($(USE_MSBUILD),1)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<dllmap dll="java-interop" os="osx" target="lib/host-Darwin/libmono-android.debug.dylib" />
2+
<dllmap dll="java-interop" os="linux" target="lib/host-Linux/libmono-android.debug.so" />
3+
<dllmap dll="java-interop" os="windows" wordsize="64" target="lib/host-mxe-Win64/libmono-android.debug.dll" />
4+
<dllmap dll="java-interop" os="windows" wordsize="32" target="lib/host-mxe-Win32/libmono-android.debug.dll" />

external/Java.Interop

src/monodroid/monodroid.targets

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,14 +146,15 @@
146146
<Target Name="_CreateJavaInteropDllConfig"
147147
Inputs="$(XAInstallPrefix)xbuild\Xamarin\Android\Java.Interop.dll"
148148
Outputs="$(XAInstallPrefix)xbuild\Xamarin\Android\Java.Interop.dll.config">
149+
<ReadLinesFromFile
150+
File="../../build-tools/scripts/java-interop.dllmap">
151+
<Output
152+
TaskParameter="Lines"
153+
ItemName="_JavaInteropDllMapContent" />
154+
</ReadLinesFromFile>
149155
<WriteLinesToFile
150156
File="$(XAInstallPrefix)xbuild\Xamarin\Android\Java.Interop.dll.config"
151-
Lines="&lt;configuration&gt;
152-
&lt;dllmap dll=&quot;java-interop&quot; os=&quot;osx&quot; target=&quot;lib/host-Darwin/libmono-android.debug.dylib&quot; /&gt;
153-
&lt;dllmap dll=&quot;java-interop&quot; os=&quot;linux&quot; target=&quot;lib/host-Linux/libmono-android.debug.so&quot; /&gt;
154-
&lt;dllmap dll=&quot;java-interop&quot; os=&quot;windows&quot; wordsize=&quot;64&quot; target=&quot;lib/host-mxe-Win64/libmono-android.debug.dll&quot; /&gt;
155-
&lt;dllmap dll=&quot;java-interop&quot; os=&quot;windows&quot; wordsize=&quot;32&quot; target=&quot;lib/host-mxe-Win32/libmono-android.debug.dll&quot; /&gt;
156-
&lt;/configuration&gt;"
157+
Lines="&lt;configuration&gt;;@(_JavaInteropDllMapContent);&lt;/configuration&gt;"
157158
Overwrite="True"
158159
/>
159160
</Target>

0 commit comments

Comments
 (0)