-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #98 from bazel-ios/amber/local-debug-options
Add local debug options as a dependency, but only if local_debug_options_enabled
- Loading branch information
Showing
11 changed files
with
107 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,19 @@ | ||
# We can't create a bzl_library for rules-swift because of its visibility, | ||
# so circumvent by not using the sandbox | ||
build --strategy=Stardoc=standalone | ||
|
||
# Debugging does not work in sandbox mode. Uncomment these lines to turn off sandboxing. | ||
# build --genrule_strategy=standalone | ||
# build --spawn_strategy=standalone | ||
|
||
build --verbose_failures # Print the full command line for commands that failed | ||
build --test_output=errors # Prints log file output to the console on failure | ||
|
||
# By default do not build the tests for sources-with-prebuilt-binaries, | ||
# By default do not build the tests for sources-with-prebuilt-binaries, | ||
# because it takes quite some time. They will only run on CI | ||
build --deleted_packages tests/ios/frameworks/sources-with-prebuilt-binaries | ||
|
||
# Enable these features to test local and CI builds | ||
# when swiftmodule caching is enabled. | ||
# build --features=swift.cacheable_swiftmodules | ||
# build --features=swift.use_global_module_cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,43 @@ | ||
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag") | ||
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library") | ||
|
||
exports_files( | ||
glob(["*.bzl"]), | ||
visibility = ["//docs:__pkg__"], | ||
) | ||
|
||
genrule( | ||
name = "empty", | ||
outs = ["empty.swift"], | ||
cmd = "touch $(OUTS)", | ||
) | ||
|
||
# A dummy target that enables serialize-debugging-options but only in local development, | ||
# so that swiftmodule paths will refer to paths on the local machine and LLDB will work. | ||
# See details here: https://github.com/ios-bazel-users/ios-bazel-users/blob/master/DebuggableRemoteSwift.md | ||
swift_library( | ||
name = "_LocalDebugOptions", | ||
srcs = [":empty"], | ||
copts = [ | ||
"-Xfrontend", | ||
"-serialize-debugging-options", | ||
], | ||
module_name = "_LocalDebugOptions", | ||
tags = [ | ||
"manual", | ||
"no-remote", | ||
], | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
bool_flag( | ||
name = "local_debug_options_enabled", | ||
build_setting_default = False, | ||
) | ||
|
||
config_setting( | ||
name = "local_debug_options", | ||
flag_values = { | ||
":local_debug_options_enabled": "True", | ||
}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.