Skip to content

Commit 997dd7e

Browse files
committed
gcc compilation optimization
1 parent ecb03ec commit 997dd7e

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

build.gradle.kts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ val compileFlecsNative by tasks.registering(Exec::class) {
117117
"-o", outputNativeFile.absolutePath,
118118
flecsCFile.absolutePath,
119119
"-Ofast",
120+
"-march=native",
121+
"-flto",
122+
"-fomit-frame-pointer",
120123
"-std=c99",
121124
"-DFLECS_SHARED",
122125
"-DNDEBUG",
@@ -129,6 +132,9 @@ val compileFlecsNative by tasks.registering(Exec::class) {
129132
"-o", outputNativeFile.absolutePath,
130133
flecsCFile.absolutePath,
131134
"-Ofast",
135+
"-march=native",
136+
"-flto",
137+
"-fomit-frame-pointer",
132138
"-std=c99",
133139
"-DFLECS_SHARED",
134140
"-DNDEBUG",
@@ -141,6 +147,9 @@ val compileFlecsNative by tasks.registering(Exec::class) {
141147
"-o", outputNativeFile.absolutePath,
142148
flecsCFile.absolutePath,
143149
"-Ofast",
150+
"-march=native",
151+
"-flto",
152+
"-fomit-frame-pointer",
144153
"-std=c99",
145154
"-DFLECS_SHARED",
146155
"-DNDEBUG",
@@ -150,6 +159,7 @@ val compileFlecsNative by tasks.registering(Exec::class) {
150159
"-lrt",
151160
"-lpthread"
152161
)
162+
153163
}
154164
commandLine(compileCommand)
155165
}

0 commit comments

Comments
 (0)