summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2017-03-25 08:36:00 +0100
committerRémi Verschelde <rverschelde@gmail.com>2017-03-26 21:58:37 +0200
commitd8f32637be9f9eae9fddfe4d664e369cbf3b65c3 (patch)
treed467f8bab2c09af03c16ec28de02974f868e7079 /platform
parenta0b0dff6fdbdc4be78087aa572f3da5dbb8daa01 (diff)
SCons: Add option to toggle warnings (on by default)
All the warnings are factored out of the platform-specific files and moved to SConstruct. Will have to check that it does not introduce regressions on some platforms/compilers. (cherry picked from commit 31107daa1a41fe9ab3c7c1868479e78e16848333)
Diffstat (limited to 'platform')
-rw-r--r--platform/android/detect.py4
-rw-r--r--platform/haiku/detect.py2
-rw-r--r--platform/iphone/detect.py12
-rw-r--r--platform/javascript/detect.py2
-rw-r--r--platform/osx/detect.py2
-rw-r--r--platform/server/detect.py2
-rw-r--r--platform/windows/detect.py2
-rw-r--r--platform/x11/detect.py4
8 files changed, 14 insertions, 16 deletions
diff --git a/platform/android/detect.py b/platform/android/detect.py
index d1b33fe649..0e78a4618d 100644
--- a/platform/android/detect.py
+++ b/platform/android/detect.py
@@ -168,9 +168,7 @@ def configure(env):
env.Append(CPPFLAGS=["-isystem", sysroot + "/usr/include"])
env.Append(CPPFLAGS=string.split(
- '-Wno-invalid-command-line-argument -Wno-unused-command-line-argument'))
- env.Append(CPPFLAGS=string.split(
- '-fpic -ffunction-sections -funwind-tables -fstack-protector-strong -fvisibility=hidden -fno-strict-aliasing -Wa,--noexecstack'))
+ '-fpic -ffunction-sections -funwind-tables -fstack-protector-strong -fvisibility=hidden -fno-strict-aliasing'))
env.Append(CPPFLAGS=string.split('-DANDROID -DNO_STATVFS -DGLES2_ENABLED'))
env['neon_enabled'] = False
diff --git a/platform/haiku/detect.py b/platform/haiku/detect.py
index 71202a9a49..54e227cd19 100644
--- a/platform/haiku/detect.py
+++ b/platform/haiku/detect.py
@@ -53,7 +53,7 @@ def configure(env):
elif (env["target"] == "release_debug"):
env.Append(CCFLAGS=['-O2', '-ffast-math', '-DDEBUG_ENABLED'])
elif (env["target"] == "debug"):
- env.Append(CCFLAGS=['-g2', '-Wall', '-DDEBUG_ENABLED', '-DDEBUG_MEMORY_ENABLED'])
+ env.Append(CCFLAGS=['-g2', '-DDEBUG_ENABLED', '-DDEBUG_MEMORY_ENABLED'])
# env.Append(CCFLAGS=['-DFREETYPE_ENABLED'])
env.Append(CPPFLAGS=['-DPTHREAD_NO_RENAME']) # TODO: enable when we have pthread_setname_np
diff --git a/platform/iphone/detect.py b/platform/iphone/detect.py
index fa6082a5a7..248c73982b 100644
--- a/platform/iphone/detect.py
+++ b/platform/iphone/detect.py
@@ -58,16 +58,16 @@ def configure(env):
if (env["ios_sim"] == "yes" or env["arch"] == "x86"): # i386, simulator
env["arch"] = "x86"
env["bits"] = "32"
- env['CCFLAGS'] = string.split('-arch i386 -fobjc-abi-version=2 -fobjc-legacy-dispatch -fmessage-length=0 -fpascal-strings -fasm-blocks -Wall -D__IPHONE_OS_VERSION_MIN_REQUIRED=40100 -isysroot $IPHONESDK -mios-simulator-version-min=4.3 -DCUSTOM_MATRIX_TRANSFORM_H=\\\"build/iphone/matrix4_iphone.h\\\" -DCUSTOM_VECTOR3_TRANSFORM_H=\\\"build/iphone/vector3_iphone.h\\\"')
+ env['CCFLAGS'] = string.split('-arch i386 -fobjc-abi-version=2 -fobjc-legacy-dispatch -fmessage-length=0 -fpascal-strings -fasm-blocks -D__IPHONE_OS_VERSION_MIN_REQUIRED=40100 -isysroot $IPHONESDK -mios-simulator-version-min=4.3 -DCUSTOM_MATRIX_TRANSFORM_H=\\\"build/iphone/matrix4_iphone.h\\\" -DCUSTOM_VECTOR3_TRANSFORM_H=\\\"build/iphone/vector3_iphone.h\\\"')
elif (env["arch"] == "arm64"): # arm64
env["bits"] = "64"
- env['CCFLAGS'] = string.split('-fno-objc-arc -arch arm64 -fmessage-length=0 -fno-strict-aliasing -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -Wno-trigraphs -fpascal-strings -Wmissing-prototypes -Wreturn-type -Wparentheses -Wswitch -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-shorten-64-to-32 -fvisibility=hidden -Wno-sign-conversion -MMD -MT dependencies -miphoneos-version-min=7.0 -isysroot $IPHONESDK')
+ env['CCFLAGS'] = string.split('-fno-objc-arc -arch arm64 -fmessage-length=0 -fno-strict-aliasing -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -fpascal-strings -fvisibility=hidden -MMD -MT dependencies -miphoneos-version-min=7.0 -isysroot $IPHONESDK')
env.Append(CPPFLAGS=['-DNEED_LONG_INT'])
env.Append(CPPFLAGS=['-DLIBYUV_DISABLE_NEON'])
else: # armv7
env["arch"] = "arm"
env["bits"] = "32"
- env['CCFLAGS'] = string.split('-fno-objc-arc -arch armv7 -fmessage-length=0 -fno-strict-aliasing -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -Wno-trigraphs -fpascal-strings -Wmissing-prototypes -Wreturn-type -Wparentheses -Wswitch -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-shorten-64-to-32 -isysroot $IPHONESDK -fvisibility=hidden -Wno-sign-conversion -mthumb "-DIBOutlet=__attribute__((iboutlet))" "-DIBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName)))" "-DIBAction=void)__attribute__((ibaction)" -miphoneos-version-min=7.0 -MMD -MT dependencies -isysroot $IPHONESDK')
+ env['CCFLAGS'] = string.split('-fno-objc-arc -arch armv7 -fmessage-length=0 -fno-strict-aliasing -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -fpascal-strings -isysroot $IPHONESDK -fvisibility=hidden -mthumb "-DIBOutlet=__attribute__((iboutlet))" "-DIBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName)))" "-DIBAction=void)__attribute__((ibaction)" -miphoneos-version-min=7.0 -MMD -MT dependencies -isysroot $IPHONESDK')
if (env["arch"] == "x86"):
env['IPHONEPLATFORM'] = 'iPhoneSimulator'
@@ -145,17 +145,17 @@ def configure(env):
if (env["target"] == "release"):
- env.Append(CCFLAGS=['-O3', '-DNS_BLOCK_ASSERTIONS=1', '-Wall', '-gdwarf-2']) # removed -ffast-math
+ env.Append(CCFLAGS=['-O3', '-DNS_BLOCK_ASSERTIONS=1', '-gdwarf-2']) # removed -ffast-math
env.Append(LINKFLAGS=['-O3'])
elif env["target"] == "release_debug":
- env.Append(CCFLAGS=['-Os', '-DNS_BLOCK_ASSERTIONS=1', '-Wall', '-DDEBUG_ENABLED'])
+ env.Append(CCFLAGS=['-Os', '-DNS_BLOCK_ASSERTIONS=1', '-DDEBUG_ENABLED'])
env.Append(LINKFLAGS=['-Os'])
env.Append(CPPFLAGS=['-DDEBUG_MEMORY_ENABLED'])
elif (env["target"] == "debug"):
- env.Append(CCFLAGS=['-D_DEBUG', '-DDEBUG=1', '-gdwarf-2', '-Wall', '-O0', '-DDEBUG_ENABLED'])
+ env.Append(CCFLAGS=['-D_DEBUG', '-DDEBUG=1', '-gdwarf-2', '-O0', '-DDEBUG_ENABLED'])
env.Append(CPPFLAGS=['-DDEBUG_MEMORY_ENABLED'])
elif (env["target"] == "profile"):
diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py
index f82eae9ff2..307e47e816 100644
--- a/platform/javascript/detect.py
+++ b/platform/javascript/detect.py
@@ -77,7 +77,7 @@ def configure(env):
# retain function names at the cost of file size, for backtraces and profiling
env.Append(LINKFLAGS=['--profiling-funcs'])
elif (env["target"] == "debug"):
- env.Append(CCFLAGS=['-O1', '-D_DEBUG', '-Wall', '-g', '-DDEBUG_ENABLED'])
+ env.Append(CCFLAGS=['-O1', '-D_DEBUG', '-g', '-DDEBUG_ENABLED'])
env.Append(LINKFLAGS=['-O1', '-g'])
# TODO: Move that to opus module's config
diff --git a/platform/osx/detect.py b/platform/osx/detect.py
index b59dfe1afb..39ee33ae82 100644
--- a/platform/osx/detect.py
+++ b/platform/osx/detect.py
@@ -51,7 +51,7 @@ def configure(env):
elif (env["target"] == "debug"):
- env.Append(CCFLAGS=['-g3', '-Wall', '-DDEBUG_ENABLED', '-DDEBUG_MEMORY_ENABLED'])
+ env.Append(CCFLAGS=['-g3', '-DDEBUG_ENABLED', '-DDEBUG_MEMORY_ENABLED'])
if (not os.environ.has_key("OSXCROSS_ROOT")):
# regular native build
diff --git a/platform/server/detect.py b/platform/server/detect.py
index 8bc85f342d..32f3c55135 100644
--- a/platform/server/detect.py
+++ b/platform/server/detect.py
@@ -64,7 +64,7 @@ def configure(env):
elif (env["target"] == "debug"):
- env.Append(CCFLAGS=['-g2', '-Wall', '-DDEBUG_ENABLED', '-DDEBUG_MEMORY_ENABLED'])
+ env.Append(CCFLAGS=['-g2', '-DDEBUG_ENABLED', '-DDEBUG_MEMORY_ENABLED'])
# Shared libraries, when requested
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index a3e410ec64..6080c6f1dc 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -361,7 +361,7 @@ def configure(env):
elif (env["target"] == "debug"):
- env.Append(CCFLAGS=['-g', '-Wall', '-DDEBUG_ENABLED', '-DDEBUG_MEMORY_ENABLED'])
+ env.Append(CCFLAGS=['-g', '-DDEBUG_ENABLED', '-DDEBUG_MEMORY_ENABLED'])
env["CC"] = mingw_prefix + "gcc"
env['AS'] = mingw_prefix + "as"
diff --git a/platform/x11/detect.py b/platform/x11/detect.py
index 89cf639114..34306c8d0f 100644
--- a/platform/x11/detect.py
+++ b/platform/x11/detect.py
@@ -133,7 +133,7 @@ def configure(env):
elif (env["target"] == "debug"):
- env.Prepend(CCFLAGS=['-g2', '-Wall', '-DDEBUG_ENABLED', '-DDEBUG_MEMORY_ENABLED'])
+ env.Prepend(CCFLAGS=['-g2', '-DDEBUG_ENABLED', '-DDEBUG_MEMORY_ENABLED'])
env.ParseConfig('pkg-config x11 --cflags --libs')
env.ParseConfig('pkg-config xinerama --cflags --libs')
@@ -227,7 +227,7 @@ def configure(env):
env.Append(LIBS=['dl'])
# env.Append(CPPFLAGS=['-DMPC_FIXED_POINT'])
-# host compiler is default..
+ # host compiler is default..
if (is64 and env["bits"] == "32"):
env.Append(CPPFLAGS=['-m32'])