Shazron Abdullah created CB-3967:
------------------------------------

             Summary: Add compiler-flags attribute to source-file tag
                 Key: CB-3967
                 URL: https://issues.apache.org/jira/browse/CB-3967
             Project: Apache Cordova
          Issue Type: New Feature
          Components: Plugman
            Reporter: Shazron Abdullah
            Assignee: Filip Maj
             Fix For: 3.0.0


Proposed for 3.0.0.

ML thread: http://markmail.org/thread/3n5cogkp6yrx4ina

*Summary:*
Add a *compiler-flags* attribute (hyphenated instead of camel-cased to conform 
to the spec style) to the *<source-file>* tag.

*Scenarios:*
- Adding third-party code (with lots of files) that are not ARC enabled, and 
including them in an ARC project (3.0.0 will be ARC), you need to add the 
*"-fno-objc-arc"* compiler flag to each non-ARC file
- Adding third-party code (with lots of files) that are ARC enabled, and 
including them in an non-ARC project (2.9.0 and below are non-ARC), you need to 
add the *"-fobjc-arc"* compiler flag to each ARC file

Plugins can be upgraded using the *__has_feature(objc_arc)* if they are small, 
but this is problematic if you had to include the source files for the Facebook 
SDK, for example (lots of files, maintenance nightmare if you were to modify 
them). Pre-compiled binaries are unaffected.

Example usage:
{code}
<source-file src="FooBar.m" compiler-flags="-fno-objc-arc" />
{code}



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to