Clang doesn't support some flags that GCC does, so conditionally check the compiler and add them if we are doing a GCC build

This commit is contained in:
Forrest McDonald authored and Gregory Hainaut committed 2014-07-14 13:54:31 +02:00
1 parent c60fefa1a6
commit b24d4cce8d
5 files changed
+27 -12

No files matched your search

+5 -3
View File
@@ -11,10 +11,7 @@ set(Output Utilities)
# set common flags
set(CommonFlags
-fno-dse
-fno-guess-branch-probability
-fno-strict-aliasing
-fno-tree-dse
)
# set optimization flags
@@ -58,6 +55,11 @@ set(OptimizationFlags
-ftree-vrp
-funit-at-a-time)
#Clang doesn't support a few common flags that GCC does.
if(NOT USE_CLANG)
add_definitions(${CommonFlags} -fno-guess-branch-probability -fno-dse -fno-tree-dse)
endif(NOT USE_CLANG)
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
+5 -3
View File
@@ -11,9 +11,6 @@ set(Output x86emitter)
# set common flags
set(CommonFlags
-fno-guess-branch-probability
-fno-dse
-fno-tree-dse
-fno-strict-aliasing
)
@@ -58,6 +55,11 @@ set(OptimizationFlags
-ftree-vrp
-funit-at-a-time)
#Clang doesn't support a few common flags that GCC does.
if(NOT USE_CLANG)
add_definitions(${CommonFlags} -fno-guess-branch-probability -fno-dse -fno-tree-dse)
endif(NOT USE_CLANG)
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
+7 -4
View File
@@ -12,14 +12,12 @@ set(CommonFlags
# Disable this optimization for the moment
-fno-omit-frame-pointer
# END GCC-4.6
-fno-guess-branch-probability
-fno-dse
-fno-tree-dse
-fno-strict-aliasing
-fno-strict-aliasing
-Wno-parentheses
-Wstrict-aliasing # Allow to track strict aliasing issue.
-Wno-char-subscripts # only impact svu which is deprecated
-Wno-missing-braces
-Wno-ignored-attributes
)
# set optimization flags
@@ -63,6 +61,11 @@ set(OptimizationFlags
-ftree-vrp
-funit-at-a-time)
#Clang doesn't support a few common flags that GCC does.
if(NOT USE_CLANG)
add_definitions(${CommonFlags} -fno-guess-branch-probability -fno-dse -fno-tree-dse)
endif(NOT USE_CLANG)
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
set(Output pcsx2-dbg)
+5 -1
View File
@@ -12,7 +12,6 @@ set(Output GSdx-0.1.16)
set(CommonFlags
-D_LINUX
-fno-operator-names # because Xbyak uses and()/xor()/or()/not() function
-mpreferred-stack-boundary=2
-mfpmath=sse
#-Wstrict-aliasing # Allow to track strict aliasing issue.
-std=c++0x
@@ -27,6 +26,11 @@ set(OptimizationFlags
-DNDEBUG
)
#Clang doesn't support a few common flags that GCC does.
if(NOT USE_CLANG)
add_definitions(${CommonFlags} -mpreferred-stack-boundary=2)
endif(NOT USE_CLANG)
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
add_definitions(${CommonFlags} -D_DEBUG -g -Wall)
+5 -1
View File
@@ -16,7 +16,6 @@ set(Output zzogl-0.4.0)
set(CommonFlags
-pthread
-DZEROGS_SSE2
-fno-regmove
-fno-strict-aliasing
-Wstrict-aliasing # Allow to track strict aliasing issue.
-Wunused-variable
@@ -27,6 +26,11 @@ set(OptimizationFlags
-DNDEBUG
)
#Clang doesn't support a few common flags that GCC does.
if(NOT USE_CLANG)
add_definitions(${CommonFlags} -fno-regmove)
endif(NOT USE_CLANG)
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
# add defines