Skip to content

Commit

Permalink
Support order file instrumentation in swift compile actions
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 467339063
  • Loading branch information
googlewalt authored and swiple-rules-gardener committed Aug 13, 2022
1 parent fc4c4c7 commit 2a1a387
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions swift/toolchains/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ bzl_library(
"//swift/toolchains/config:tool_config",
"@bazel_skylib//lib:dicts",
"@bazel_skylib//lib:paths",
"@bazel_skylib//rules:common_settings",
],
)

Expand Down
13 changes: 13 additions & 0 deletions swift/toolchains/config/compile_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,19 @@ def compile_action_configs(
),
]

#### FDO flags
action_configs.append(
# Support for order-file instrumentation.
ActionConfigInfo(
actions = [SWIFT_ACTION_COMPILE],
configurators = [
add_arg("-sanitize=undefined"),
add_arg("-sanitize-coverage=func"),
],
features = ["fdo_instrument_order_file"],
),
)

#### Flags controlling how Swift/Clang modular inputs are processed

action_configs += [
Expand Down

1 comment on commit 2a1a387

@brentleyjones
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.