Skip to content

Commit

Permalink
Enable /OPT:REF explicitly for MSVC
Browse files Browse the repository at this point in the history
/OPT:REF is enabled for release builds for MSVC by default,
however, clang-cl may not enable it without this flag,
add it to MSVC's mkspec so that all compilers based on MSVC
can benefit from it as well.

Change-Id: Ia80c20a8510cfa1e4687e39104ce99b37a2aa13f
Reviewed-by: Friedemann Kleint <[email protected]>
  • Loading branch information
wangwenx190 committed Aug 13, 2019
1 parent ecb6327 commit afb5746
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion mkspecs/common/msvc-desktop.conf
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<<

QMAKE_LINK = link
QMAKE_LFLAGS = /NOLOGO /DYNAMICBASE /NXCOMPAT
QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO
QMAKE_LFLAGS_RELEASE = /OPT:REF /INCREMENTAL:NO
QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /DEBUG /OPT:REF /INCREMENTAL:NO
QMAKE_LFLAGS_DEBUG = /DEBUG
QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE
Expand Down
2 changes: 0 additions & 2 deletions mkspecs/win32-clang-msvc/qmake.conf
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,4 @@ QMAKE_LFLAGS_LTCG =
QMAKE_CFLAGS_OPTIMIZE_SIZE = /clang:-Oz
QMAKE_CFLAGS_OPTIMIZE_FULL = /clang:-O3

QMAKE_LFLAGS_RELEASE += /OPT:REF,ICF,LBR

load(qt_config)

0 comments on commit afb5746

Please sign in to comment.