Linker flag to disable "building for iOS Simulator [but object] built for macOS"

I'm using an open source library (libturbojpeg), and the library has been built more or less the same for years. The 2.0.2 version links fine for Device and Simulator in both Xcode 11.3 and 11.4.1-beta.


But newer releases generate warnings in 11.3 when using 2.0.3 or newer (for example):


ld: warning: building for iOS Simulator, but linking in object file (/Volumes/Data/git/PhotoScrollerSwiftPackage/Libraries/libturbojpeg.a(jdapimin.c.o)) built for macOS

Worse yet, in Xcode 11.4.1-beta, those turn into hard errors and the build fails:


error: Building for iOS Simulator, but the linked library '208libturbojpeg.a' was built for macOS + iOS. (in target 'LTJTest' from project 'LTJTest')

This issue first showed up here (as best I can tell) in this thread.


Since these really only affect the Simulator builds, is there anyway to disable them?

This happened to me also, in Xcode 11.4 ( main version, not the beta ) with my library.

There was no failure In Xcode 11.3.

the architecture of my library is x86_64 and arm64

I have no solution right now

Linker flag to disable "building for iOS Simulator [but object] built for macOS"
 
 
Q