diff --git a/configure b/configure index ff6dc8ddae2e..e31e61d1de79 100755 --- a/configure +++ b/configure @@ -47,6 +47,7 @@ Usage: configure [options] EOL } +cd "$(dirname "${BASH_SOURCE[0]}")" CONFIGURED_FILE=configure.inc rm -f $CONFIGURED_FILE diff --git a/dotnet/targets/Xamarin.Shared.Sdk.props b/dotnet/targets/Xamarin.Shared.Sdk.props index 7345d2c72cad..3bff654e6993 100644 --- a/dotnet/targets/Xamarin.Shared.Sdk.props +++ b/dotnet/targets/Xamarin.Shared.Sdk.props @@ -55,6 +55,9 @@ <_RequiresILLinkPack Condition="'$(_RequiresILLinkPack)' == ''">true + + + <_ExportSymbolsExplicitly Condition="'$(_ExportSymbolsExplicitly)' == ''">true diff --git a/dotnet/targets/Xamarin.Shared.Sdk.targets b/dotnet/targets/Xamarin.Shared.Sdk.targets index b1f11719017a..20d545110cb5 100644 --- a/dotnet/targets/Xamarin.Shared.Sdk.targets +++ b/dotnet/targets/Xamarin.Shared.Sdk.targets @@ -1208,6 +1208,10 @@ + + <_ExportedSymbolsFile Condition="'$(_ExportedSymbolsFile)' == '' and '$(_MtouchSymbolsList)' == ''">/dev/null + <_ExportedSymbolsFile Condition="'$(_ExportedSymbolsFile)' == ''">$(_MtouchSymbolsList) + <_XamarinMainLibraries Include="$(_XamarinNativeLibraryDirectory)/$(_LibXamarinName)" /> @@ -1224,6 +1228,9 @@ <_MainLinkerFlags Include="-liconv" /> <_MainLinkerFlags Include="-lcompression" /> + <_MainLinkerFlags Condition="'$(_ExportSymbolsExplicitly)' == 'true'" Include="-exported_symbols_list" /> + <_MainLinkerFlags Condition="'$(_ExportSymbolsExplicitly)' == 'true'" Include="$(_ExportedSymbolsFile)" /> + <_LinkNativeExecutableInputs Include="@(_NativeExecutableObjectFiles)" /> <_LinkNativeExecutableInputs Include="@(_XamarinMainLibraries)" /> @@ -1310,13 +1317,21 @@ <_NativeReferences Include="@(_FileNativeReference)" Condition="'%(_FileNativeReference.LinkToExecutable)' != 'false'" /> + + + + + <_AllLinkerFlags Include="@(_AssemblyLinkerFlags);@(_MainLinkerFlags);@(_CustomLinkFlags)" /> + <_AllLinkerFlags Condition="'$(_ExportSymbolsExplicitly)' != 'true'" Include="@(_ReferencesLinkerFlags)" /> + + - - - diff --git a/msbuild/Xamarin.MacDev.Tasks/Decompress.cs b/msbuild/Xamarin.MacDev.Tasks/Decompress.cs index db0bfb7b4b47..1be06290795b 100644 --- a/msbuild/Xamarin.MacDev.Tasks/Decompress.cs +++ b/msbuild/Xamarin.MacDev.Tasks/Decompress.cs @@ -130,7 +130,7 @@ public static bool TryDecompress (TaskLoggingHelper log, string zip, string reso static bool TryDecompressUsingUnzip (TaskLoggingHelper log, string zip, string resource, string decompressionDir) { - var archive = ZipFile.OpenRead (zip); + using var archive = ZipFile.OpenRead (zip); resource = resource.Replace ('\\', zipDirectorySeparator); var entry = archive.GetEntry (resource); if (entry is null) { @@ -165,7 +165,7 @@ static bool TryDecompressUsingSystemIOCompression (TaskLoggingHelper log, string resource = resource.Replace ('\\', zipDirectorySeparator); var resourceAsDir = resource + zipDirectorySeparator; - var archive = ZipFile.OpenRead (zip); + using var archive = ZipFile.OpenRead (zip); foreach (var entry in archive.Entries) { var entryPath = entry.FullName; if (entryPath.Length == 0) diff --git a/msbuild/Xamarin.MacDev.Tasks/Tasks/CreateBindingResourcePackageBase.cs b/msbuild/Xamarin.MacDev.Tasks/Tasks/CreateBindingResourcePackageBase.cs index fc2e29866966..8286a742ecd5 100644 --- a/msbuild/Xamarin.MacDev.Tasks/Tasks/CreateBindingResourcePackageBase.cs +++ b/msbuild/Xamarin.MacDev.Tasks/Tasks/CreateBindingResourcePackageBase.cs @@ -96,6 +96,7 @@ public override bool Execute () Log.LogWarning (MSBStrings.W7100, bindingOutputPath); } } + packagedFiles.Add (manifestPath); } PackagedFiles = packagedFiles.Select (v => new TaskItem (v)).ToArray (); diff --git a/msbuild/Xamarin.MacDev.Tasks/Tasks/ResolveNativeReferencesBase.cs b/msbuild/Xamarin.MacDev.Tasks/Tasks/ResolveNativeReferencesBase.cs index 92cfff92bf8c..92787e318191 100644 --- a/msbuild/Xamarin.MacDev.Tasks/Tasks/ResolveNativeReferencesBase.cs +++ b/msbuild/Xamarin.MacDev.Tasks/Tasks/ResolveNativeReferencesBase.cs @@ -252,7 +252,7 @@ static bool TryGetSidecarManifest (TaskLoggingHelper log, string resources, [Not static bool TryGetInfoPlist (TaskLoggingHelper log, string resourcePath, string xcframework, [NotNullWhen (true)] out PDictionary? plist) { var manifestPath = Path.Combine (xcframework, "Info.plist"); - var stream = CompressionHelper.TryGetPotentiallyCompressedFile (log, resourcePath, manifestPath); + using var stream = CompressionHelper.TryGetPotentiallyCompressedFile (log, resourcePath, manifestPath); if (stream is null) { plist = null; return false; diff --git a/tools/common/Make.common b/tools/common/Make.common index a8ec899bb0be..246eca00f0e7 100644 --- a/tools/common/Make.common +++ b/tools/common/Make.common @@ -60,7 +60,7 @@ $(Q) if ! diff $@ $@.tmp >/dev/null; then $(CP) $@.tmp $@; git diff "$@"; echo "The file $(TOP)/tools/common/SdkVersions.cs has been automatically re-generated; please commit the changes."; exit 1; fi $(Q) touch $@ -../common/ProductConstants.cs: ../common/ProductConstants.in.cs Makefile $(TOP)/Make.config +../common/ProductConstants.cs: ../common/ProductConstants.in.cs Makefile $(TOP)/Make.config $(TOP)/.git/index $(Q_GEN) sed \ -e "s/@IOS_VERSION@/$(IOS_PACKAGE_VERSION_MAJOR).$(IOS_PACKAGE_VERSION_MINOR).$(IOS_PACKAGE_VERSION_REV)/g" \ -e "s/@TVOS_VERSION@/$(IOS_PACKAGE_VERSION_MAJOR).$(IOS_PACKAGE_VERSION_MINOR).$(IOS_PACKAGE_VERSION_REV)/g" \