Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix is_exec_configuration() check #1112

Merged
merged 1 commit into from
Jan 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rust/private/rustc.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ def construct_arguments(
env["SYSROOT"] = paths.dirname(toolchain.rust_std.files.to_list()[0].short_path)

# extra_rustc_flags apply to the target configuration, not the exec configuration.
if hasattr(ctx.attr, "_extra_rustc_flags") and is_exec_configuration(ctx):
if hasattr(ctx.attr, "_extra_rustc_flags") and not is_exec_configuration(ctx):
rustc_flags.add_all(ctx.attr._extra_rustc_flags[ExtraRustcFlagsInfo].extra_rustc_flags)

# Create a struct which keeps the arguments separate so each may be tuned or
Expand Down
2 changes: 1 addition & 1 deletion rust/private/utils.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ def is_exec_configuration(ctx):
"""

# TODO(djmarcin): Is there any better way to determine cfg=exec?
return ctx.genfiles_dir.path.find("-exec-") == -1
return ctx.genfiles_dir.path.find("-exec-") != -1

def transform_deps(deps):
"""Conditionally transform a [Target] into [DepVariantInfo].
Expand Down