Created by: tjwio
Background
When using modulemap_mode = HEADERS
, buck was successfully building the module map but it would include the header symlink root in the header path which would cause it to not be found in the xcode header search paths. ie.
for the module map generated at gen/out/folder/anotherfolder/module_name.modulemap
it would include headers like:
header "gen/out/folder/anotherfolder/module_name/HeaderTest.h"
when it should actually be
header "HeaderTest.h"
UPDATE:
Seems to be two cases actually, one of which is already handled and the other not. The case where relative path to header is already handled (ie. Library/A.h
) and working. However, there is another case (not sure how to get to the state but our buck config generates targets in this state) where the module map includes FULL header paths instead of relative ones (ie. gen/out/folder/anotherfolder/Library/A.h
). So we need to handle both cases in ModuleMapFactory
and check for both prefixes and strip them out if possible.
Change Strip out symlink root along with module name from headers generation