Browse Source

Compile with Ofast and disable _FORTIFY_SOURCE

Riccardo Balbo 9 năm trước cách đây
mục cha
commit
6b1656f337
1 tập tin đã thay đổi với 6 bổ sung1 xóa
  1. 6 1
      jme3-bullet-native/build.gradle

+ 6 - 1
jme3-bullet-native/build.gradle

@@ -85,11 +85,14 @@ model {
 
             if (os == "osx") {
                 cppCompiler.args '-I', "$javaHome/include/darwin"
+                cppCompiler.args "-Ofast"
+                cppCompiler.args "-U_FORTIFY_SOURCE"
             } else if (os == "linux") {
                 cppCompiler.args "-fvisibility=hidden"
                 cppCompiler.args '-I', "$javaHome/include/linux"
                 cppCompiler.args "-fPIC"
- 
+                cppCompiler.args "-Ofast"
+                cppCompiler.args "-U_FORTIFY_SOURCE"
                 cppCompiler.args "-fpermissive"
                 linker.args "-fvisibility=hidden"
             } else if (os == "windows") {
@@ -101,6 +104,8 @@ model {
                     }
                     cppCompiler.args "-fpermissive"
                     cppCompiler.args "-static"
+                    cppCompiler.args "-Ofast"
+                    cppCompiler.args "-U_FORTIFY_SOURCE"
                     linker.args "-static"
                     linker.args "-Wl,--exclude-all-symbols"
                 }