diff options
author | Rumou Duan <rduan@google.com> | 2015-09-14 15:17:02 +0000 |
---|---|---|
committer | Kristina Chodorow <kchodorow@google.com> | 2015-09-14 15:42:04 +0000 |
commit | ece3640a39ea08887c5abeaad414d26853fbe03c (patch) | |
tree | da425d76dfc40642c66644f676ae40826274e359 /src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java | |
parent | 86eeb8cce39cecd1ae69132c5f69d345d7f2f1de (diff) |
When generating Xcode projects, remove -I options from copts and instead add the -I include paths as non-propagated header search paths. If the paths are relative, prepend $(WORKSPACE_ROOT) to them.
--
MOS_MIGRATED_REVID=102994196
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java index d753115812..04be1426cd 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java @@ -224,6 +224,10 @@ public class ObjcRuleClasses { <a href="#sh-tokenization">Bourne shell tokenization</a>. These flags will only apply to this target, and not those upon which it depends, or those which depend on it. + <p> + Note that for the generated Xcode project, directory paths specified using "-I" flags in + copts are parsed out, prepended with "$(WORKSPACE_ROOT)/" if they are relative paths, and + added to the header search paths for the associated Xcode target. <!-- #END_BLAZE_RULE.ATTRIBUTE -->*/ .add(attr("copts", STRING_LIST)) .build(); @@ -568,6 +572,11 @@ public class ObjcRuleClasses { genfiles and bin roots (e.g. <code>blaze-genfiles/pkg/includedir</code> and <code>blaze-out/pkg/includedir</code>) are included in addition to the actual client root. + <p> + Unlike <a href="#objc_library.copts">COPTS</a>, these flags are added for this rule + and every rule that depends on it. (Note: not the rules it depends upon!) Be + very careful, since this may have far-reaching effects. When in doubt, add + "-I" flags to <a href="#objc_library.copts">COPTS</a> instead. <!-- #END_BLAZE_RULE.ATTRIBUTE -->*/ .add(attr("includes", Type.STRING_LIST)) /* <!-- #BLAZE_RULE($objc_compile_dependency_rule).ATTRIBUTE(sdk_includes) --> |