Unsupported option '-mno-thumb' in Xcode 16

I'm trying to compile my project, which worked fine before upgrading to Xcode 16, and I'm getting error clang: error: unsupported option '-mno-thumb' for target 'arm64-apple-ios18.0-simulator'. It appears to a similar issue as this BoringSSL-GRPC issue. The fix from StackOverflow was to automatically strip the flag in the Podfile using CocoaPods, but I'm not using CocoaPods. I've grepped the entire project, and I can't find that flag anywhere in the project. Likewise, the full error message doesn't even include -mno-thumb. Does anyone know how I can determine where this flag is being added, so I can remove it?

I've tried this in both Xcode 16.1 and Xcode 16.2 on MacOS Sonoma and Sequoia 15.2.

The full error log is

CompileC /Users/ck/Library/Developer/Xcode/DerivedData/Delta-dwedcmxtirqnkdghmvobshblwrib/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/DSDeltaCore.build/Objects-normal/arm64/DSEmulatorBridge.o /Users/ck/Projects/system/Delta/Cores/DSDeltaCore/DSDeltaCore/Bridge/DSEmulatorBridge.mm normal arm64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'DSDeltaCore' from project 'Pods')
    cd /Users/ck/Projects/system/Delta/Pods
    
    Using response file: /Users/ck/Library/Developer/Xcode/DerivedData/Delta-dwedcmxtirqnkdghmvobshblwrib/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/DSDeltaCore.build/Objects-normal/arm64/af3fcb34312c57c0f52879cdce924b91-common-args.resp
    
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c++ -ivfsstatcache /Users/ck/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphonesimulator18.2-22C146-07b28473f605e47e75261259d3ef3b5a.sdkstatcache -fmessage-length\=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -fno-color-diagnostics -fmodules-prune-interval\=86400 -fmodules-prune-after\=345600 -fbuild-session-file\=/Users/ck/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror\=non-modular-include-in-framework-module -Wno-trigraphs -Wno-missing-field-initializers -Wno-missing-prototypes -Werror\=return-type -Wdocumentation -Wunreachable-code -Wno-implicit-atomic-properties -Werror\=deprecated-objc-isa-usage -Wno-objc-interface-ivars -Werror\=objc-root-class -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -Wno-c++11-extensions -Wno-implicit-fallthrough -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -Winvalid-offsetof -Wno-sign-conversion -Winfinite-recursion -Wmove -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wrange-loop-analysis -Wno-semicolon-before-method-body -Wunguarded-availability -index-store-path /Users/ck/Library/Developer/Xcode/DerivedData/Delta-dwedcmxtirqnkdghmvobshblwrib/Index.noindex/DataStore @/Users/ck/Library/Developer/Xcode/DerivedData/Delta-dwedcmxtirqnkdghmvobshblwrib/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/DSDeltaCore.build/Objects-normal/arm64/af3fcb34312c57c0f52879cdce924b91-common-args.resp -w -Xanalyzer -analyzer-disable-all-checks -include /Users/ck/Projects/system/Delta/Pods/Target\ Support\ Files/DSDeltaCore/DSDeltaCore-prefix.pch -MMD -MT dependencies -MF /Users/ck/Library/Developer/Xcode/DerivedData/Delta-dwedcmxtirqnkdghmvobshblwrib/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/DSDeltaCore.build/Objects-normal/arm64/DSEmulatorBridge.d --serialize-diagnostics /Users/ck/Library/Developer/Xcode/DerivedData/Delta-dwedcmxtirqnkdghmvobshblwrib/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/DSDeltaCore.build/Objects-normal/arm64/DSEmulatorBridge.dia -c /Users/ck/Projects/system/Delta/Cores/DSDeltaCore/DSDeltaCore/Bridge/DSEmulatorBridge.mm -o /Users/ck/Library/Developer/Xcode/DerivedData/Delta-dwedcmxtirqnkdghmvobshblwrib/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/DSDeltaCore.build/Objects-normal/arm64/DSEmulatorBridge.o -index-unit-output-path /Pods.build/Debug-iphonesimulator/DSDeltaCore.build/Objects-normal/arm64/DSEmulatorBridge.o

clang: error: unsupported option '-mno-thumb' for target 'arm64-apple-ios18.0-simulator'

Xcode 16 uses response files to reduce the command line size. A response file is a text file with clang command line options.

In your case it is being on the command line as @/Users/...b91-common-args.resp and contains all the common command line options xcode sees will be used by all invocations of clang for that target's build. You can examine that text file to see the '-mno-thumb' option.

I don't know why that option is being added. Maybe by seeing which options are around it in the response file, it will help you know were to look for what is setting it.

That option is only applicable to 32-bit AM and that is why clang is erroring when you try to add it to a 64-bit ARM compilation

Thanks for the response. I already checked the response file, but I can't find -mno-thumb. I'm not a clang expert, though, so I don't know if it's being added by some other flag. Or do some of the flags in the response file import flags from some other file?

Is there a way to remove flags in Xcode? As in, the flag is clearly being added somehow, but I can't find where. Is there a way to strip certain flags project-wide in the Build Settings?

Here's my response file:

-target arm64-apple-ios18.0-simulator '-std=gnu++14' '-stdlib=libc++' -fobjc-arc -fmodules '-fmodules-cache-path=/Users/ck/Library/Developer/Xcode/DerivedData/ModuleCache.noindex' '-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG' -fpascal-strings -O0 -fno-common '-DPOD_CONFIGURATION_DEBUG=1' '-DDEBUG=1' '-DCOCOAPODS=1' '-DOBJC_OLD_DISPATCH_PROTOTYPES=0' -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk -g '-fobjc-abi-version=2' -fobjc-legacy-dispatch -iquote /Users/ck/Library/Developer/Xcode/DerivedData/Delta-dwedcmxtirqnkdghmvobshblwrib/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/DSDeltaCore.build/DSDeltaCore-generated-files.hmap -I/Users/ck/Library/Developer/Xcode/DerivedData/Delta-dwedcmxtirqnkdghmvobshblwrib/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/DSDeltaCore.build/DSDeltaCore-own-target-headers.hmap -I/Users/ck/Library/Developer/Xcode/DerivedData/Delta-dwedcmxtirqnkdghmvobshblwrib/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/DSDeltaCore.build/DSDeltaCore-all-target-headers.hmap -iquote /Users/ck/Library/Developer/Xcode/DerivedData/Delta-dwedcmxtirqnkdghmvobshblwrib/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/DSDeltaCore.build/DSDeltaCore-project-headers.hmap -iquote '/Users/ck/Library/Developer/Xcode/DerivedData/Delta-dwedcmxtirqnkdghmvobshblwrib/Build/Products/Debug-iphonesimulator/DeltaCore/Swift Compatibility Header' -I/Users/ck/Library/Developer/Xcode/DerivedData/Delta-dwedcmxtirqnkdghmvobshblwrib/Build/Products/Debug-iphonesimulator/DSDeltaCore/include -I/Users/ck/Projects/system/Delta/Pods/Headers/Private -I/Users/ck/Projects/system/Delta/Pods/Headers/Private/DSDeltaCore -I/Users/ck/Projects/system/Delta/Pods/Headers/Public -I/Users/ck/Projects/system/Delta/Pods/Headers/Public/DSDeltaCore -I/Users/ck/Library/Developer/Xcode/DerivedData/Delta-dwedcmxtirqnkdghmvobshblwrib/Build/Products/Debug-iphonesimulator -I/Users/ck/Projects/system/Delta/Pods/Headers/Private/DSDeltaCore/desmume/desmume/src/libretro-common/include -I/Users/ck/Library/Developer/Xcode/DerivedData/Delta-dwedcmxtirqnkdghmvobshblwrib/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/DSDeltaCore.build/DerivedSources-normal/arm64 -I/Users/ck/Library/Developer/Xcode/DerivedData/Delta-dwedcmxtirqnkdghmvobshblwrib/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/DSDeltaCore.build/DerivedSources/arm64 -I/Users/ck/Library/Developer/Xcode/DerivedData/Delta-dwedcmxtirqnkdghmvobshblwrib/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/DSDeltaCore.build/DerivedSources -F/Users/ck/Library/Developer/Xcode/DerivedData/Delta-dwedcmxtirqnkdghmvobshblwrib/Build/Products/Debug-iphonesimulator/DSDeltaCore '-fmodule-map-file=/Users/ck/Library/Developer/Xcode/DerivedData/Delta-dwedcmxtirqnkdghmvobshblwrib/Build/Products/Debug-iphonesimulator/DeltaCore/DeltaCore.modulemap' '-fmodule-map-file=/Users/ck/Library/Developer/Xcode/DerivedData/Delta-dwedcmxtirqnkdghmvobshblwrib/Build/Products/Debug-iphonesimulator/ZIPFoundation/ZIPFoundation.modulemap' -DHOST_DARWIN -DDESMUME_COCOA -DHAVE_OPENGL -DHAVE_LIBZ -DANDROID -fexceptions -ftree-vectorize -DCOMPRESS_MT -DIOS -DOBJ_C -marm '-fvisibility=hidden' '-DSTATIC_LIBRARY=1'

Whoops, just realized I pasted my response file poorly. Here's the same response file, but with each argument on its own line:

-target arm64-apple-ios18.0-simulator
'-std=gnu++14'
'-stdlib=libc++'
-fobjc-arc
-fmodules
'-fmodules-cache-path=/Users/ck/Library/Developer/Xcode/DerivedData/ModuleCache.noindex'
'-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG'
-fpascal-strings
-O0
-fno-common
'-DPOD_CONFIGURATION_DEBUG=1'
'-DDEBUG=1'
'-DCOCOAPODS=1'
'-DOBJC_OLD_DISPATCH_PROTOTYPES=0'
-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk
-g
'-fobjc-abi-version=2'
-fobjc-legacy-dispatch
-iquote /Users/ck/Library/Developer/Xcode/DerivedData/Delta-dwedcmxtirqnkdghmvobshblwrib/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/DSDeltaCore.build/DSDeltaCore-generated-files.hmap
-I/Users/ck/Library/Developer/Xcode/DerivedData/Delta-dwedcmxtirqnkdghmvobshblwrib/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/DSDeltaCore.build/DSDeltaCore-own-target-headers.hmap
-I/Users/ck/Library/Developer/Xcode/DerivedData/Delta-dwedcmxtirqnkdghmvobshblwrib/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/DSDeltaCore.build/DSDeltaCore-all-target-headers.hmap
-iquote /Users/ck/Library/Developer/Xcode/DerivedData/Delta-dwedcmxtirqnkdghmvobshblwrib/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/DSDeltaCore.build/DSDeltaCore-project-headers.hmap
-iquote
'/Users/ck/Library/Developer/Xcode/DerivedData/Delta-dwedcmxtirqnkdghmvobshblwrib/Build/Products/Debug-iphonesimulator/DeltaCore/Swift Compatibility Header'
-I/Users/ck/Library/Developer/Xcode/DerivedData/Delta-dwedcmxtirqnkdghmvobshblwrib/Build/Products/Debug-iphonesimulator/DSDeltaCore/include
-I/Users/ck/Projects/system/Delta/Pods/Headers/Private
-I/Users/ck/Projects/system/Delta/Pods/Headers/Private/DSDeltaCore
-I/Users/ck/Projects/system/Delta/Pods/Headers/Public
-I/Users/ck/Projects/system/Delta/Pods/Headers/Public/DSDeltaCore
-I/Users/ck/Library/Developer/Xcode/DerivedData/Delta-dwedcmxtirqnkdghmvobshblwrib/Build/Products/Debug-iphonesimulator
-I/Users/ck/Projects/system/Delta/Pods/Headers/Private/DSDeltaCore/desmume/desmume/src/libretro-common/include
-I/Users/ck/Library/Developer/Xcode/DerivedData/Delta-dwedcmxtirqnkdghmvobshblwrib/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/DSDeltaCore.build/DerivedSources-normal/arm64
-I/Users/ck/Library/Developer/Xcode/DerivedData/Delta-dwedcmxtirqnkdghmvobshblwrib/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/DSDeltaCore.build/DerivedSources/arm64
-I/Users/ck/Library/Developer/Xcode/DerivedData/Delta-dwedcmxtirqnkdghmvobshblwrib/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/DSDeltaCore.build/DerivedSources
-F/Users/ck/Library/Developer/Xcode/DerivedData/Delta-dwedcmxtirqnkdghmvobshblwrib/Build/Products/Debug-iphonesimulator/DSDeltaCore
'-fmodule-map-file=/Users/ck/Library/Developer/Xcode/DerivedData/Delta-dwedcmxtirqnkdghmvobshblwrib/Build/Products/Debug-iphonesimulator/DeltaCore/DeltaCore.modulemap'
'-fmodule-map-file=/Users/ck/Library/Developer/Xcode/DerivedData/Delta-dwedcmxtirqnkdghmvobshblwrib/Build/Products/Debug-iphonesimulator/ZIPFoundation/ZIPFoundation.modulemap'
-DHOST_DARWIN
-DDESMUME_COCOA
-DHAVE_OPENGL
-DHAVE_LIBZ
-DANDROID
-fexceptions
-ftree-vectorize
-DCOMPRESS_MT
-DIOS
-DOBJ_C
-marm
'-fvisibility=hidden'
'-DSTATIC_LIBRARY=1'
Unsupported option '-mno-thumb' in Xcode 16
 
 
Q