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

Support for setting per-file host copt (e.g. --host_per_file_copt) #12406

Closed
GMNGeoffrey opened this issue Nov 3, 2020 · 3 comments
Closed
Labels
P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee) team-Rules-CPP Issues for C++ rules type: feature request

Comments

@GMNGeoffrey
Copy link
Contributor

GMNGeoffrey commented Nov 3, 2020

Description of the problem / feature request:

Ability to set host only per-file copt. Basically the combination of per_file_copt and host_copt

Feature requests: what underlying problem are you trying to solve with this feature?

Our repository depends on other repositories. We use per_file_copt to turn of clang diagnostics for these other repositories and then set -Werror, but this doesn't work in host mode because there's no way to do things per-file.

What operating system are you running Bazel on?

Linux Debian

What's the output of bazel info release?

release 3.3.1

What's the output of git remote get-url origin ; git rev-parse main ; git rev-parse HEAD ?

$ git remote get-url origin ; git rev-parse main ; git rev-parse HEAD
git@github.com:GMNGeoffrey/iree.git
d13da6a832c3b75ea58129cff1936d39d2005610
361087f36af996632800d1bf9c4bdfa754a645ba

Have you found anything relevant by searching the web?

No

@oquenchil oquenchil added P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee) and removed untriaged labels Nov 19, 2020
@GMNGeoffrey
Copy link
Contributor Author

Just for future people who are perhaps interested in this feature for the same reason, we ended up just turning off all host build diagnostics. We build everything we care about as a target as well, so we'll see the diagnostics there.

https://github.com/google/iree/blob/a15d08f3adba62b9541824fc55e5501711da08f5/build_tools/bazel/iree.bazelrc#L84

keith added a commit to keith/bazel that referenced this issue Oct 31, 2022
@keith
Copy link
Member

keith commented Oct 31, 2022

#16618

keith added a commit to keith/envoy that referenced this issue Oct 31, 2022
Since gcc 12 it seems there are some false positives around this
warning.

Upstream gcc reports:

- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107252
- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100366
- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106199

We can't use `--per_file_copt` in this case because we build this in the
host configuration bazelbuild/bazel#12406

Upstream v8 report: https://bugs.chromium.org/p/v8/issues/detail?id=13441

Fixes envoyproxy#23692

Signed-off-by: Keith Smiley <keithbsmiley@gmail.com>
keith added a commit to envoyproxy/envoy that referenced this issue Nov 1, 2022
Since gcc 12 it seems there are some false positives around this
warning.

Upstream gcc reports:

- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107252
- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100366
- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106199

We can't use `--per_file_copt` in this case because we build this in the
host configuration bazelbuild/bazel#12406

Upstream v8 report: https://bugs.chromium.org/p/v8/issues/detail?id=13441

Fixes #23692

Signed-off-by: Keith Smiley <keithbsmiley@gmail.com>
keith added a commit to keith/bazel that referenced this issue Nov 1, 2022
UebelAndre pushed a commit to UebelAndre/bazel that referenced this issue Nov 8, 2022
Fixes bazelbuild#12406

Closes bazelbuild#16618.

PiperOrigin-RevId: 486616830
Change-Id: Icd9774b2d05d09288a34375e229b13e2a74cf3d7
@UebelAndre
Copy link
Contributor

I've opened a cherry-pick for the 6.0 release per the guidance here: #16159 (comment)

ShreeM01 added a commit that referenced this issue Nov 9, 2022
Fixes #12406

Closes #16618.

PiperOrigin-RevId: 486616830
Change-Id: Icd9774b2d05d09288a34375e229b13e2a74cf3d7

Co-authored-by: Keith Smiley <keithbsmiley@gmail.com>
Co-authored-by: kshyanashree <109167932+kshyanashree@users.noreply.github.com>
apattidb pushed a commit to databricks/bazel that referenced this issue Jun 9, 2023
Fixes bazelbuild#12406

Closes bazelbuild#16618.

PiperOrigin-RevId: 486616830
Change-Id: Icd9774b2d05d09288a34375e229b13e2a74cf3d7

Co-authored-by: Keith Smiley <keithbsmiley@gmail.com>
Co-authored-by: kshyanashree <109167932+kshyanashree@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee) team-Rules-CPP Issues for C++ rules type: feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants