[TIMOB-13228] OTHER_LDFLAGS processing does not consider spaces
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Won't Fix |
Resolution Date | 2017-07-27T21:09:40.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | build, cb-tooling, ios |
Reporter | Jeff English |
Assignee | Eric Merriman |
Created | 2013-03-27T12:52:08.000+0000 |
Updated | 2017-07-27T21:09:40.000+0000 |
Description
The following issue was reported by a customer:
When building an app that includes multiple modules and each module has OTHER_LDFLAGS defined in their module.xcconfig file, the compiler will combine the OTHER_LDFLAGS entries into a single OTHER_LDFLAGS definition in order to work around a known issue with XCode (see TIMOB-3802). However, if any module's module.xcconfig file contains a space before the equal (=) sign on the OTHER_LDFLAGS definition, it will not be combined with the others. This causes the build to fail because only the last OTHER_LDFLAGS definition is processed by XCode. Removing any spaces before the equal (=) sign in the OTHER_LDFLAGS entry resolves the issue, but this should not be required.
Reproduction steps:
1. Create a new Titanium application
2. Add multiple modules that include OTHER_LDFLAGS definitions in their module.xcconfig file (Eg. ti.magtek, ti.urbanairship, and ti.barcode)
3. Build the application
4. Open the generated module.xcconfig file in the build folder of the application. The generated OTHER_LDFLAGS entry should be correct:
// this is a generated file - DO NOT EDIT
TI_BARCODE_OTHER_LDFLAGS=$(inherited) -liconv
TI_MAGTEK_OTHER_LDFLAGS=$(inherited) -framework Security
TI_MAGTEK_OTHER_CFLAGS=$(inherited) -DDEBUG
TI_URBANAIRSHIP_OTHER_LDFLAGS=$(inherited) -F$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks/ -framework GraphicsServices
OTHER_CFLAGS=$(inherited) $(TI_MAGTEK_OTHER_CFLAGS)
OTHER_LDFLAGS=$(inherited) $(TI_BARCODE_OTHER_LDFLAGS) $(TI_MAGTEK_OTHER_LDFLAGS) $(TI_URBANAIRSHIP_OTHER_LDFLAGS)
5. Edit one of those module's module.xcconfig file and insert a space before the equal (=) sign of the OTHER_LDFLAGS definition
6. Clean the project
7. Build the application (the build may fail due to a missing framework reference -- that's not important as we are only interested in the generated module.xcconfig file)
8. Open the generated module.xcconfig file in the build folder of the application. The generated OTHER_LDFLAGS entry should be incorrect:
// this is a generated file - DO NOT EDIT
TI_BARCODE_OTHER_LDFLAGS=$(inherited) -liconv
TI_MAGTEK_OTHER_LDFLAGS=$(inherited) -framework Security
TI_MAGTEK_OTHER_CFLAGS=$(inherited) -DDEBUG
TI_URBANAIRSHIP_OTHER_LDFLAGS=$(inherited) -F$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks/ -framework GraphicsServices
OTHER_LDFLAGS =$(inherited) $(TI_BARCODE_OTHER_LDFLAGS)
OTHER_CFLAGS=$(inherited) $(TI_MAGTEK_OTHER_CFLAGS)
OTHER_LDFLAGS=$(inherited) $(TI_MAGTEK_OTHER_LDFLAGS) $(TI_URBANAIRSHIP_OTHER_LDFLAGS)
Notice that there are two OTHER_LDFLAGS entries in the generated module.xcconfig file (lines 10 and 12). Only the last entry will be used by XCode.
Closing due to inactivity. If this issue still exists, please raise a new ticket.