With Xcode 15 came some stronger restrictions around unsafe flags which has broken a lot of my workflows, both personal and professional as we often make use of large Clang targets.
As the original pitch specified, many more flags can safely be added, this was in their futur directions. As the restrictions with unsafe flags have been causing me more pain than anything else in the past year or so, I'd like to revisit that.
Here are some of the flags we often require, I'd like to know if there are actually any risks inherent to them and if not I'd like to gather input to write a pitch adding more safe flags.
-fno-objc-arcor its counter-part
-fobjc-arc, some of our packages require ARC enabled while others require it disabled. This is a pretty big part of low-level Objective-C frameworks.
-fcxx-moduleshas been needed for
@importin Objective-C++ files. I don't personally know enough about them to comment.
-xto specify which mode (C, C++, Objective-C, Objective-C++) to compile all clang files as. We have a lot
.cppfiles with conditional Objective-C++ to be cross-platform and the same with
.hheaders. Compiling everything as Objective-C++ without requiring renaming files ensures everything works on every platform.
-W...so many warnings/errors we may want to enable or disable. With the already in-place conditionals we can configure warnings and errors for Debug/Release and platforms individually
What do you think of this and have you encountered some flags you think should be officially supported?