ARC is a mode that you can compile Objective-C files in; in the Chromium GN setup, it lives in //build/config/compiler:enable_arc, which can be added as a config on a GN target/source_set/whatever.
While new features in Chromium tend to have their own targets, so that I can convert them to ARC by dealing with just that target, the older code tends to be in huge monolithic targets (//base, //chrome/browser, //chrome/browser/ui), and that’s a problem, because I can’t do conversions of these targets all at once.
In trying to do a split of a few files off of //chrome/browser/ui, I’m hitting a problem. The CL is https://crrev.com/c/4517437
, but in summary:
//chrome/browser depends on //chrome/browser/ui. In splitting a few files from //chrome/browser/ui into //chrome/browser/ui/cocoa/applescript, the files in /chrome/browser/ui/cocoa/applescript have #includes into //chrome/browser files.
The GN dependency is //chrome/browser → //chrome/browser/ui → //chrome/browser/ui/cocoa/applescript so I can’t add a dependency back, as that would be adding a build cycle. I can’t add an “allow circular dependencies” into //chrome/browser as it doesn’t directly depend on //chrome/browser/ui/cocoa/applescript.
Should I add a new dependency of //chrome/browser → //chrome/browser/ui/cocoa/applescript for the sole purpose of being able to add an “allow circular dependency”?
In general, is there a better way to apply build configurations to just a few files within a target, so that I don’t have to deal with splitting targets and then wrestling with deps?