Repository navigation
Commit 6bea1b7
Suppress warnings from macOS 27 logging macros
Suppress `-Wignored-attributes` triggered when compiling macOS-specific
logging and tracing code in `timeline_macos.cc`.
In the macOS 27 SDK that's part of Xcode 27, Apple appears to have added
an `OS_LOG_UNINITIALIZED` macro inside their logging and signposting
headers (`os/log.h`, `os/signpost.h`, `os/trace_base.h`). This macro
expands to include: `__attribute__((stack_protector_ignore))`.
Because of this, we skip stack protection checks on local formatting
buffers generated by logging macros such as `os_log_with_type` and
`os_signpost_event_emit`. However, in Flutter, we compile the engine
with `-fstack-protector-all`, which causes the build to error out
complaining the `stack_protector_ignore` attribute is being ignored:
error: 'stack_protector_ignore' attribute ignored due to '-fstack-protector-all' option [-Werror,-Wignored-attributes]
This wraps these usages in ignore pragmas to avoid disabling it across
the board, which is the same as the approach that was taken in
runtime/vm/gbd_helpers.cc.
Tested: Compiles under Xcode 26 and Xcode 27
Change-Id: I707584c66bb6cdae7d8ebcfd2a87344f43c618b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/512860
Reviewed-by: Ryan Macnak <[email protected]>
Commit-Queue: Ryan Macnak <[email protected]>1 parent a0f809f commit 6bea1b7
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
| |||
76 | 79 | | |
77 | 80 | | |
78 | 81 | | |
| 82 | + | |
| 83 | + | |
79 | 84 | | |
0 commit comments