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

Use a config transition to set compilation_mode to "opt" #22

Merged
merged 2 commits into from
Feb 26, 2020

Conversation

bttk
Copy link
Collaborator

@bttk bttk commented Feb 21, 2020

installer() rule by default depends now on targets built with '-c opt'

To disable this override of a command line flag use compilation_mode = ""
attribute:

installer(
    name = "install_foo",
    compilation_mode = "",
    data = [":foo"],
)

Alternatively you can force a debug build:

installer(
    name = "install_foo_dbg",
    compilation_mode = "dbg",
    data = [":foo"],
)

installer() rule by default depends now on targets built with '-c opt'

To disable this override of a command line flag use `compilation_mode = ""`
attribute:

```
installer(
    name = "install_foo",
    compilation_mode = "",
    data = [":foo"],
)
```

Alternatively you can force a debug build:

```
installer(
    name = "install_foo_dbg",
    compilation_mode = "dbg",
    data = [":foo"],
)
```
@bttk
Copy link
Collaborator Author

bttk commented Feb 21, 2020

@juliexxia Please take a look (specifically installer/def.bzl)

@bttk bttk merged commit 48547be into google:master Feb 26, 2020
Copy link

@juliexxia juliexxia left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -91,14 +103,16 @@ def installer(name, data, executable = True, target_subdir = ""):

Args:
name: A unique name of this rule.
compilation_mode: If not empty, sets compilation_mode of targets in data.

Choose a reason for hiding this comment

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

Apologies for not getting to this sooner! Just want to note that you're not only setting compilation_mode of targets in data but also of that entire subtree that is rooted in these data deps.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for taking a look! Yes, this is intended - I want to make it easy to do the right thing and install an optimized build.

@bttk bttk deleted the transition branch March 17, 2020 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants