現代ではSwiftの条件コンパイル用のフラグ定義にはOTHER_SWIFT_FLAGSではなくSWIFT_ACTIVE_COMPILATION_CONDITIONSを使う

タイトルがすべてです。意外と忘れがちなので。

developer.apple.com

Active Compilation Conditions is a new build setting for passing conditional compilation flags to the Swift compiler. Each element of the value of this setting passes to swiftc prefixed with -D, in the same way that elements of Preprocessor Macros pass to clang with the same prefix. (22457329)