Skip to content

[7.3.0] Ignore transitive cppmap files from dotd files - #23122

Merged
iancha1992 merged 1 commit into
bazelbuild:release-7.3.0from
bazel-io:cp21832-7.3.0
Jul 26, 2024
Merged

iancha1992 merged 1 commit into
bazelbuild:release-7.3.0from
bazel-io:cp21832-7.3.0

Conversation

@bazel-io

Copy link
Copy Markdown
Member

When clang generates dotd files when using -fmodule-map-file any extern module directives in the modulemap are included in the dotd file if they exist. The result of this was that with sandboxing disabled the dotd file included transitive cppmap files that weren't in its input set, resulting in build failures. This change excludes those instead since they're not required as evidence by the fact that with sandboxing enabled they are not part of the input set.

Fixes #21592

Closes #21832.

PiperOrigin-RevId: 656382428
Change-Id: I4bc9802884ce1bc66ceda65a602db8dffbd1d9ea

Commit ad53147

When clang generates dotd files when using `-fmodule-map-file` any `extern module` directives in the modulemap are included in the dotd file if they exist. The result of this was that with sandboxing disabled the dotd file included transitive cppmap files that weren't in its input set, resulting in build failures. This change excludes those instead since they're not required as evidence by the fact that with sandboxing enabled they are not part of the input set.

Fixes bazelbuild#21592

Closes bazelbuild#21832.

PiperOrigin-RevId: 656382428
Change-Id: I4bc9802884ce1bc66ceda65a602db8dffbd1d9ea
@bazel-io
bazel-io requested a review from a team as a code owner July 26, 2024 13:46
@bazel-io bazel-io added team-Rules-CPP Issues for C++ rules awaiting-review PR is awaiting review from an assigned reviewer labels Jul 26, 2024
@bazel-io
bazel-io requested a review from trybka July 26, 2024 13:46
trybka
trybka previously approved these changes Jul 26, 2024
@iancha1992
iancha1992 requested a review from lberki July 26, 2024 17:56
@iancha1992
iancha1992 dismissed trybka’s stale review July 26, 2024 18:12

Googler is needed to review when merging to a release branch

@iancha1992
iancha1992 requested review from trybka and removed request for trybka July 26, 2024 18:13
@iancha1992
iancha1992 enabled auto-merge July 26, 2024 18:13
@keith

keith commented Jul 26, 2024

Copy link
Copy Markdown
Member

@trybka can you stamp again?

@iancha1992
iancha1992 added this pull request to the merge queue Jul 26, 2024
Merged via the queue into bazelbuild:release-7.3.0 with commit 0fa02b9 Jul 26, 2024
@keith

keith commented Jul 26, 2024

Copy link
Copy Markdown
Member

thanks!

@github-actions github-actions Bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Jul 26, 2024
asedeno added a commit to asedeno/envoy that referenced this pull request Oct 8, 2024
CodeQL is running into issues with the layering_check feature with absl.

```
.../external/com_google_absl/absl/strings/BUILD.bazel:34:11: Compiling absl/strings/string_view.cc failed: undeclared inclusion(s) in rule '@com_google_absl//absl/strings:string_view':
this rule is missing dependency declarations for the following files included by 'absl/strings/string_view.cc':
  'bazel-out/k8-fastbuild/bin/external/com_google_absl/absl/meta/type_traits.cppmap'
  'bazel-out/k8-fastbuild/bin/external/com_google_absl/absl/base/raw_logging_internal.cppmap'
```

Turning off the layering check seems to help.
Bazel 7.3+ might help, but we're not there yet:
bazelbuild/bazel#21592
bazelbuild/bazel#23122

Signed-off-by: Alejandro R. Sedeño <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-Rules-CPP Issues for C++ rules

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants