|
2 | 2 | <PropertyGroup> |
3 | 3 | <AndroidGenerateAppBundle Condition="'$(AndroidGenerateAppBundle)' == '' and '$(GenerateAppBundle)' != ''">$(GenerateAppBundle)</AndroidGenerateAppBundle> |
4 | 4 | <AndroidGenerateAppBundle Condition="'$(AndroidGenerateAppBundle)' == ''">true</AndroidGenerateAppBundle> |
5 | | - <!-- Unable to properly integrate nativelib into app build, so not supported for now. --> |
6 | | - <AndroidGenerateAppBundle Condition="'$(_IsLibraryMode)' == 'true'">false</AndroidGenerateAppBundle> |
| 5 | + <AndroidGenerateAppBundle Condition="'$(_IsLibraryMode)' == 'true' and '$(ForceLibraryModeGenerateAppBundle)' != 'true'">false</AndroidGenerateAppBundle> |
7 | 6 |
|
8 | 7 | <EnableDefaultAssembliesToBundle Condition="'$(EnableDefaultAssembliesToBundle)' == ''">false</EnableDefaultAssembliesToBundle> |
9 | 8 | </PropertyGroup> |
|
47 | 46 | </PropertyGroup> |
48 | 47 |
|
49 | 48 | <ItemGroup Condition="'$(_IsLibraryMode)' == 'true'"> |
| 49 | + <_CommonLinkerArgs Include="-l:libz.so" /> |
| 50 | + <_CommonLinkerArgs Include="-l:liblog.so" /> |
| 51 | + <_CommonLinkerArgs Include="-l:libc.so" /> |
| 52 | + <_CommonLinkerArgs Include="-l:libm.so" /> |
| 53 | + <_CommonLinkerArgs Include="--build-id=sha1" /> |
| 54 | + |
50 | 55 | <!-- add all non stub libs first --> |
51 | 56 | <!-- if RuntimeComponents is empty, exclude -static.a and include -stub-static.a instead --> |
52 | 57 | <!-- if RuntimeComponents is *, we're ok because all -static.a is included --> |
|
74 | 79 | </PropertyGroup> |
75 | 80 |
|
76 | 81 | <RemoveDir Directories="$(AndroidBundleDir)" /> |
| 82 | + <MakeDir Directories="$(AndroidBundleDir)" /> |
77 | 83 | </Target> |
78 | 84 |
|
79 | 85 | <Target Name="_AndroidResolveReferences"> |
|
110 | 116 | <PropertyGroup Condition="'$(_IsLibraryMode)' == 'true'"> |
111 | 117 | <_UsesRuntimeInitCallback>$(UsesRuntimeInitCallback)</_UsesRuntimeInitCallback> |
112 | 118 | <_UsesRuntimeInitCallback Condition="'$(_UsesRuntimeInitCallback)' == ''">true</_UsesRuntimeInitCallback> |
| 119 | + <_AotOutputType>ObjectFile</_AotOutputType> |
113 | 120 | </PropertyGroup> |
114 | 121 |
|
115 | 122 | <ItemGroup> |
|
142 | 149 | </PropertyGroup> |
143 | 150 |
|
144 | 151 | <NdkToolFinderTask |
145 | | - Condition="'$(AOTWithLibraryFiles)' == 'true'" |
| 152 | + Condition="'$(AOTWithLibraryFiles)' == 'true' or '$(_IsLibraryMode)' == 'true'" |
146 | 153 | Architecture="$(TargetArchitecture)" |
147 | 154 | HostOS="$(_HostOS)" |
148 | 155 | MinApiLevel="$(AndroidLibraryMinApiLevel)"> |
|
154 | 161 | <Output TaskParameter="ClangPath" PropertyName="_ClangPath" /> |
155 | 162 | </NdkToolFinderTask> |
156 | 163 |
|
157 | | - <PropertyGroup Condition="'$(AOTWithLibraryFiles)' == 'true'"> |
| 164 | + <PropertyGroup Condition="'$(AOTWithLibraryFiles)' == 'true' or '$(_IsLibraryMode)' == 'true'"> |
158 | 165 | <_AsPrefixPath>$([MSBuild]::EnsureTrailingSlash('$(_AsPrefixPath)'))</_AsPrefixPath> |
159 | 166 | <_ToolPrefixPath>$([MSBuild]::EnsureTrailingSlash('$(_ToolPrefixPath)'))</_ToolPrefixPath> |
160 | 167 | </PropertyGroup> |
|
0 commit comments