aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/build_defs/apple/shared.bzl
diff options
context:
space:
mode:
authorGravatar Dmitry Shevchenko <dmishe@google.com>2016-06-28 18:51:13 +0000
committerGravatar Dmitry Lomov <dslomov@google.com>2016-06-29 08:54:26 +0000
commitd8372d22c72aa62a7dcb3e63720b2c29396c38cd (patch)
tree4f33d814e25faee38b95ffdd127cb8942fe1e8fd /tools/build_defs/apple/shared.bzl
parent4fa0bc21a871f0b95e07464c5a527b0e677d99b9 (diff)
Improve Clang modules compilation from swift_library rule
* Passes additional defines and copts specified by objc_ rules to clang from the swift compilation. * Adds a module cache path flag that equals to the on used by objc_ targets. -- MOS_MIGRATED_REVID=126099975
Diffstat (limited to 'tools/build_defs/apple/shared.bzl')
-rw-r--r--tools/build_defs/apple/shared.bzl4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/build_defs/apple/shared.bzl b/tools/build_defs/apple/shared.bzl
index bebfb7a9ad..976911b177 100644
--- a/tools/build_defs/apple/shared.bzl
+++ b/tools/build_defs/apple/shared.bzl
@@ -40,6 +40,10 @@ See :func:`apple_action`."""
XCRUNWRAPPER_LABEL = "//external:xcrunwrapper"
"""The label for xcrunwrapper tool."""
+def module_cache_path(ctx):
+ """Returns the Clang module cache path to use for this rule."""
+ return ctx.configuration.genfiles_dir.path + "/_objc_module_cache"
+
def apple_action(ctx, **kw):
"""Creates an action that only runs on MacOS/Darwin.