diff --git a/src/core/config/functions.pri b/src/core/config/functions.pri
index 8c11faa16..191d3d623 100644
--- a/src/core/config/functions.pri
+++ b/src/core/config/functions.pri
@@ -1,5 +1,5 @@
 defineReplace(qtwebengine_extractCFlag) {
-    CFLAGS = $$QMAKE_CC $$QMAKE_CFLAGS
+    CFLAGS = $$QMAKE_CC $$QMAKE_CFLAGS $$QMAKE_CFLAGS_RELEASE
     OPTION = $$find(CFLAGS, $$1)
     OPTION = $$split(OPTION, =)
     PARAM = $$member(OPTION, 1)
