An executable named "Xamarin_iOS.exe" causes this:
MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_mono_aot_module_Xamarin_iOS_info'.
MTOUCH: error MT5213: Duplicate symbol in: [...]/iOS/obj/iPhone/Release/mtouch-cache/Xamarin_iOS.exe.arm64.o (Location related to previous error)
MTOUCH: error MT5213: Duplicate symbol in: [...]/iOS/obj/iPhone/Release/mtouch-cache/Xamarin.iOS.dll.arm64.o (Location related to previous error)
We already have a check for assemblies named as the executable, but it looks like the underscore is circumventing that check.
Maybe we should keep a list of the mono_aot_module_* symbol names generated, and detect duplicates there (and show the corresponding error).
> and detect duplicates there
Not sure what you mean by "there".
AOT time ? It's too late to fail a build for something we can detect a lot earlier. Even more since such app could have been working for quite a while in the JIT/simulator.
We should apply the same transforms (there's likely many other characters too) as the AOT compiler before doing the duplicate comparison.
Yeah, you're right, it's best to detect this as soon as possible, and not at AOT time.