OSDN Git Service

Removed offending flags for Chromium
authorAlexis Hetu <sugoi@google.com>
Wed, 24 May 2017 15:16:26 +0000 (11:16 -0400)
committerAlexis Hétu <sugoi@google.com>
Wed, 24 May 2017 15:50:31 +0000 (15:50 +0000)
Removed flags and verified Linux build / execution still works properly.

Change-Id: Ibad4ec5d1b89d8e9b826c57bf2d6dbd0d18b7a2e
Reviewed-on: https://swiftshader-review.googlesource.com/9812
Reviewed-by: Nico Weber <thakis@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Reviewed-by: Corentin Wallez <cwallez@google.com>
Tested-by: Alexis Hétu <sugoi@google.com>
BUILD.gn
CMakeLists.txt

index bfd68e2..694942a 100644 (file)
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -39,7 +39,7 @@ config("swiftshader_config") {
     cflags = [
       "-std=c++11",
       "-Wall",
-      "-fexceptions",
+      "-fno-exceptions",
       "-fno-operator-names",
     ]
 
@@ -59,7 +59,6 @@ config("swiftshader_config") {
         "-ffunction-sections",
         "-fdata-sections",
         "-fomit-frame-pointer",
-        "-O2",
         "-Os",
       ]
 
index d67476e..9bea271 100644 (file)
@@ -137,7 +137,7 @@ if(MSVC)
 else()
     set_cpp_flag("--std=c++11")
     set_cpp_flag("-Wall")
-    set_cpp_flag("-fexceptions")
+    set_cpp_flag("-fno-exceptions")
 
     # Don't allow symbols to be overridden by another module.
     # This enables libGLES_CM and libGLESv2 to statically link LLVM.
@@ -167,9 +167,8 @@ else()
     set_cpp_flag("-s" RELEASE)
 
     # For distribution it is more important to be slim than super optimized
-    # so even in Release we use only -O2
-    set_cpp_flag("-O2 -Os" RELEASE)
-    set_cpp_flag("-O2 -Os" RELWITHDEBINFO)
+    set_cpp_flag("-Os" RELEASE)
+    set_cpp_flag("-Os" RELWITHDEBINFO)
 
     set_cpp_flag("-DNDEBUG" RELEASE)
     set_cpp_flag("-DNDEBUG" RELWITHDEBINFO)