From 840ee5bcbf2707755f11c888162d487ab3cd06f0 Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Wed, 25 Jan 2023 09:44:16 +0100 Subject: [PATCH] Add build option to strip out debug symbols when building MonoAOT iOS sample app --- src/mono/sample/iOS/Makefile | 3 + src/mono/sample/iOS/Program.csproj | 5 ++ src/mono/sample/iOS/symbols.list | 111 +++++++++++++++++++++++++++++ 3 files changed, 119 insertions(+) create mode 100644 src/mono/sample/iOS/symbols.list diff --git a/src/mono/sample/iOS/Makefile b/src/mono/sample/iOS/Makefile index 01ae748bbda1a..b66e38670e033 100644 --- a/src/mono/sample/iOS/Makefile +++ b/src/mono/sample/iOS/Makefile @@ -6,6 +6,7 @@ AOT?=false TARGET?=iossimulator DEPLOY_AND_RUN?=true APP_SANDBOX?=false +STRIP_DEBUG_SYMBOLS?=false #If DIAGNOSTIC_PORTS is enabled, RUNTIME_COMPONENTS must also be enabled. #If RUNTIME_COMPONENTS is enabled, DIAGNOSTIC_PORTS is optional. @@ -33,6 +34,7 @@ run: clean appbuilder /p:TargetArchitecture=$(MONO_ARCH) \ /p:UseLLVM=$(USE_LLVM) \ /p:ForceAOT=$(AOT) \ + /p:StripDebugSymbols=$(STRIP_DEBUG_SYMBOLS) \ '/p:RuntimeComponents="$(RUNTIME_COMPONENTS)"' \ '/p:DeployAndRun="$(DEPLOY_AND_RUN)"' \ '/p:DiagnosticPorts="$(DIAGNOSTIC_PORTS)"' @@ -44,6 +46,7 @@ run-sim: clean appbuilder /p:TargetArchitecture=$(MONO_ARCH) \ /p:UseLLVM=$(USE_LLVM) \ /p:ForceAOT=$(AOT) \ + /p:StripDebugSymbols=$(STRIP_DEBUG_SYMBOLS) \ '/p:RuntimeComponents="$(RUNTIME_COMPONENTS)"' \ '/p:DeployAndRun="$(DEPLOY_AND_RUN)"' \ '/p:DiagnosticPorts="$(DIAGNOSTIC_PORTS)"' diff --git a/src/mono/sample/iOS/Program.csproj b/src/mono/sample/iOS/Program.csproj index 765658d4837d8..953f9d4db7953 100644 --- a/src/mono/sample/iOS/Program.csproj +++ b/src/mono/sample/iOS/Program.csproj @@ -9,6 +9,7 @@ $(TargetOS)-$(TargetArchitecture) $(DefineConstants);CI_TEST HelloiOS + false @@ -97,6 +98,10 @@ + + diff --git a/src/mono/sample/iOS/symbols.list b/src/mono/sample/iOS/symbols.list new file mode 100644 index 0000000000000..256506b5f2352 --- /dev/null +++ b/src/mono/sample/iOS/symbols.list @@ -0,0 +1,111 @@ +_SystemNative_Abort +_SystemNative_Exit +_SystemNative_SchedGetCpu +_SystemNative_ConvertErrorPlatformToPal +_SystemNative_ConvertErrorPalToPlatform +_SystemNative_StrErrorR +_SystemNative_GetLoadLibraryError +_SystemNative_GetProcAddress +_SystemNative_FreeLibrary +_SystemNative_GetErrNo +_SystemNative_SetErrNo +_SystemNative_GetEnviron +_SystemNative_FreeEnviron +_SystemNative_GetOSArchitecture +_SystemNative_GetNonCryptographicallySecureRandomBytes +_SystemNative_GetCryptographicallySecureRandomBytes +_SystemNative_GetSystemTimeAsTicks +_SystemNative_GetTimestamp +_SystemNative_LChflagsCanSetHiddenFlag +_SystemNative_CanGetHiddenFlag +_SystemNative_Log +_SystemNative_LogError +_SystemNative_LowLevelMonitor_Create +_SystemNative_LowLevelMonitor_Destroy +_SystemNative_LowLevelMonitor_Acquire +_SystemNative_LowLevelMonitor_Release +_SystemNative_LowLevelMonitor_Wait +_SystemNative_LowLevelMonitor_Signal_Release +_SystemNative_AlignedAlloc +_SystemNative_AlignedFree +_SystemNative_AlignedRealloc +_SystemNative_Calloc +_SystemNative_Free +_SystemNative_Malloc +_SystemNative_Realloc +_SystemNative_GetAllMountPoints +_SystemNative_GetReadDirRBufferSize +_SystemNative_ReadDirR +_SystemNative_GetEUid +_SystemNative_GetEGid +_SystemNative_GetPid +_SystemNative_CreateAutoreleasePool +_SystemNative_DrainAutoreleasePool +_SystemNative_CreateThread +_SystemNative_Access +_SystemNative_ChDir +_SystemNative_ChMod +_SystemNative_FChMod +_SystemNative_Close +_SystemNative_CopyFile +_SystemNative_LoadLibrary +_SystemNative_GetDefaultSearchOrderPseudoHandle +_SystemNative_GetFileSystemType +_SystemNative_FLock +_SystemNative_FSync +_SystemNative_FTruncate +_SystemNative_GetCpuUtilization +_SystemNative_GetCwd +_SystemNative_GetDefaultTimeZone +_SystemNative_GetEnv +_SystemNative_GetHostName +_SystemNative_GetProcessPath +_SystemNative_GetUnixVersion +_SystemNative_GetUnixRelease +_SystemNative_LChflags +_SystemNative_FChflags +_SystemNative_Link +_SystemNative_LockFileRegion +_SystemNative_LowLevelMonitor_TimedWait +_SystemNative_LSeek +_SystemNative_MkDir +_SystemNative_MkdTemp +_SystemNative_MksTemps +_SystemNative_Open +_SystemNative_PathConf +_SystemNative_PosixFAdvise +_SystemNative_FAllocate +_SystemNative_PRead +_SystemNative_PReadV +_SystemNative_PWrite +_SystemNative_PWriteV +_SystemNative_Read +_SystemNative_OpenDir +_SystemNative_CloseDir +_SystemNative_ReadLink +_SystemNative_Rename +_SystemNative_RmDir +_SystemNative_FStat +_SystemNative_Stat +_SystemNative_LStat +_SystemNative_SymLink +_SystemNative_SysConf +_SystemNative_SysLog +_SystemNative_Unlink +_SystemNative_UTimensat +_SystemNative_FUTimens +_SystemNative_Write +_SystemNative_GetGroups +_SystemNative_GetPwUidR +_SystemNative_GetPwNamR +_SystemNative_SearchPath +_SystemNative_SearchPath_TempDirectory +_SystemNative_FcntlSetFD +_SystemNative_MMap +_SystemNative_MUnmap +_SystemNative_MSync +_SystemNative_MAdvise +_SystemNative_ShmOpen +_SystemNative_ShmUnlink +_ios_register_button_click +_ios_set_text \ No newline at end of file