From a85fabc3d065643a69a0e31c198f98de313ca6df Mon Sep 17 00:00:00 2001 From: Dmitry Shevchenko Date: Thu, 11 Aug 2016 23:19:43 +0000 Subject: Include the location of the current swiftmodule for LLDB. * LLDB spawns an instance of Swift compiler under the hood, which is configured via command line flags recorded in DWARF at the time of compilation. In order for LLDB to properly import the module for the target being built, that command line has to provide a path to that module. -- MOS_MIGRATED_REVID=130045157 --- tools/build_defs/apple/swift.bzl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tools/build_defs') diff --git a/tools/build_defs/apple/swift.bzl b/tools/build_defs/apple/swift.bzl index fe0ca853f1..9f0889c432 100644 --- a/tools/build_defs/apple/swift.bzl +++ b/tools/build_defs/apple/swift.bzl @@ -134,6 +134,9 @@ def _swift_library_impl(ctx): # Include each swift module's parent directory for imports to work. include_dirs = set([x.dirname for x in dep_modules]) + # Include the parent directory of the resulting module so LLDB can find it. + include_dirs += set([output_module.dirname]) + include_args = ["-I%s" % d for d in include_dirs + objc_includes] framework_args = ["-F%s" % x for x in framework_dirs] define_args = ["-D%s" % x for x in ctx.attr.defines] -- cgit v1.2.3