Skip to content

Commit 1a68707

Browse files
committed
[GR-64834] Specify the optimization level in all ninja-native projects
1 parent dff147b commit 1a68707

File tree

7 files changed

+25
-21
lines changed

7 files changed

+25
-21
lines changed

espresso/mx.espresso/suite.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@
263263
"os_arch": {
264264
"windows": {
265265
"<others>": {
266-
"cflags": ["-Wall"],
266+
"cflags": ["-g", "-O3", "-Wall"],
267267
},
268268
},
269269
"linux-musl": {
@@ -291,7 +291,7 @@
291291
"os_arch": {
292292
"linux": {
293293
"<others>": {
294-
"cflags" : ["-g", "-fPIC", "-Wall", "-Werror", "-D_GNU_SOURCE"],
294+
"cflags" : ["-g", "-O3", "-fPIC", "-Wall", "-Werror", "-D_GNU_SOURCE"],
295295
"ldflags": [
296296
"-Wl,-soname,libeden.so",
297297
],
@@ -357,7 +357,7 @@
357357
},
358358
"windows": {
359359
"<others>": {
360-
"cflags": ["-Wall"],
360+
"cflags": ["-g", "-O3", "-Wall"],
361361
},
362362
}
363363
},

sdk/mx.sdk/mx_sdk_vm_impl.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3224,6 +3224,7 @@ def cflags(self):
32243224
_exe_dirs = set([dirname(p) for p in _exe_paths])
32253225
_dynamic_cflags = [
32263226
('/std:c++17' if mx.is_windows() else '-std=c++17'),
3227+
'-O3', # Note: no -g to save 0.2MB on Linux
32273228
'-DCP_SEP=' + os.pathsep,
32283229
'-DDIR_SEP=' + ('\\\\' if mx.is_windows() else '/'),
32293230
'-DGRAALVM_VERSION=' + _suite.release_version(),

sdk/mx.sdk/mx_sdk_vm_ng.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,7 @@ def isJDKDependent(self):
568568
def cflags(self):
569569
_dynamic_cflags = [
570570
('/std:c++17' if mx.is_windows() else '-std=c++17'),
571+
'-O3', # Note: no -g to save 0.2MB on Linux
571572
'-DCP_SEP=' + os.pathsep,
572573
'-DDIR_SEP=' + ('\\\\' if mx.is_windows() else '/'),
573574
'-DGRAALVM_VERSION=' + _suite.release_version(),

substratevm/mx.substratevm/suite.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -900,12 +900,12 @@
900900
"os_arch": {
901901
"windows": {
902902
"<others>": {
903-
"cflags": ["-Wall"]
903+
"cflags": ["-g", "-O2", "-Wall"]
904904
}
905905
},
906906
"<others>": {
907907
"<others>": {
908-
"cflags": ["-Wall", "-Werror"],
908+
"cflags": ["-g", "-O2", "-Wall", "-Werror"],
909909
},
910910
},
911911
},

sulong/mx.sulong/suite.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -757,11 +757,11 @@
757757
"os" : {
758758
"windows" : {},
759759
"solaris" : {
760-
"cflags" : ["-g", "-Wall", "-Werror", "-m64"],
760+
"cflags" : ["-g", "-O3", "-Wall", "-Werror", "-m64"],
761761
"ldflags" : ["-m64"],
762762
},
763763
"<others>" : {
764-
"cflags" : ["-g", "-Wall", "-Werror"],
764+
"cflags" : ["-g", "-O3", "-Wall", "-Werror"],
765765
},
766766
},
767767
},

truffle/mx.truffle/suite.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,31 +1021,31 @@
10211021
"os_arch" : {
10221022
"windows" : {
10231023
"<others>" : {
1024-
"cflags" : []
1024+
"cflags" : ["-O3"],
10251025
}
10261026
},
10271027
"solaris" : {
10281028
"<others>" : {
1029-
"cflags" : ["-g", "-Wall", "-Werror", "-m64", "-pthread"],
1029+
"cflags" : ["-g", "-O3", "-Wall", "-Werror", "-m64", "-pthread"],
10301030
"ldflags" : ["-m64", "-pthread"],
10311031
"ldlibs" : ["-ldl"],
10321032
},
10331033
},
10341034
"linux" : {
10351035
"<others>" : {
1036-
"cflags" : ["-g", "-Wall", "-Werror", "-D_GNU_SOURCE", "-fvisibility=hidden"],
1036+
"cflags" : ["-g", "-O3", "-Wall", "-Werror", "-D_GNU_SOURCE", "-fvisibility=hidden"],
10371037
"ldlibs" : ["-ldl"],
10381038
},
10391039
},
10401040
"linux-musl" : {
10411041
"<others>" : {
1042-
"cflags" : ["-g", "-Wall", "-Werror", "-fvisibility=hidden"],
1042+
"cflags" : ["-g", "-O3", "-Wall", "-Werror", "-fvisibility=hidden"],
10431043
"ldlibs" : ["-ldl"],
10441044
},
10451045
},
10461046
"<others>" : {
10471047
"<others>" : {
1048-
"cflags" : ["-g", "-Wall", "-Werror", "-fvisibility=hidden"],
1048+
"cflags" : ["-g", "-O3", "-Wall", "-Werror", "-fvisibility=hidden"],
10491049
"ldlibs" : ["-ldl"],
10501050
},
10511051
},
@@ -1090,19 +1090,19 @@
10901090
"os_arch" : {
10911091
"windows" : {
10921092
"<others>" : {
1093-
"cflags" : []
1093+
"cflags" : ["-O3"]
10941094
}
10951095
},
10961096
"solaris" : {
10971097
"<others>" : {
1098-
"cflags" : ["-g", "-Wall", "-Werror", "-m64", "-pthread"],
1098+
"cflags" : ["-g", "-O3", "-Wall", "-Werror", "-m64", "-pthread"],
10991099
"ldflags" : ["-m64", "-pthread"],
11001100
"ldlibs" : ["-lm"],
11011101
},
11021102
},
11031103
"<others>" : {
11041104
"<others>" : {
1105-
"cflags" : ["-g", "-Wall", "-Werror", "-pthread"],
1105+
"cflags" : ["-g", "-O3", "-Wall", "-Werror", "-pthread"],
11061106
"ldflags" : ["-pthread"],
11071107
"ldlibs" : ["-lm"],
11081108
},
@@ -1120,17 +1120,17 @@
11201120
"os_arch" : {
11211121
"windows" : {
11221122
"<others>" : {
1123-
"cflags" : []
1123+
"cflags" : ["-O3"]
11241124
}
11251125
},
11261126
"solaris" : {
11271127
"<others>" : {
1128-
"cflags" : ["-g", "-Wall", "-Werror", "-m64"],
1128+
"cflags" : ["-g", "-O3", "-Wall", "-Werror", "-m64"],
11291129
},
11301130
},
11311131
"<others>" : {
11321132
"<others>" : {
1133-
"cflags" : ["-g", "-Wall", "-Werror"],
1133+
"cflags" : ["-g", "-O3", "-Wall", "-Werror"],
11341134
},
11351135
},
11361136
},
@@ -1348,18 +1348,18 @@
13481348
"os_arch" : {
13491349
"windows" : {
13501350
"<others>" : {
1351-
"cflags" : []
1351+
"cflags" : ["-O3"]
13521352
}
13531353
},
13541354
"linux" : {
13551355
"<others>" : {
1356-
"cflags" : ["-g", "-Wall", "-Werror", "-D_GNU_SOURCE"],
1356+
"cflags" : ["-g", "-O3", "-Wall", "-Werror", "-D_GNU_SOURCE"],
13571357
"ldlibs" : ["-ldl"],
13581358
},
13591359
},
13601360
"<others>" : {
13611361
"<others>" : {
1362-
"cflags" : ["-g", "-Wall", "-Werror"],
1362+
"cflags" : ["-g", "-O3", "-Wall", "-Werror"],
13631363
"ldlibs" : ["-ldl"],
13641364
},
13651365
},

vm/mx.vm/suite.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@
137137
"truffle:TRUFFLE_NFI_GRAALVM_SUPPORT",
138138
],
139139
"cflags" : [
140+
"-g",
141+
"-O3",
140142
"-I<path:truffle:TRUFFLE_NFI_GRAALVM_SUPPORT>/include",
141143
],
142144
"testProject" : True,

0 commit comments

Comments
 (0)