Don't pass irrelevant arguments to the compiler
authorBradley T. Hughes <bradley.hughes@nokia.com>
Tue, 8 Nov 2011 16:59:11 +0000 (17:59 +0100)
committerQt by Nokia <qt-info@nokia.com>
Mon, 14 Nov 2011 08:45:18 +0000 (09:45 +0100)
When building for 64-bit, don't pass options for 32-bit code generation,
and vice versa. This silences numerous warnings while building QtGui.

clang: warning: argument unused during compilation: '-Xarch_i386 -mmmx'
clang: warning: argument unused during compilation: '-Xarch_i386 -m3dnow'
clang: warning: argument unused during compilation: '-Xarch_i386 -mmmx'
clang: warning: argument unused during compilation: '-Xarch_i386 -m3dnow'
clang: warning: argument unused during compilation: '-Xarch_i386 -msse'
clang: warning: argument unused during compilation: '-Xarch_i386 -msse'
clang: warning: argument unused during compilation: '-Xarch_i386 -mmmx'
clang: warning: argument unused during compilation: '-Xarch_i386 -msse2'
clang: warning: argument unused during compilation: '-Xarch_i386 -m3dnow'
clang: warning: argument unused during compilation: '-Xarch_i386 -mmmx'
clang: warning: argument unused during compilation: '-Xarch_i386 -msse2'
clang: warning: argument unused during compilation: '-Xarch_i386 -m3dnow'
clang: warning: argument unused during compilation: '-Xarch_i386 -msse'
clang: warning: argument unused during compilation: '-Xarch_i386 -mssse3'
clang: warning: argument unused during compilation: '-Xarch_i386 -mssse3'
clang: warning: argument unused during compilation: '-Xarch_i386 -msse'
clang: warning: argument unused during compilation: '-Xarch_i386 -msse2'
clang: warning: argument unused during compilation: '-Xarch_i386 -msse2'
clang: warning: argument unused during compilation: '-Xarch_i386 -mssse3'
clang: warning: argument unused during compilation: '-Xarch_i386 -mssse3'

Change-Id: If4313b151e73db88d516998e3cf546e62495c289
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
src/gui/gui.pro

index aafc477..40888ad 100644 (file)
@@ -59,8 +59,8 @@ contains(QMAKE_MAC_XARCH, no) {
             mmx_compiler.commands = $$QMAKE_CXX -c -Winline
 
             mac {
-                mmx_compiler.commands += -Xarch_i386 -mmmx
-                mmx_compiler.commands += -Xarch_x86_64 -mmmx
+                x86: mmx_compiler.commands += -Xarch_i386 -mmmx
+                x86_64: mmx_compiler.commands += -Xarch_x86_64 -mmmx
             } else {
                 mmx_compiler.commands += -mmmx
             }
@@ -78,8 +78,8 @@ contains(QMAKE_MAC_XARCH, no) {
             mmx3dnow_compiler.commands = $$QMAKE_CXX -c -Winline
 
             mac {
-                mmx3dnow_compiler.commands += -Xarch_i386 -m3dnow -Xarch_i386 -mmmx
-                mmx3dnow_compiler.commands += -Xarch_x86_64 -m3dnow -Xarch_x86_64 -mmmx
+                x86: mmx3dnow_compiler.commands += -Xarch_i386 -m3dnow -Xarch_i386 -mmmx
+                x86_64: mmx3dnow_compiler.commands += -Xarch_x86_64 -m3dnow -Xarch_x86_64 -mmmx
             } else {
                 mmx3dnow_compiler.commands += -m3dnow -mmmx
             }
@@ -96,8 +96,8 @@ contains(QMAKE_MAC_XARCH, no) {
                 sse3dnow_compiler.commands = $$QMAKE_CXX -c -Winline
 
                 mac {
-                    sse3dnow_compiler.commands += -Xarch_i386 -m3dnow -Xarch_i386 -msse
-                    sse3dnow_compiler.commands += -Xarch_x86_64 -m3dnow -Xarch_x86_64 -msse
+                    x86: sse3dnow_compiler.commands += -Xarch_i386 -m3dnow -Xarch_i386 -msse
+                    x86_64: sse3dnow_compiler.commands += -Xarch_x86_64 -m3dnow -Xarch_x86_64 -msse
                 } else {
                     sse3dnow_compiler.commands += -m3dnow -msse
                 }
@@ -116,8 +116,8 @@ contains(QMAKE_MAC_XARCH, no) {
             sse_compiler.commands = $$QMAKE_CXX -c -Winline
 
             mac {
-                sse_compiler.commands += -Xarch_i386 -msse
-                sse_compiler.commands += -Xarch_x86_64 -msse
+                x86: sse_compiler.commands += -Xarch_i386 -msse
+                x86_64: sse_compiler.commands += -Xarch_x86_64 -msse
             } else {
                 sse_compiler.commands += -msse
             }
@@ -135,8 +135,8 @@ contains(QMAKE_MAC_XARCH, no) {
             sse2_compiler.commands = $$QMAKE_CXX -c -Winline
 
             mac {
-                sse2_compiler.commands += -Xarch_i386 -msse2
-                sse2_compiler.commands += -Xarch_x86_64 -msse2
+                x86: sse2_compiler.commands += -Xarch_i386 -msse2
+                x86_64: sse2_compiler.commands += -Xarch_x86_64 -msse2
             } else {
                 sse2_compiler.commands += -msse2
             }
@@ -154,8 +154,8 @@ contains(QMAKE_MAC_XARCH, no) {
             ssse3_compiler.commands = $$QMAKE_CXX -c -Winline
 
             mac {
-                ssse3_compiler.commands += -Xarch_i386 -mssse3
-                ssse3_compiler.commands += -Xarch_x86_64 -mssse3
+                x86: ssse3_compiler.commands += -Xarch_i386 -mssse3
+                x86_64: ssse3_compiler.commands += -Xarch_x86_64 -mssse3
             } else {
                 ssse3_compiler.commands += -mssse3
             }