New issue
Advanced search Search tips

Issue 912662 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

Consider building without Wno-ignored-pragma-optimize.

Project Member Reported by thakis@chromium.org, Dec 6

Issue description

clang-cl ignores #pragma optimize and emits Wignored-pragma-optimize. We currently suppress that.

https://bugs.chromium.org/p/chromium/issues/detail?id=505314#c5
https://bugs.chromium.org/p/chromium/issues/detail?id=505314#c7
https://bugs.chromium.org/p/chromium/issues/detail?id=505314#c24

characterize what we use the pragma for currently.

Depending on how much work we want to put into this, we could add a "dont_icf" attribute and plumb that through to lld, or we could just use MSVC_ENABLE_OPTIMIZE() everywhere we use that pragma, and then make that a no-op in clang builds.


brucedawson's asked about this every now and then, so here's a dedicated bug for it :-0
 
Owner: brucedaw...@chromium.org
Status: Assigned (was: Untriaged)
I'll take this.
 crbug.com/891075  explains why this isn't practical at the moment and may never be worthwhile. midl generated files, tcmalloc, sqlite, and a few others (including third_party\llvm\lib\ExecutionEngine\IntelJITEvents\jitprofiling.c) all use the VC++ pragma - about twenty or so from a search for pragma.*optimize.*"", off. None of the remaining uses look worrisome.

Sign in to add a comment